AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
thread.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef AJA_THREAD_H
9 #define AJA_THREAD_H
10 
11 #include "ajabase/common/public.h"
12 
13 // forward declarations
14 class AJAThread;
15 class AJAThreadImpl;
16 
17 
22 typedef void AJAThreadFunction(AJAThread* pThread, void* pContext);
23 
29 {
33 };
34 
35 
40 {
47 };
48 
49 
51 {
54 };
55 
56 
70 {
71 public:
72 
73  AJAThread();
74  virtual ~AJAThread();
75 
83  virtual AJAStatus Start();
84 
94  virtual AJAStatus Stop(uint32_t timeout = 0xffffffff);
95 
102  virtual AJAStatus Kill(uint32_t exitCode);
103 
110  virtual bool Active();
111 
118  virtual bool IsCurrentThread();
119 
128  virtual AJAStatus SetPriority(AJAThreadPriority priority);
129 
136  virtual AJAStatus GetPriority(AJAThreadPriority* pPriority);
137 
147  virtual AJAStatus SetRealTime(AJAThreadRealTimePolicy policy, int priority);
148 
159  virtual AJAStatus ThreadRun();
160 
169  virtual AJAStatus ThreadInit();
170 
179  virtual bool ThreadLoop();
180 
189  virtual AJAStatus ThreadFlush();
190 
199  virtual bool Terminate();
200 
211  virtual AJAStatus Attach(AJAThreadFunction* pThreadFunction, void* pUserContext);
212 
221  virtual AJAStatus SetThreadName(const char *name);
222 
228  static uint64_t GetThreadId();
229 
230 private:
231 
232  AJAThreadImpl* mpImpl;
233 };
234 
235 #endif // AJA_THREAD_H
AJAThreadPriority
Definition: thread.h:39
AJAStatus
Definition: types.h:380
#define AJA_EXPORT
Definition: export.h:34
AJAThreadRealTimePolicy
Definition: thread.h:50
Master header for the ajabase library.
void AJAThreadFunction(AJAThread *pThread, void *pContext)
Definition: thread.h:22
AJAThreadState
Definition: thread.h:28