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. --- testsuites/psxtests/psx08/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testsuites/psxtests') diff --git a/testsuites/psxtests/psx08/init.c b/testsuites/psxtests/psx08/init.c index 392c2522fc..f4af45b5a4 100644 --- a/testsuites/psxtests/psx08/init.c +++ b/testsuites/psxtests/psx08/init.c @@ -146,7 +146,7 @@ static void test_delete_deadlock( void ) value = NULL; eno = pthread_join( ctx.protected_join, &value ); rtems_test_assert( eno == 0 ); - rtems_test_assert( value == NULL ); + rtems_test_assert( value == PTHREAD_CANCELED ); rtems_test_assert( ctx.delete_status == RTEMS_INCORRECT_STATE ); } -- cgit v1.2.3