Rudiments
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  void setFunction(void *(*function)(void *));
23 
26  void setArgument(void *arg);
27 
30  bool setStackSize(size_t stacksize);
31 
34  bool getStackSize(size_t *stacksize);
35 
40  bool run();
41 
46  bool run(void *arg);
47 
52  void exit(int32_t *status);
53 
59  bool join(int32_t *status);
60 
64  bool detach();
65 
67  bool cancel();
68 
70  bool raiseSignal(int32_t signum);
71 
74  static bool supportsThreads();
75 
76  #include <rudiments/private/thread.h>
77 };
78 
79 #endif
Definition: thread.h:12