From 750c1f2a9aefc7b3329283c1b0c95e1a0bb88f14 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Aug 2012 11:29:45 -0700 Subject: Make malloc build for no-threads configurations. --- sysdeps/generic/malloc-machine.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sysdeps/generic') 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) -- cgit 1.4.1