DCL 4.0
Loading...
Searching...
No Matches
Thread.cpp File Reference
#include <dcl/Config.h>
#include <sys/ioctl.h>
#include <sys/poll.h>
#include <sys/time.h>
#include <unistd.h>
#include <dcl/Thread.h>
#include <dcl/Exception.h>

Go to the source code of this file.

Macros

#define __LOCK_COUNT   7

Functions

__DCL_BEGIN_NAMESPACE IMPLEMENT_CLASSINFO (Thread, Object) String Thread
void __initializeThreadEnvironment ()
void __cleanupThreadEnvironment ()

Macro Definition Documentation

◆ __LOCK_COUNT

#define __LOCK_COUNT   7

Definition at line 259 of file Thread.cpp.

Function Documentation

◆ __cleanupThreadEnvironment()

void __cleanupThreadEnvironment ( )

Definition at line 324 of file Thread.cpp.

325{
326 __key_delete(__keyCurrentThread);
327
328 for (int i = 0; i < __LOCK_COUNT; i++)
329 __destroy(__lock[i]);
330}
#define __LOCK_COUNT
Definition Thread.cpp:259

◆ __initializeThreadEnvironment()

void __initializeThreadEnvironment ( )

Definition at line 316 of file Thread.cpp.

317{
318 __key_create(__keyCurrentThread);
319
320 for (int i = 0; i < __LOCK_COUNT; i++)
321 __init(__lock[i]);
322}

◆ IMPLEMENT_CLASSINFO()

__DCL_BEGIN_NAMESPACE IMPLEMENT_CLASSINFO ( Thread ,
Object  )

Definition at line 29 of file Thread.cpp.

32{
33 StringBuilder r = className() + __T(":");
34 if (__name.isEmpty())
35 r += __T("(noname)");
36 return r;
37}
38
39Thread::Thread(const char_t* _name /*= NULL*/)
40{
41#if __DCL_WINDOWS
42 __hThread = NULL;
43#endif
44
45 __threadId = 0;
46 if (_name)
47 __name = _name;
48}
#define NULL
Definition Config.h:340
wchar_t char_t
Definition Config.h:275
#define __T(str)
Definition Object.h:44
ByteString r