diff options
author | Chris Robinson <[email protected]> | 2014-04-17 01:24:03 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-17 01:24:03 -0700 |
commit | 47f5c436c8f5e55ebafd72dcd155b2a762bb18ca (patch) | |
tree | 3d8385d523a8380de390ce3a07a47fe56dd866be /Alc | |
parent | fbb4cbbe01b9ba2fa7b6c2450d2755c244d15151 (diff) |
Fix a signed-unsigned comparison warning and clarify a comment
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/threads.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/threads.c b/Alc/threads.c index cf9e5bed..3aef7ae8 100644 --- a/Alc/threads.c +++ b/Alc/threads.c @@ -143,7 +143,7 @@ int althrd_sleep(const struct timespec *ts, struct timespec* UNUSED(rem)) { DWORD msec; - if(ts->tv_sec < 0 || ts->tv_sec >= (0xffffffffu / 1000) || + if(ts->tv_sec < 0 || ts->tv_sec >= (0x7fffffff / 1000) || ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) return -2; @@ -200,10 +200,10 @@ int almtx_timedlock(almtx_t *mtx, const struct timespec *ts) /* An associative map of uint:void* pairs. The key is the TLS index (given by * TlsAlloc), and the value is the altss_dtor_t callback. When a thread exits, - * it iterates over the thread-local value for each TLS key and calls the - * destructor function if they're both not NULL. Placing a PIMAGE_TLS_CALLBACK - * function pointer in a ".CRT$XLx" section (where x is a character A to Z) - * ensures the CRT will call it similar to DllMain. + * we iterate over the TLS indices for their thread-local value and call the + * destructor function with it if they're both not NULL. To avoid using + * DllMain, a PIMAGE_TLS_CALLBACK function pointer is placed in a ".CRT$XLx" + * section (where x is a character A to Z) which will be called by the CRT. */ static UIntMap TlsDestructors = UINTMAP_STATIC_INITIALIZE; |