]> git.tdb.fi Git - libs/core.git/blob - source/core/types.h
Semaphore is now win32-compatible, I hope
[libs/core.git] / source / core / types.h
1 /*
2 This file is part of libmspframework
3 Copyright © 2006  Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
5 */
6 #ifndef MSP_FRAMEWORK_TYPES_H_
7 #define MSP_FRAMEWORK_TYPES_H_
8
9 #ifdef WIN32
10 #include <windows.h>
11 #else
12 #include <pthread.h>
13 #endif
14
15 namespace Msp {
16
17 #ifdef WIN32
18 typedef HANDLE ThreadHandle;
19 typedef HANDLE MutexHandle;
20 typedef HANDLE SemaphoreHandle;
21 #else
22 typedef pthread_t ThreadHandle;
23 typedef pthread_mutex_t MutexHandle;
24 typedef pthread_cond_t SemaphoreHandle;
25 #endif
26
27 } // namespace Msp
28
29 #endif