1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00
2000-07-12  Bruno Haible  <haible@clisp.cons.org>

	* iconv/gconv_open.c (__gconv_open): Merge duplicated code.

2000-07-12  Bruno Haible  <haible@clisp.cons.org>

	* iconv/gconv_builtin.c (__gconv_get_builtin_trans): Initialize
	__modname.

2000-07-12  Bruno Haible  <haible@clisp.cons.org>

	* iconv/gconv_open.c (__gconv_open): Initialize
	result->__steps[cnt].__data.

2000-07-12  Mark Kettenis  <kettenis@gnu.org>

	* nss/getent.c (services_keys): Pass port number in network byte
	order in call to getservbyport.

2000-07-11  Andreas Jaeger  <aj@suse.de>

	* stdlib/Makefile (test-canon-ARGS): Fix for building in the
	source dir.
	* intl/Makefile (do-gettext-test): Likewise.
	* dirent/Makefile (opendir-tst1-ARGS): Likewise.

2000-07-11  Andreas Schwab  <schwab@suse.de>

	* Makeconfig (run-program-prefix): New rule.
	(built-program-cmd): Use run-program-prefix.
This commit is contained in:
Ulrich Drepper
2000-07-12 20:06:44 +00:00
parent 50a6564365
commit 9f835f5fb4
22 changed files with 330 additions and 151 deletions

View File

@@ -105,7 +105,7 @@ static inline int __pthread_trylock (struct _pthread_fastlock * lock)
#if defined TEST_FOR_COMPARE_AND_SWAP
if (!__pthread_has_cas)
#endif
#if !defined HAS_COMPARE_AND_SWAP
#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
{
return (testandset(&lock->__spinlock) ? EBUSY : 0);
}
@@ -140,13 +140,26 @@ static inline void __pthread_alt_init_lock(struct _pthread_fastlock * lock)
static inline int __pthread_alt_trylock (struct _pthread_fastlock * lock)
{
#if defined HAS_COMPARE_AND_SWAP
long oldstatus;
#endif
#if defined TEST_FOR_COMPARE_AND_SWAP
if (!__pthread_has_cas)
#endif
#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
{
return (testandset(&lock->__spinlock) ? EBUSY : 0);
}
#endif
#if defined HAS_COMPARE_AND_SWAP
do {
oldstatus = lock->__status;
if (oldstatus != 0) return EBUSY;
} while(! compare_and_swap(&lock->__status, 0, 1, &lock->__spinlock));
return 0;
#endif
}
/* Initializers for both lock variants */