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  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 
62  void retryFailedSpawn();
63 
68  void dontRetryFailedSpawn();
69 
72  bool getRetryFailedSpawn();
73 
76  static bool supported();
77 
78  #include <rudiments/private/thread.h>
79 };
80 
81 #endif
Definition: thread.h:12