mirror of git://sourceware.org/git/glibc.git
parent
6f1cff95e7
commit
e3ec8904db
|
|
@ -1,5 +1,7 @@
|
||||||
2003-02-04 Ulrich Drepper <drepper@redhat.com>
|
2003-02-04 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* atomic.h: Add missing atomic_ prefixes.
|
||||||
|
|
||||||
* sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
|
* sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
|
||||||
thread library is available, use correct value to mark initialized
|
thread library is available, use correct value to mark initialized
|
||||||
once variable.
|
once variable.
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
#ifndef atomic_compare_and_exchange_rel
|
#ifndef atomic_compare_and_exchange_rel
|
||||||
# define atomic_compare_and_exchange_rel(mem, oldval, newval) \
|
# define atomic_compare_and_exchange_rel(mem, oldval, newval) \
|
||||||
compare_and_exchange_acq (mem, oldval, newval)
|
atomic_compare_and_exchange_acq (mem, oldval, newval)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -57,14 +57,15 @@
|
||||||
\
|
\
|
||||||
do \
|
do \
|
||||||
__oldval = (*__memp); \
|
__oldval = (*__memp); \
|
||||||
while (compare_and_exchange_acq (__memp, __oldval + __value, __oldval)); \
|
while (atomic_compare_and_exchange_acq (__memp, __oldval + __value, \
|
||||||
|
__oldval)); \
|
||||||
\
|
\
|
||||||
__value; })
|
__value; })
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef atomic_add
|
#ifndef atomic_add
|
||||||
# define atomic_add(mem, value) (void) exchange_and_add (mem, value)
|
# define atomic_add(mem, value) (void) atomic_exchange_and_add (mem, value)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -85,8 +86,9 @@
|
||||||
{ \
|
{ \
|
||||||
__typeof (*mem) __oldval = *__memp; \
|
__typeof (*mem) __oldval = *__memp; \
|
||||||
\
|
\
|
||||||
if (compare_and_exchange_acq (__memp, __oldval | 1 << bit, \
|
if (atomic_compare_and_exchange_acq (__memp, \
|
||||||
__oldval) == 0) \
|
__oldval | 1 << bit, \
|
||||||
|
__oldval) == 0) \
|
||||||
break; \
|
break; \
|
||||||
}})
|
}})
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
# Copyright (C) 2002, 2003 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
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
# The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with the GNU C Library; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
|
# 02111-1307 USA.
|
||||||
|
|
||||||
ifeq ($(subdir),csu)
|
ifeq ($(subdir),csu)
|
||||||
gen-as-const-headers += tcb-offsets.sym
|
gen-as-const-headers += tcb-offsets.sym
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue