1
// CLASSIFICATION: UNCLASSIFIED
6
/****************************************************************************/
7
/* RSC IDENTIFIER: Threads
11
* The purpose of THREADS is to provide support for multithreading.
12
* In order to lock a thread, a mutex can be created, locked and unlocked.
16
* Threads is intended for reuse by any application that requires multithreading
22
* None apply to this component.
26
* Threads has no restrictions.
30
* Threads was tested and certified in the following environments
39
* 12-12-05 Original Code
45
/***************************************************************************/
50
const long THREADS_NO_ERROR = 0x0000;
51
const long THREADS_CREATE_ERROR = 0x0001;
52
const long THREADS_LOCK_ERROR = 0x0002;
53
const long THREADS_UNLOCK_ERROR = 0x0004;
54
const long THREADS_DESTROY_ERROR = 0x0008;
57
/***************************************************************************/
63
/* ensure proper linkage to c++ programs */
71
typedef HANDLE Thread_Mutex;
74
long MSP_DTCC_API Threads_Create_Mutex(Thread_Mutex* thread_mutex);
78
long MSP_DTCC_API Threads_Lock_Mutex(Thread_Mutex thread_mutex);
81
/* Unlock the mutex */
82
long MSP_DTCC_API Threads_Unlock_Mutex(Thread_Mutex thread_mutex);
85
/* Destroy the mutex */
86
long MSP_DTCC_API Threads_Destroy_Mutex(Thread_Mutex thread_mutex);
91
typedef pthread_mutex_t Thread_Mutex;
94
long Threads_Create_Mutex(Thread_Mutex* thread_mutex);
98
long Threads_Lock_Mutex(Thread_Mutex thread_mutex);
101
/* Unlock the mutex */
102
long Threads_Unlock_Mutex(Thread_Mutex thread_mutex);
105
/* Destroy the mutex */
106
long Threads_Destroy_Mutex(Thread_Mutex thread_mutex);
118
#endif /* THREADS_H */
121
// CLASSIFICATION: UNCLASSIFIED