From 8a864bc62cd57fbd6dd35141e5beb582de9b7bff Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Jul 2022 10:38:12 +0200 Subject: score: Use PTHREAD_CANCELED for _Thread_Cancel() The rtems_task_delete() directive is basically just a combined pthread_cancel() and pthread_join(). In addition, it removes the PTHREAD_DETACHED state. The exit value returned by pthread_join() of threads cancelled by rtems_task_delete() should reflect this by getting a PTHREAD_CANCELED value instead of NULL which could be a normal exit value. Close #4680. --- cpukit/posix/src/cancel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/posix/src/cancel.c') diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c index 0fb2199f0a..1ccfe75b0b 100644 --- a/cpukit/posix/src/cancel.c +++ b/cpukit/posix/src/cancel.c @@ -75,7 +75,7 @@ int pthread_cancel( pthread_t thread ) } else { _Thread_Dispatch_disable_with_CPU( cpu_self, &lock_context ); _ISR_lock_ISR_enable( &lock_context ); - (void) _Thread_Cancel( the_thread, executing, 0, PTHREAD_CANCELED ); + (void) _Thread_Cancel( the_thread, executing, 0 ); _Thread_Dispatch_enable( cpu_self ); } return 0; -- cgit v1.2.3