* 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:
		| @@ -1,3 +1,10 @@ | ||||
| 2011-05-04  Christopher Faylor  <me.cygwin2011@cgf.cx> | ||||
|  | ||||
| 	* 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. | ||||
|  | ||||
| 2011-05-04  Christopher Faylor  <me.cygwin2011@cgf.cx> | ||||
|  | ||||
| 	* pinfo.cc (pinfo::pinfo): Set procinfo to NULL to avoid potential | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -401,7 +401,7 @@ public: | ||||
|  | ||||
|   virtual void testcancel (); | ||||
|   static HANDLE get_cancel_event (); | ||||
|   static void static_cancel_self (); | ||||
|   static void static_cancel_self () __attribute__ ((noreturn)); | ||||
|  | ||||
|   virtual int setcancelstate (int state, int *oldstate); | ||||
|   virtual int setcanceltype (int type, int *oldtype); | ||||
| @@ -454,7 +454,7 @@ private: | ||||
|   void postcreate (); | ||||
|   bool create_cancel_event (); | ||||
|   static void set_tls_self_pointer (pthread *); | ||||
|   void cancel_self (); | ||||
|   void cancel_self () __attribute__ ((noreturn)); | ||||
|   DWORD get_thread_id (); | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user