summaryrefslogtreecommitdiff
path: root/pthread
diff options
context:
space:
mode:
Diffstat (limited to 'pthread')
-rw-r--r--pthread/pt-internal.h8
-rw-r--r--pthread/pt-self.c7
2 files changed, 13 insertions, 2 deletions
diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h
index 6d34be1..41fbc83 100644
--- a/pthread/pt-internal.h
+++ b/pthread/pt-internal.h
@@ -33,6 +33,8 @@
#include <pt-sysdep.h>
#include <pt-machdep.h>
+#include <sig-internal.h>
+
/* Thread state. */
enum pthread_state
{
@@ -50,6 +52,10 @@ enum pthread_state
# define PTHREAD_SYSDEP_MEMBERS
#endif
+#ifndef PTHREAD_SIGNAL_MEMBERS
+# define PTHREAD_SIGNAL_MEMBERS
+#endif
+
/* This structure describes a POSIX thread. */
struct __pthread
{
@@ -85,6 +91,8 @@ struct __pthread
PTHREAD_SYSDEP_MEMBERS
+ PTHREAD_SIGNAL_MEMBERS
+
struct __pthread *next, **prevp;
};
diff --git a/pthread/pt-self.c b/pthread/pt-self.c
index e14fe1e..4976864 100644
--- a/pthread/pt-self.c
+++ b/pthread/pt-self.c
@@ -1,5 +1,5 @@
/* Get calling thread's ID.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2008 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
@@ -25,5 +25,8 @@
pthread_t
pthread_self (void)
{
- return _pthread_self()->thread;
+ struct __pthread *self = _pthread_self ();
+ assert (self);
+
+ return self->thread;
}