diff options
author | Roland McGrath <roland@gnu.org> | 2002-08-16 00:08:47 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-08-16 00:08:47 +0000 |
commit | c88b47593ad1ca29959ebb6dc76c738395ae8233 (patch) | |
tree | 0d6ebf3fab59b4ef0f835d1bfe96779125d7f479 /linuxthreads | |
parent | fc77d66abf6ed97a50e30b619b1647759d43f593 (diff) | |
download | glibc-c88b47593ad1ca29959ebb6dc76c738395ae8233.zip glibc-c88b47593ad1ca29959ebb6dc76c738395ae8233.tar.gz glibc-c88b47593ad1ca29959ebb6dc76c738395ae8233.tar.bz2 |
2002-08-16 Jakub Jelinek <jakub@redhat.com>
* locale/loadarchive.c (_nl_load_locale_from_archive): Braino fix
in change before last: MAX -> MIN.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 5 | ||||
-rw-r--r-- | linuxthreads/sysdeps/i386/tls.h | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 67be250..cd529e8 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,8 @@ +2002-08-15 Roland McGrath <roland@redhat.com> + + * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and + return a value as callers now expect. + 2002-08-11 Roland McGrath <roland@redhat.com> * pthread.c (__pthread_initialize_manager): Initialize diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h index 03d36de..3e7e4c3 100644 --- a/linuxthreads/sysdeps/i386/tls.h +++ b/linuxthreads/sysdeps/i386/tls.h @@ -122,8 +122,8 @@ typedef struct /* Code to initially initialize the thread pointer. This might need special attention since 'errno' is not yet available and if the operation can cause a failure 'errno' must not be touched. */ -# define TLS_INIT_TP(descr) \ - do { \ +# define TLS_INIT_TP(descr) \ + ({ \ void *_descr = (descr); \ tcbhead_t *head = _descr; \ int __gs; \ @@ -133,11 +133,13 @@ typedef struct head->self = _descr; \ \ __gs = TLS_SETUP_GS_SEGMENT (_descr); \ - if (__builtin_expect (__gs, 7) == -1) \ - /* Nothing else we can do. */ \ - asm ("hlt"); \ - asm ("movw %w0, %%gs" : : "q" (__gs)); \ - } while (0) + if (__builtin_expect (__gs, 7) != -1) \ + { \ + asm ("movw %w0, %%gs" : : "q" (__gs)); \ + __gs = 0; \ + } \ + __gs; \ + }) /* Return the address of the dtv for the current thread. */ |