diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/cancelrun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/posix/src/cancelrun.c b/cpukit/posix/src/cancelrun.c index fb93e1958f..59138ac1b7 100644 --- a/cpukit/posix/src/cancelrun.c +++ b/cpukit/posix/src/cancelrun.c @@ -41,7 +41,8 @@ void _POSIX_Threads_cancel_run( while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); - handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack ); + handler = (POSIX_Cancel_Handler_control *) + _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); |