mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
Update.
2000-04-24 Ulrich Drepper <drepper@redhat.com> * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF. * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where necessary. * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
This commit is contained in:
parent
4ded1f0874
commit
9bf4d6404e
@ -1,3 +1,10 @@
|
||||
2000-04-24 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
|
||||
* sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
|
||||
necessary.
|
||||
* sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
|
||||
|
||||
2000-04-24 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* join.c (pthread_exit): Set p_terminated after reporting the
|
||||
|
@ -510,8 +510,8 @@ static void pthread_free(pthread_descr th)
|
||||
handle->h_descr = NULL;
|
||||
handle->h_bottom = (char *)(-1L);
|
||||
__pthread_spin_unlock(&handle->h_lock);
|
||||
#ifdef FREE_THREAD_SELF
|
||||
FREE_THREAD_SELF(th, th->p_nr);
|
||||
#ifdef FREE_THREAD
|
||||
FREE_THREAD(th, th->p_nr);
|
||||
#endif
|
||||
/* One fewer threads in __pthread_handles */
|
||||
__pthread_handles_num--;
|
||||
|
@ -64,4 +64,4 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
|
||||
|
||||
|
||||
/* Use the LDT implementation only if the kernel is fixed. */
|
||||
//#include "../useldt.h"
|
||||
#include "../useldt.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Special definitions for ix86 machine using segment register based
|
||||
thread descriptor.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>.
|
||||
|
||||
@ -65,15 +65,14 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
|
||||
{ nr, (unsigned long int) descr, sizeof (*descr), 1, 0, 0, 0, 0, 1, 0 }; \
|
||||
if (__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)) != 0) \
|
||||
abort (); \
|
||||
__asm__ __volatile__ ("movw %w0, %%gs" : : "r" (nr * 8 + 7)); \
|
||||
__asm__ __volatile__ ("movw %w0, %%gs" : : "q" (nr * 8 + 7)); \
|
||||
}
|
||||
|
||||
/* Free resources associated with thread descriptor. */
|
||||
#define FREE_THREAD_SELF(descr, nr) \
|
||||
#define FREE_THREAD(descr, nr) \
|
||||
{ \
|
||||
struct modify_ldt_ldt_s ldt_entry = \
|
||||
{ nr, 0, 0, 0, 0, 1, 0, 1, 0, 0 }; \
|
||||
__asm__ __volatile__ ("movw %w0,%%gs" : : "r" (0)); \
|
||||
__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); \
|
||||
}
|
||||
|
||||
@ -83,7 +82,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
|
||||
__typeof__ (descr->member) __value; \
|
||||
if (sizeof (__value) == 1) \
|
||||
__asm__ __volatile__ ("movb %%gs:%P2,%b0" \
|
||||
: "=r" (__value) \
|
||||
: "=q" (__value) \
|
||||
: "0" (0), \
|
||||
"i" (offsetof (struct _pthread_descr_struct, \
|
||||
member))); \
|
||||
@ -107,7 +106,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
|
||||
__typeof__ (descr->member) __value; \
|
||||
if (sizeof (__value) == 1) \
|
||||
__asm__ __volatile__ ("movb %%gs:(%2),%b0" \
|
||||
: "=r" (__value) \
|
||||
: "=q" (__value) \
|
||||
: "0" (0), \
|
||||
"r" (offsetof (struct _pthread_descr_struct, \
|
||||
member))); \
|
||||
@ -131,7 +130,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
|
||||
__typeof__ (descr->member) __value = (value); \
|
||||
if (sizeof (__value) == 1) \
|
||||
__asm__ __volatile__ ("movb %0,%%gs:%P1" : \
|
||||
: "r" (__value), \
|
||||
: "q" (__value), \
|
||||
"i" (offsetof (struct _pthread_descr_struct, \
|
||||
member))); \
|
||||
else \
|
||||
@ -153,7 +152,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
|
||||
__typeof__ (descr->member) __value = (value); \
|
||||
if (sizeof (__value) == 1) \
|
||||
__asm__ __volatile__ ("movb %0,%%gs:(%1)" : \
|
||||
: "r" (__value), \
|
||||
: "q" (__value), \
|
||||
"r" (offsetof (struct _pthread_descr_struct, \
|
||||
member))); \
|
||||
else \
|
||||
|
Loading…
Reference in New Issue
Block a user