Comment: fix comments

This commit is contained in:
Alfred Gedeon 2020-09-04 20:51:09 -07:00
parent 62598e9bfb
commit 3116c0358a

View file

@ -33,8 +33,8 @@
* running are blocked in sigwait(). * running are blocked in sigwait().
* *
* Task switch is done by resuming the thread for the next task by * Task switch is done by resuming the thread for the next task by
* sending it the resume signal (SIGUSR1) and then suspending the * signaling the condition variable and then waiting on a condition variable
* current thread. * with the current thread.
* *
* The timer interrupt uses SIGALRM and care is taken to ensure that * The timer interrupt uses SIGALRM and care is taken to ensure that
* the signal handler runs only on the thread for the current task. * the signal handler runs only on the thread for the current task.
@ -44,9 +44,6 @@
* deadlocks as the FreeRTOS kernel can switch tasks while they're * deadlocks as the FreeRTOS kernel can switch tasks while they're
* holding a pthread mutex. * holding a pthread mutex.
* *
* Replacement malloc(), free(), calloc(), and realloc() are provided
* for glibc (see below for more information).
*
* stdio (printf() and friends) should be called from a single task * stdio (printf() and friends) should be called from a single task
* only or serialized with a FreeRTOS primitive such as a binary * only or serialized with a FreeRTOS primitive such as a binary
* semaphore or mutex. * semaphore or mutex.
@ -184,8 +181,8 @@ sigset_t xSignals;
hMainThread = pthread_self(); hMainThread = pthread_self();
/* Start the timer that generates the tick ISR. Interrupts are disabled /* Start the timer that generates the tick ISR(SIGALRM).
here already. */ Interrupts are disabled here already. */
prvSetupTimerInterrupt(); prvSetupTimerInterrupt();
/* Start the first task. */ /* Start the first task. */
@ -363,7 +360,9 @@ uint64_t xExpectedTicks;
uxCriticalNesting++; /* Signals are blocked in this signal handler. */ uxCriticalNesting++; /* Signals are blocked in this signal handler. */
#if ( configUSE_PREEMPTION == 1 )
pxThreadToSuspend = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() ); pxThreadToSuspend = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() );
#endif
/* Tick Increment, accounting for any lost signals or drift in /* Tick Increment, accounting for any lost signals or drift in
* the timer. */ * the timer. */
@ -399,8 +398,7 @@ void vPortCancelThread( void *pxTaskToDelete )
Thread_t *pxThreadToCancel = prvGetThreadFromTask( pxTaskToDelete ); Thread_t *pxThreadToCancel = prvGetThreadFromTask( pxTaskToDelete );
/* /*
* The thread has already been suspended so it can be safely * The thread has already been suspended so it can be safely cancelled.
* cancelled.
*/ */
pthread_cancel( pxThreadToCancel->pthread ); pthread_cancel( pxThreadToCancel->pthread );
pthread_join( pxThreadToCancel->pthread, NULL ); pthread_join( pxThreadToCancel->pthread, NULL );
@ -443,6 +441,7 @@ BaseType_t uxSavedCriticalNesting;
prvResumeThread( pxThreadToResume ); prvResumeThread( pxThreadToResume );
if ( pxThreadToSuspend->xDying ) if ( pxThreadToSuspend->xDying )
{ {
event_delete(pxThreadToSuspend->ev);
pthread_exit( NULL ); pthread_exit( NULL );
} }
prvSuspendSelf( pxThreadToSuspend ); prvSuspendSelf( pxThreadToSuspend );