diff options
author | Nikias Bassen | 2024-01-30 11:30:12 +0100 |
---|---|---|
committer | Nikias Bassen | 2024-01-30 11:30:12 +0100 |
commit | 7ddaea319550bd44bb295f935bef038a1ac37c3f (patch) | |
tree | 12c590e42fb3d367b7b9fb00a035cd03b4175602 /src/thread.c | |
parent | 2d517ebcebe326e79186e41ee7bbd1cf5ed1f2b9 (diff) | |
download | libimobiledevice-glue-7ddaea319550bd44bb295f935bef038a1ac37c3f.tar.gz libimobiledevice-glue-7ddaea319550bd44bb295f935bef038a1ac37c3f.tar.bz2 |
Move LIMD_GLUE_API definitions to public headers
Diffstat (limited to 'src/thread.c')
-rw-r--r-- | src/thread.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/thread.c b/src/thread.c index e2c3b63..50639dd 100644 --- a/src/thread.c +++ b/src/thread.c @@ -28,7 +28,7 @@ #include "common.h" #include "libimobiledevice-glue/thread.h" -LIBIMOBILEDEVICE_GLUE_API int thread_new(THREAD_T *thread, thread_func_t thread_func, void* data) +int thread_new(THREAD_T *thread, thread_func_t thread_func, void* data) { #ifdef WIN32 HANDLE th = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)(void*)thread_func, data, 0, NULL); @@ -43,7 +43,7 @@ LIBIMOBILEDEVICE_GLUE_API int thread_new(THREAD_T *thread, thread_func_t thread_ #endif } -LIBIMOBILEDEVICE_GLUE_API void thread_detach(THREAD_T thread) +void thread_detach(THREAD_T thread) { #ifdef WIN32 CloseHandle(thread); @@ -52,14 +52,14 @@ LIBIMOBILEDEVICE_GLUE_API void thread_detach(THREAD_T thread) #endif } -LIBIMOBILEDEVICE_GLUE_API void thread_free(THREAD_T thread) +void thread_free(THREAD_T thread) { #ifdef WIN32 CloseHandle(thread); #endif } -LIBIMOBILEDEVICE_GLUE_API int thread_join(THREAD_T thread) +int thread_join(THREAD_T thread) { /* wait for thread to complete */ #ifdef WIN32 @@ -69,7 +69,7 @@ LIBIMOBILEDEVICE_GLUE_API int thread_join(THREAD_T thread) #endif } -LIBIMOBILEDEVICE_GLUE_API int thread_alive(THREAD_T thread) +int thread_alive(THREAD_T thread) { if (!thread) return 0; @@ -80,7 +80,7 @@ LIBIMOBILEDEVICE_GLUE_API int thread_alive(THREAD_T thread) #endif } -LIBIMOBILEDEVICE_GLUE_API int thread_cancel(THREAD_T thread) +int thread_cancel(THREAD_T thread) { #ifdef WIN32 return -1; @@ -93,7 +93,7 @@ LIBIMOBILEDEVICE_GLUE_API int thread_cancel(THREAD_T thread) #endif } -LIBIMOBILEDEVICE_GLUE_API void mutex_init(mutex_t* mutex) +void mutex_init(mutex_t* mutex) { #ifdef WIN32 InitializeCriticalSection((LPCRITICAL_SECTION)mutex); @@ -102,7 +102,7 @@ LIBIMOBILEDEVICE_GLUE_API void mutex_init(mutex_t* mutex) #endif } -LIBIMOBILEDEVICE_GLUE_API void mutex_destroy(mutex_t* mutex) +void mutex_destroy(mutex_t* mutex) { #ifdef WIN32 DeleteCriticalSection((LPCRITICAL_SECTION)mutex); @@ -111,7 +111,7 @@ LIBIMOBILEDEVICE_GLUE_API void mutex_destroy(mutex_t* mutex) #endif } -LIBIMOBILEDEVICE_GLUE_API void mutex_lock(mutex_t* mutex) +void mutex_lock(mutex_t* mutex) { #ifdef WIN32 EnterCriticalSection((LPCRITICAL_SECTION)mutex); @@ -120,7 +120,7 @@ LIBIMOBILEDEVICE_GLUE_API void mutex_lock(mutex_t* mutex) #endif } -LIBIMOBILEDEVICE_GLUE_API void mutex_unlock(mutex_t* mutex) +void mutex_unlock(mutex_t* mutex) { #ifdef WIN32 LeaveCriticalSection((LPCRITICAL_SECTION)mutex); @@ -129,7 +129,7 @@ LIBIMOBILEDEVICE_GLUE_API void mutex_unlock(mutex_t* mutex) #endif } -LIBIMOBILEDEVICE_GLUE_API void thread_once(thread_once_t *once_control, void (*init_routine)(void)) +void thread_once(thread_once_t *once_control, void (*init_routine)(void)) { #ifdef WIN32 while (InterlockedExchange(&(once_control->lock), 1) != 0) { @@ -145,7 +145,7 @@ LIBIMOBILEDEVICE_GLUE_API void thread_once(thread_once_t *once_control, void (*i #endif } -LIBIMOBILEDEVICE_GLUE_API void cond_init(cond_t* cond) +void cond_init(cond_t* cond) { #ifdef WIN32 cond->sem = CreateSemaphore(NULL, 0, 32767, NULL); @@ -154,7 +154,7 @@ LIBIMOBILEDEVICE_GLUE_API void cond_init(cond_t* cond) #endif } -LIBIMOBILEDEVICE_GLUE_API void cond_destroy(cond_t* cond) +void cond_destroy(cond_t* cond) { #ifdef WIN32 CloseHandle(cond->sem); @@ -163,7 +163,7 @@ LIBIMOBILEDEVICE_GLUE_API void cond_destroy(cond_t* cond) #endif } -LIBIMOBILEDEVICE_GLUE_API int cond_signal(cond_t* cond) +int cond_signal(cond_t* cond) { #ifdef WIN32 int result = 0; @@ -176,7 +176,7 @@ LIBIMOBILEDEVICE_GLUE_API int cond_signal(cond_t* cond) #endif } -LIBIMOBILEDEVICE_GLUE_API int cond_wait(cond_t* cond, mutex_t* mutex) +int cond_wait(cond_t* cond, mutex_t* mutex) { #ifdef WIN32 mutex_unlock(mutex); @@ -192,7 +192,7 @@ LIBIMOBILEDEVICE_GLUE_API int cond_wait(cond_t* cond, mutex_t* mutex) #endif } -LIBIMOBILEDEVICE_GLUE_API int cond_wait_timeout(cond_t* cond, mutex_t* mutex, unsigned int timeout_ms) +int cond_wait_timeout(cond_t* cond, mutex_t* mutex, unsigned int timeout_ms) { #ifdef WIN32 mutex_unlock(mutex); |