summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-01-10 18:02:05 -0800
committerUlrich Drepper <drepper@redhat.com>2009-01-10 18:02:05 -0800
commit7e678fa3f6051f7ef24b4610c9a66cab858b6b6e (patch)
treefed33d7f4b2d3fe6651bf016e8cabcf26bbb1e42 /lib
parenta4b1a95434b90ed147e33363d92e24a035b6b775 (diff)
Require __thread support in compiler.
Rename --enable-tls to more appropriate --enable-thread-safety.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog6
-rw-r--r--lib/eu-config.h24
2 files changed, 9 insertions, 21 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index f4c261ab..8791640b 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-10 Ulrich Drepper <drepper@redhat.com>
+
+ * eu-config.h: Remove tls_key_t, key_create, getspecific, setspecific,
+ once_define, and once_execute macros. Use USE_LOCKS instead of
+ USE_TLS.
+
2008-08-25 Roland McGrath <roland@redhat.com>
* eu-config.h [USE_TLS] (RWLOCK_CALL): New macro.
diff --git a/lib/eu-config.h b/lib/eu-config.h
index c41cbb0c..03dba76a 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -1,5 +1,5 @@
/* Configuration definitions.
- Copyright (C) 2008 Red Hat, Inc.
+ Copyright (C) 2008, 2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -46,15 +46,9 @@
Network licensing program, please visit www.openinventionnetwork.com
<http://www.openinventionnetwork.com>. */
-#ifdef USE_TLS
+#ifdef USE_LOCKS
# include <pthread.h>
# include <assert.h>
-# define tls_key_t __thread void *
-# define key_create(keyp, freefct) (1)
-# define getspecific(key) key
-# define setspecific(key,val) key = val
-# define once_define(class,name) class struct { } name
-# define once_execute(name,fct) ((void) &name, (void) (fct))
# define rwlock_define(class,name) class pthread_rwlock_t name
# define RWLOCK_CALL(call) \
({ int _err = pthread_rwlock_ ## call; assert_perror (_err); })
@@ -67,25 +61,13 @@
/* Eventually we will allow multi-threaded applications to use the
libraries. Therefore we will add the necessary locking although
the macros used expand to nothing for now. */
-# define lock_lock(lock) ((void) (lock))
# define rwlock_define(class,name) class int name
# define rwlock_init(lock) ((void) (lock))
# define rwlock_fini(lock) ((void) (lock))
# define rwlock_rdlock(lock) ((void) (lock))
# define rwlock_wrlock(lock) ((void) (lock))
# define rwlock_unlock(lock) ((void) (lock))
-# define tls_key_t void *
-# define key_create(keyp, freefct) (1)
-# define getspecific(key) key
-# define setspecific(key,val) key = val
-# define once_define(class,name) class int name
-# define once_execute(name,fct) \
- do { \
- if (name == 0) \
- fct (); \
- name = 1; \
- } while (0)
-#endif /* USE_TLS */
+#endif /* USE_LOCKS */
/* gettext helper macro. */
#define N_(Str) Str