w32pthreads: Add pthread_once emulation
authorHendrik Leppkes <h.leppkes@gmail.com>
Wed, 7 Oct 2015 13:10:59 +0000 (15:10 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 7 Oct 2015 16:45:50 +0000 (18:45 +0200)
commitb22693b06d1e5d73454a65c203b4d31c1ca5b69a
treedaee9d44d9b3912ed9df54b1bcb1616ea570889d
parent8b830ee9a26d47b138f12a82085cdb372f407f1e
w32pthreads: Add pthread_once emulation

The emulation uses native InitOnce* APIs on Windows Vista+, and a
lock-free/allocation-free approach using atomics and spinning for
Windows XP.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
compat/w32pthreads.h