-/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
pid_t pid;
/* List of robust mutexes the thread is holding. */
- pthread_mutex_t *robust_list;
+ struct __pthread_mutex_s *robust_list;
#ifdef __PTHREAD_MUTEX_HAVE_PREV
# define ENQUEUE_MUTEX(mutex) \
do { \
mutex->__data.__next = THREAD_GETMEM (THREAD_SELF, robust_list); \
- THREAD_SETMEM (THREAD_SELF, robust_list, mutex); \
+ THREAD_SETMEM (THREAD_SELF, robust_list, &mutex->__data); \
if (mutex->__data.__next != NULL) \
- mutex->__data.__next->__data.__prev = mutex; \
+ mutex->__data.__next->__prev = &mutex->__data; \
mutex->__data.__prev = NULL; \
} while (0)
# define DEQUEUE_MUTEX(mutex) \
if (mutex->__data.__prev == NULL) \
THREAD_SETMEM (THREAD_SELF, robust_list, mutex->__data.__next); \
else \
- mutex->__data.__prev->__data.__next = mutex->__data.__next; \
+ mutex->__data.__prev->__next = mutex->__data.__next; \
if (mutex->__data.__next != NULL) \
- mutex->__data.__next->__data.__prev = mutex->__data.__prev; \
+ mutex->__data.__next->__prev = mutex->__data.__prev; \
mutex->__data.__prev = NULL; \
mutex->__data.__next = NULL; \
} while (0)
# define ENQUEUE_MUTEX(mutex) \
do { \
mutex->__data.__next = THREAD_GETMEM (THREAD_SELF, robust_list); \
- THREAD_SETMEM (THREAD_SELF, robust_list, mutex); \
+ THREAD_SETMEM (THREAD_SELF, robust_list, &mutex->__data); \
} while (0)
# define DEQUEUE_MUTEX(mutex) \
do { \
- pthread_mutex_t *runp = THREAD_GETMEM (THREAD_SELF, robust_list); \
- if (runp == mutex) \
- THREAD_SETMEM (THREAD_SELF, robust_list, runp->__data.__next); \
+ struct pthread_mutex_s *runp = THREAD_GETMEM (THREAD_SELF, robust_list); \
+ if (runp == &mutex->__data) \
+ THREAD_SETMEM (THREAD_SELF, robust_list, runp->__next); \
else \
{ \
- while (runp->__data.__next != mutex) \
- runp = runp->__data.__next; \
+ while (runp->__next != &mutex->__data) \
+ runp = runp->__next; \
\
- runp->__data.__next = runp->__data.__next->__data.__next; \
+ runp->__next = runp->__next->__next; \
mutex->__data.__next = NULL; \
} \
} while (0)
/* Definition for thread-local data handling. nptl/IA-64 version.
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
typedef struct
{
dtv_t *dtv;
- void *private;
+ void *__private;
} tcbhead_t;
register struct pthread *__thread_self __asm__("r13");
# define GET_DTV(descr) \
(((tcbhead_t *) (descr))->dtv)
-#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->private)
+#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->__private)
#define THREAD_SYSINFO(pd) \
- (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->private)
+ (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->__private)
#if defined NEED_DL_SYSINFO
# define INIT_SYSINFO THREAD_SELF_SYSINFO = (void *) GLRO(dl_sysinfo)