mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-07 05:34:59 -05:00
Change the pthread_once_t reset in vPortEndScheduler() to work for MacOS
This commit is contained in:
parent
c083af972a
commit
400baa16b6
1 changed files with 4 additions and 3 deletions
7
portable/ThirdParty/GCC/Posix/port.c
vendored
7
portable/ThirdParty/GCC/Posix/port.c
vendored
|
|
@ -266,9 +266,10 @@ BaseType_t xPortStartScheduler( void )
|
|||
*/
|
||||
xSchedulerEnd = pdFALSE;
|
||||
|
||||
/* Reset the pthread_once_t structure. This is required if the port
|
||||
* starts the scheduler again. */
|
||||
hSigSetupThread = PTHREAD_ONCE_INIT;
|
||||
/* Reset pthread_once_t, needed to restart the scheduler again.
|
||||
* memset the internal struct members for MacOS/Linux Compatability */
|
||||
memset( ( void * ) &hSigSetupThread.__sig, _PTHREAD_ONCE_SIG_init, sizeof(_PTHREAD_ONCE_SIG_init));
|
||||
memset( ( void * ) &hSigSetupThread.__opaque, 0, sizeof(hSigSetupThread.__opaque));
|
||||
|
||||
/* Restore original signal mask. */
|
||||
( void ) pthread_sigmask( SIG_SETMASK, &xSchedulerOriginalSignalMask, NULL );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue