Decrease lines count

fix-mingw
Nakidai 2023-12-01 23:11:01 +03:00
parent 1685dc927b
commit f70e3d949a
1 changed files with 3 additions and 6 deletions

View File

@ -17,16 +17,13 @@ typedef void* ThreadR;
#endif /* _WIN32 */ #endif /* _WIN32 */
typedef ThreadR (*Thread)(void *); typedef ThreadR (*Thread)(void *);
static inline void threadCreate(Thread function, void *args)
{
#ifdef _WIN32 #ifdef _WIN32
static inline void threadCreate(Thread function, void *args)
{
_beginthread(function, 0, args); _beginthread(function, 0, args);
}
#else #else
static inline void threadCreate(Thread function, void *args)
{
pthread_create(&(pthread_t){0}, 0, function, args); pthread_create(&(pthread_t){0}, 0, function, args);
}
#endif /* _WIN32 */ #endif /* _WIN32 */
}
#endif /* __THREAD_H__ */ #endif /* __THREAD_H__ */