Beam-lib  2.16.3
This is the Beam C++ class library.
BThread.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * BThread.h BThread Classes
3  * T.Barnaby, BEAM Ltd, 31/3/00
4  * Copyright (c) 2012 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
5  *******************************************************************************
6  */
7 #ifndef BTHREAD_H
8 #define BTHREAD_H 1
9 
10 #include <pthread.h>
11 
12 class BThread {
13 public:
14  BThread();
15  virtual ~BThread();
16 
17  // Prior to start setup
18  int setInitPriority(int policy, int priority);
19  int setInitStackSize(size_t stackSize);
20 
21  int start();
22  void* result();
23  int running();
24 
25  int setPriority(int policy, int priority);
26  int cancel();
27  void* waitForCompletion();
28  pthread_t getThread();
29 
30  virtual void* function();
31 private:
32  static void* startFunc(void*);
33 
34  pthread_t othread;
35  size_t ostackSize;
36  int opolicy;
37  int opriority;
38  int orunning;
39  void* oresult;
40 };
41 
42 #endif
int cancel()
Definition: BThread.cpp:82
int start()
Definition: BThread.cpp:50
void * waitForCompletion()
Definition: BThread.cpp:86
BThread()
Definition: BThread.cpp:22
int running()
Definition: BThread.cpp:74
int setPriority(int policy, int priority)
Definition: BThread.cpp:102
virtual ~BThread()
Definition: BThread.cpp:47
pthread_t getThread()
Definition: BThread.cpp:110
void * result()
Definition: BThread.cpp:70
int setInitPriority(int policy, int priority)
Definition: BThread.cpp:96
int setInitStackSize(size_t stackSize)
Definition: BThread.cpp:91
Definition: BThread.h:12