summaryrefslogtreecommitdiff
path: root/sysdeps/generic/malloc-machine.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-08-17 11:29:45 -0700
committerRoland McGrath <roland@hack.frob.com>2012-08-17 11:29:45 -0700
commit750c1f2a9aefc7b3329283c1b0c95e1a0bb88f14 (patch)
tree2901a662169f86b152d62b3a67b157e89fd022c1 /sysdeps/generic/malloc-machine.h
parent2ae1ae5cf441a90171ff483e3f0de6e8a9d611e4 (diff)
Make malloc build for no-threads configurations.
Diffstat (limited to 'sysdeps/generic/malloc-machine.h')
-rw-r--r--sysdeps/generic/malloc-machine.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/generic/malloc-machine.h
index 03e9de5fd8..851978a4de 100644
--- a/sysdeps/generic/malloc-machine.h
+++ b/sysdeps/generic/malloc-machine.h
@@ -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)