* thread.h (pthread::static_cancel_self): Mark as noreturn.

(pthread::cancel_self): Ditto.
* thread.cc (pthread::cancel_self): Explicitly use pthread::exit to avoid a
"function returns" error.
This commit is contained in:
Christopher Faylor
2011-05-04 06:16:59 +00:00
parent cdbb272b4c
commit 9d2b7928b5
3 changed files with 12 additions and 3 deletions

View File

@@ -1044,7 +1044,9 @@ pthread::pop_all_cleanup_handlers ()
void
pthread::cancel_self ()
{
exit (PTHREAD_CANCELED);
/* Can someone explain why the pthread:: is needed here? g++ complains
without it. */
pthread::exit (PTHREAD_CANCELED);
}
DWORD