-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCThreadData.cpp
More file actions
42 lines (38 loc) · 1.05 KB
/
Copy pathCThreadData.cpp
File metadata and controls
42 lines (38 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*********************************************************
*
* Multi Theft Auto: San Andreas - Deathmatch
*
* ml_base, External lua add-on module
*
* Copyright © 2003-2008 MTA. All Rights Reserved.
*
* Grand Theft Auto is © 2002-2003 Rockstar North
*
* THE FOLLOWING SOURCES ARE PART OF THE MULTI THEFT
* AUTO SOFTWARE DEVELOPMENT KIT AND ARE RELEASED AS
* OPEN SOURCE FILES. THESE FILES MAY BE USED AS LONG
* AS THE DEVELOPER AGREES TO THE LICENSE THAT IS
* PROVIDED WITH THIS PACKAGE.
*
*********************************************************/
#include "CThreadData.h"
CThreadData::CThreadData ( void )
{
bAbortThread = false;
// Initialize the mutexes
#ifdef WIN32 // Win32 threads
InitializeCriticalSection ( &MutexPrimary );
InitializeCriticalSection ( &MutexLogical );
#else // POSIX threads
pthread_mutex_init ( &MutexPrimary, NULL );
pthread_mutex_init ( &MutexLogical, NULL );
#endif
}
CThreadData::~CThreadData ( void )
{
#ifdef WIN32
DeleteCriticalSection ( &MutexPrimary );
DeleteCriticalSection ( &MutexLogical );
#else
#endif
}