Skip to content

Commit

Permalink
pthread: destroy cleanup handlers on cancel
Browse files Browse the repository at this point in the history
JIRA: RTOS-671
  • Loading branch information
badochov committed Nov 8, 2023
1 parent f6ef01d commit 6b032ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pthread/pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ int pthread_cancel(pthread_t thread)
}
else {
if (ctx->cancelstate == PTHREAD_CANCEL_ENABLE) {
_pthread_do_cleanup(ctx);
ctx->retval = (void *)PTHREAD_CANCELED;
id = ctx->id;
mutexUnlock(pthread_common.pthread_list_lock);
Expand Down

0 comments on commit 6b032ae

Please sign in to comment.