mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Make malloc build for no-threads configurations.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Basic platform-independent macro definitions for mutexes,
|
||||
thread-specific data and parameters for malloc.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -34,10 +34,11 @@
|
||||
be based on atomic test-and-set operations, for example. */
|
||||
typedef int mutex_t;
|
||||
|
||||
# define mutex_init(m) (*(m) = 0)
|
||||
# define mutex_lock(m) ((*(m) = 1), 0)
|
||||
# define mutex_trylock(m) (*(m) ? 1 : ((*(m) = 1), 0))
|
||||
# define mutex_unlock(m) (*(m) = 0)
|
||||
# define mutex_init(m) (*(m) = 0)
|
||||
# define mutex_lock(m) ((*(m) = 1), 0)
|
||||
# define mutex_trylock(m) (*(m) ? 1 : ((*(m) = 1), 0))
|
||||
# define mutex_unlock(m) (*(m) = 0)
|
||||
# define MUTEX_INITIALIZER (0)
|
||||
|
||||
typedef void *tsd_key_t;
|
||||
# define tsd_key_create(key, destr) do {} while(0)
|
||||
|
Reference in New Issue
Block a user