Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cFiber.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cFiber_H
7 #define _INC_cFiber_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 #include "cThread.h"
12 
13 #if !defined(UNDER_CE) && defined(_MT) && defined(_WIN32)
15 
16 namespace GrayLib
17 {
18  UNITTEST2_PREDEF(cFiber);
19 
20  class GRAYLIB_LINK cFiber : public cRefBase, protected cNonCopyable
21  {
26 
27  public:
28  LPVOID m_pFiber;
29 
30  public:
31  cFiber() : m_pFiber(nullptr)
32  {
33  }
34  ~cFiber();
35 
36  // GetFiberData will retrieve lpParameter.
37  LPVOID CreateFiber(SIZE_T dwStackSize, LPFIBER_START_ROUTINE lpStartAddress, LPVOID lpParameter = nullptr);
38  LPVOID CreateFiberEx(SIZE_T dwStackSize, LPFIBER_START_ROUTINE lpStartAddress, LPVOID lpParameter = nullptr);
39 
43  static bool GRAYCALL IsCurrentThreadFiber();
44 
45  UNITTEST2_PREDEF(cFiber);
46  };
47 
48  class GRAYLIB_LINK cFiberManager
49  {
52  };
53 };
54 #endif
55 #endif
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cMesh.h:22
UNITTEST2_PREDEF(cQuadtree)