]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/cygthread.h
revert previous not-ready-for-primetime checkin.
[newlib-cygwin.git] / winsup / cygwin / cygthread.h
1 /* cygthread.h
2
3 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
4
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
7 details. */
8
9 class cygthread
10 {
11 LONG inuse;
12 DWORD id;
13 HANDLE h;
14 HANDLE ev;
15 HANDLE thread_sync;
16 void *stack_ptr;
17 const char *__name;
18 LPTHREAD_START_ROUTINE func;
19 VOID *arg;
20 bool is_freerange;
21 static bool exiting;
22 void terminate_thread ();
23 public:
24 static DWORD WINAPI stub (VOID *);
25 static DWORD WINAPI simplestub (VOID *);
26 static DWORD main_thread_id;
27 static const char * name (DWORD = 0);
28 cygthread (LPTHREAD_START_ROUTINE, LPVOID, const char *);
29 cygthread () {};
30 static void init ();
31 bool detach (HANDLE = NULL);
32 operator HANDLE ();
33 static bool is ();
34 void * operator new (size_t);
35 static cygthread *freerange ();
36 void exit_thread ();
37 static void terminate ();
38 bool SetThreadPriority (int nPriority) {return ::SetThreadPriority (h, nPriority);}
39 void zap_h ()
40 {
41 (void) CloseHandle (h);
42 h = NULL;
43 }
44 };
45
46 #define cygself NULL
This page took 0.038416 seconds and 5 git commands to generate.