summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/thread.h
diff options
context:
space:
mode:
authorThomas Pfaff <tpfaff@gmx.net>2003-10-31 20:42:56 +0000
committerThomas Pfaff <tpfaff@gmx.net>2003-10-31 20:42:56 +0000
commitc6e0f665bce6212ce3a75b8a15b07dfd98239708 (patch)
tree6239021cd27c42b9b4e19b14dc47de6b1b72a498 /winsup/cygwin/thread.h
parentd3f6bd13cb327edf8f1006ac6a3173a2cc74cbe3 (diff)
downloadcygnal-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.h15
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);