Community
Participate
Working Groups
Build Identifier: 201105160958 CDT correctly infers non-returning when using exit(), but not pthread_exit() for the following code: static void * timer_pthread(void *arg) { Timer_Thread_Args *args = (reinterpret_cast<Timer_Thread_Args*>(arg)); if( args->my_flags == KNL::Timer::PERIODIC ) { for(;;) { KNL::Sleep(args->my_expiry_in_nanoseconds); if( KNL::is_valid_pid(args->my_caller) ) { KNL::Signal(args->my_caller, TIMER_THREAD_TIMER_SIGNAL, true); } } } else { KNL::Sleep(args->my_expiry_in_nanoseconds); if( KNL::is_valid_pid(args->my_caller) ) { KNL::Signal(args->my_caller, TIMER_THREAD_TIMER_SIGNAL, true); } } delete args; pthread_exit(NULL); } Reproducible: Always
We can special-case pthread_exit, but a real solution to this problem is to fix bug 316076.
This bug should be fixed together with bug 316076. Please reopen if it's still not working.