]> granicus.if.org Git - libatomic_ops/commit
Fix AO_pause sleep delay for particular argument values (Win32)
authorIvan Maidanski <ivmai@mail.ru>
Wed, 3 Oct 2012 14:02:03 +0000 (18:02 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 8 Oct 2012 15:37:44 +0000 (17:37 +0200)
commit6cda26f520640b2946ec1044b2985a1f9ee4df43
tree16855b7aca2e0d987737c185c25abb4ecd0132e1
parent0aeefbdd4e49c8a595d4de1810909a873049313b
Fix AO_pause sleep delay for particular argument values (Win32)

* src/atomic_ops.c (AO_pause): Fix millis value (passed to Win32
Sleep) for the case of 'n' argument in range between 12 and 21,
inclusive if AO_USE_WIN32_PTHREADS (sleep for 1 ms in this case).
* src/atomic_ops_stack.c (AO_pause): Evaluate 'msecs' value using the
same algorithm as in atomic_ops.c (Win32 only).
src/atomic_ops.c
src/atomic_ops_stack.c