From 4b5e8b8c407354d94203a59fff8af59ce7d2b5e4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 17 Apr 2014 09:14:03 -0700 Subject: Don't inline al_nssleep --- Alc/threads.c | 13 +++++++++++-- OpenAL32/Include/threads.h | 13 ++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Alc/threads.c b/Alc/threads.c index b43b1889..35c66c6c 100644 --- a/Alc/threads.c +++ b/Alc/threads.c @@ -40,8 +40,6 @@ extern inline int almtx_trylock(almtx_t *mtx); extern inline void *altss_get(altss_t tss_id); extern inline int altss_set(altss_t tss_id, void *val); -extern inline void al_nssleep(time_t sec, long nsec); - #define THREAD_STACK_SIZE (1*1024*1024) /* 1MB */ @@ -462,3 +460,14 @@ int altimespec_get(struct timespec *ts, int base) } #endif + + +void al_nssleep(time_t sec, long nsec) +{ + struct timespec ts, rem; + ts.tv_sec = sec; + ts.tv_nsec = nsec; + + while(althrd_sleep(&ts, &rem) == -1) + ts = rem; +} diff --git a/OpenAL32/Include/threads.h b/OpenAL32/Include/threads.h index e021f7a5..762e5b15 100644 --- a/OpenAL32/Include/threads.h +++ b/OpenAL32/Include/threads.h @@ -212,18 +212,9 @@ void altss_delete(altss_t tss_id); int altimespec_get(struct timespec *ts, int base); +void al_nssleep(time_t sec, long nsec); -void SetThreadName(const char *name); - - -inline void al_nssleep(time_t sec, long nsec) -{ - struct timespec ts, rem; - ts.tv_sec = sec; - ts.tv_nsec = nsec; - while(althrd_sleep(&ts, &rem) == -1) - ts = rem; -} +void SetThreadName(const char *name); #endif /* AL_THREADS_H */ -- cgit v1.2.3