Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aggarg authored Oct 3, 2023
2 parents 34c43f0 + 57f9eed commit 16ec439
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion portable/ThirdParty/GCC/Posix/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
*/
thread = ( Thread_t * ) ( pxTopOfStack + 1 ) - 1;
pxTopOfStack = ( StackType_t * ) thread - 1;

#ifdef __APPLE__
pxEndOfStack = ( StackType_t * ) mach_vm_round_page( pxEndOfStack );
#endif

ulStackSize = ( size_t ) ( pxTopOfStack + 1 - pxEndOfStack ) * sizeof( *pxTopOfStack );

#ifdef __APPLE__
pxEndOfStack = mach_vm_round_page( pxEndOfStack );
ulStackSize = mach_vm_trunc_page( ulStackSize );
#endif

Expand Down

0 comments on commit 16ec439

Please sign in to comment.