diff options
author | Thomas Pfaff <tpfaff@gmx.net> | 2003-10-31 20:42:56 +0000 |
---|---|---|
committer | Thomas Pfaff <tpfaff@gmx.net> | 2003-10-31 20:42:56 +0000 |
commit | c6e0f665bce6212ce3a75b8a15b07dfd98239708 (patch) | |
tree | 6239021cd27c42b9b4e19b14dc47de6b1b72a498 /winsup/cygwin/thread.h | |
parent | d3f6bd13cb327edf8f1006ac6a3173a2cc74cbe3 (diff) | |
download | cygnal-c6e0f665bce6212ce3a75b8a15b07dfd98239708.tar.gz cygnal-c6e0f665bce6212ce3a75b8a15b07dfd98239708.tar.bz2 cygnal-c6e0f665bce6212ce3a75b8a15b07dfd98239708.zip |
Rename pthread::running to pthread::valid throughout.
* thread.h: (pthread::suspend_all_except_self): New static method.
(pthread::resume_all): Ditto.
(pthread::suspend_except_self): New method.
(pthread::resume): Ditto.
* thread.cc (pthread::suspend_except_self): Implement.
(pthread::resume): Ditto.
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r-- | winsup/cygwin/thread.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index 579bb184e..2cf917450 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -456,7 +456,7 @@ public: void *(*function) (void *); void *arg; void *return_ptr; - bool running; + bool valid; bool suspended; int cancelstate, canceltype; HANDLE cancel_event; @@ -521,12 +521,25 @@ public: threads.for_each (&pthread::_fixup_after_fork); } + static void suspend_all_except_self () + { + threads.for_each (&pthread::suspend_except_self); + } + + static void resume_all () + { + threads.for_each (&pthread::resume); + } + private: static List<pthread> threads; DWORD thread_id; __pthread_cleanup_handler *cleanup_stack; pthread_mutex mutex; + void suspend_except_self (); + void resume (); + void _fixup_after_fork (); void pop_all_cleanup_handlers (void); |