Make posix_spawn faster on Windows

This commit is contained in:
Justine Tunney 2023-08-20 02:13:02 -07:00
parent d6f72aa4a6
commit ec957491ea
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
15 changed files with 514 additions and 123 deletions

View file

@ -16,6 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/atomic.h"
#include "libc/cosmo.h"
#include "libc/errno.h"
#include "libc/intrin/atomic.h"
@ -35,7 +36,7 @@
*
* @return 0 on success, or errno on error
*/
errno_t cosmo_once(_Atomic(uint32_t) *once, void init(void)) {
errno_t cosmo_once(atomic_uint *once, void init(void)) {
uint32_t old;
switch ((old = atomic_load_explicit(once, memory_order_relaxed))) {
case INIT: