Rudiments: /home/dmuse/src/rudiments/include/rudiments/thread.h Source File

Rudiments

- Main Page
- Classes

thread.h
1 // Copyright (c) 2013 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_THREAD_H
5 #define RUDIMENTS_THREAD_H
6
7 #include <rudiments/private/threadincludes.h>
8
9 class threadprivate;
10
12 class RUDIMENTS_DLLSPEC thread {
13 public:
15 thread();
16
18 virtual ~thread();
19
22 bool setStackSize(size_t stacksize);
23
26 bool getStackSize(size_t *stacksize);
27
32 bool spawn(void *(*function)(void *),
33 void *arg, bool detached);
34
40 void exit(int32_t *status);
41
47 bool wait(int32_t *status);
48
52 bool detach();
53
55 bool raiseSignal(int32_t signum);
56
59 static bool supportsThreads();
60
66 void retryFailedSpawn();
67
72 void dontRetryFailedSpawn();
73
76 bool getRetryFailedSpawn();
77
78 #include <rudiments/private/thread.h>
79 };
80
81 #endif
thread
Definition: thread.h:12