Created
October 2, 2012 04:54
-
-
Save devyn/3816234 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef WINDOWS | |
typedef SAL_Thread HANDLE; | |
#elif POSIX | |
typedef SAL_Thread pthread_t; | |
#endif | |
SAL_Thread SAL_Thread_Create(SAL_Thread_StartAddress startAddress, void* startParameter) { | |
#ifdef WINDOWS | |
return CreateThread(null, 0, startAddress, startParameter, null, null); | |
#elif POSIX | |
pthread_t threadId; | |
pthread_create(&threadId, null, startAddress, startParameter); | |
return threadId; | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment