diff options
| author | Ulrich Drepper <[email protected]> | 2009-01-10 18:02:05 -0800 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2009-01-10 18:02:05 -0800 |
| commit | 7e678fa3f6051f7ef24b4610c9a66cab858b6b6e (patch) | |
| tree | fed33d7f4b2d3fe6651bf016e8cabcf26bbb1e42 /lib/eu-config.h | |
| parent | a4b1a95434b90ed147e33363d92e24a035b6b775 (diff) | |
Require __thread support in compiler.
Rename --enable-tls to more appropriate --enable-thread-safety.
Diffstat (limited to 'lib/eu-config.h')
| -rw-r--r-- | lib/eu-config.h | 24 |
1 files changed, 3 insertions, 21 deletions
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 |
