mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
Fix typos in comments and documentation.
This commit is contained in:
committed by
patacongo
parent
430a2178fb
commit
a5e643b0cd
@@ -317,7 +317,7 @@ static int nxsem_boostholderprio(FAR struct semholder_s *pholder,
|
||||
|
||||
/* Make sure that the holder thread is still active. If it exited without
|
||||
* releasing its counts, then that would be a bad thing. But we can take
|
||||
* no real action because we don't know know that the program is doing.
|
||||
* no real action because we don't know what the program is doing.
|
||||
* Perhaps its plan is to kill a thread, then destroy the semaphore.
|
||||
*/
|
||||
|
||||
@@ -401,7 +401,7 @@ static int nxsem_boostholderprio(FAR struct semholder_s *pholder,
|
||||
|
||||
#else
|
||||
/* If the priority of the thread that is waiting for a count is less than
|
||||
* of equal to the priority of the thread holding a count, then do nothing
|
||||
* or equal to the priority of the thread holding a count, then do nothing
|
||||
* because the thread is already running at a sufficient priority.
|
||||
*/
|
||||
|
||||
@@ -436,7 +436,7 @@ static int nxsem_verifyholder(FAR struct semholder_s *pholder,
|
||||
FAR struct tcb_s *htcb = (FAR struct tcb_s *)pholder->htcb;
|
||||
|
||||
/* Called after a semaphore has been released (incremented), the semaphore
|
||||
* could is non-negative, and there is no thread waiting for the count.
|
||||
* could be non-negative, and there is no thread waiting for the count.
|
||||
* In this case, the priority of the holder should not be boosted.
|
||||
*/
|
||||
|
||||
@@ -484,7 +484,7 @@ static int nxsem_restoreholderprio(FAR struct tcb_s *htcb,
|
||||
|
||||
/* Make sure that the holder thread is still active. If it exited without
|
||||
* releasing its counts, then that would be a bad thing. But we can take
|
||||
* no real action because we don't know know that the program is doing.
|
||||
* no real action because we don't know what the program is doing.
|
||||
* Perhaps its plan is to kill a thread, then destroy the semaphore.
|
||||
*/
|
||||
|
||||
@@ -531,7 +531,7 @@ static int nxsem_restoreholderprio(FAR struct tcb_s *htcb,
|
||||
|
||||
/* There are multiple pending priority levels. The holder thread's
|
||||
* "boosted" priority could greater than or equal to
|
||||
* "stcb->sched_priority" (it could be greater if its priority we
|
||||
* "stcb->sched_priority" (it could be greater if its priority was
|
||||
* boosted because it also holds another semaphore).
|
||||
*/
|
||||
|
||||
@@ -574,7 +574,7 @@ static int nxsem_restoreholderprio(FAR struct tcb_s *htcb,
|
||||
{
|
||||
/* The holder thread has been boosted to a higher priority than the
|
||||
* waiter task. The pending priority should be in the list (unless
|
||||
* it was lost because of of list overflow or because the holder
|
||||
* it was lost because of list overflow or because the holder
|
||||
* was reprioritized again unbeknownst to the priority inheritance
|
||||
* logic).
|
||||
*
|
||||
@@ -668,8 +668,8 @@ static int nxsem_restoreholderprio_self(FAR struct semholder_s *pholder,
|
||||
|
||||
#if CONFIG_SEM_PREALLOCHOLDERS == 0
|
||||
/* In the case where there are only 2 holders. This step
|
||||
* is necessary to insure we have space. Release the holder
|
||||
* if all counts have been given up. before reprioritizing
|
||||
* is necessary to ensure we have space. Release the holder
|
||||
* if all counts have been given up before reprioritizing
|
||||
* causes a context switch.
|
||||
*/
|
||||
|
||||
@@ -686,7 +686,7 @@ static int nxsem_restoreholderprio_self(FAR struct semholder_s *pholder,
|
||||
* Name: nxsem_restorebaseprio_irq
|
||||
*
|
||||
* Description:
|
||||
* This function is called after the an interrupt handler posts a count on
|
||||
* This function is called after an interrupt handler posts a count on
|
||||
* the semaphore. It will check if we need to drop the priority of any
|
||||
* threads holding a count on the semaphore. Their priority could have
|
||||
* been boosted while they held the count.
|
||||
@@ -695,7 +695,7 @@ static int nxsem_restoreholderprio_self(FAR struct semholder_s *pholder,
|
||||
* stcb - The TCB of the task that was just started (if any). If the
|
||||
* post action caused a count to be given to another thread, then stcb
|
||||
* is the TCB that received the count. Note, just because stcb received
|
||||
* the count, it does not mean that it it is higher priority than other
|
||||
* the count, it does not mean that it is higher priority than other
|
||||
* threads.
|
||||
* sem - A reference to the semaphore being posted.
|
||||
* - If the semaphore count is <0 then there are still threads waiting
|
||||
@@ -756,7 +756,7 @@ static inline void nxsem_restorebaseprio_irq(FAR struct tcb_s *stcb,
|
||||
* stcb - The TCB of the task that was just started (if any). If the
|
||||
* post action caused a count to be given to another thread, then stcb
|
||||
* is the TCB that received the count. Note, just because stcb received
|
||||
* the count, it does not mean that it it is higher priority than other
|
||||
* the count, it does not mean that it is higher priority than other
|
||||
* threads.
|
||||
* sem - A reference to the semaphore being posted.
|
||||
* - If the semaphore count is <0 then there are still threads waiting
|
||||
@@ -1061,7 +1061,7 @@ void nxsem_releaseholder(FAR sem_t *sem)
|
||||
* stcb - The TCB of the task that was just started (if any). If the
|
||||
* post action caused a count to be given to another thread, then stcb
|
||||
* is the TCB that received the count. Note, just because stcb received
|
||||
* the count, it does not mean that it it is higher priority than other
|
||||
* the count, it does not mean that it is higher priority than other
|
||||
* threads.
|
||||
* sem - A reference to the semaphore being posted.
|
||||
* - If the semaphore count is <0 then there are still threads waiting
|
||||
|
||||
@@ -132,7 +132,7 @@ int nxsem_post(FAR sem_t *sem)
|
||||
|
||||
sched_lock();
|
||||
#endif
|
||||
/* If the result of of semaphore unlock is non-positive, then
|
||||
/* If the result of semaphore unlock is non-positive, then
|
||||
* there must be some task waiting for the semaphore.
|
||||
*/
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
*
|
||||
* Description:
|
||||
* This function locks the specified semaphore only if the semaphore is
|
||||
* currently not locked. Otherwise, it locks the semaphore. In either
|
||||
* case, the call returns without blocking.
|
||||
* currently not locked. In either case, the call returns without
|
||||
* blocking.
|
||||
*
|
||||
* Input Parameters:
|
||||
* sem - the semaphore descriptor
|
||||
@@ -129,8 +129,8 @@ int nxsem_trywait(FAR sem_t *sem)
|
||||
*
|
||||
* Description:
|
||||
* This function locks the specified semaphore only if the semaphore is
|
||||
* currently not locked. Otherwise, it locks the semaphore. In either
|
||||
* case, the call returns without blocking.
|
||||
* currently not locked. In either case, the call returns without
|
||||
* blocking.
|
||||
*
|
||||
* Input Parameters:
|
||||
* sem - the semaphore descriptor
|
||||
|
||||
Reference in New Issue
Block a user