summaryrefslogtreecommitdiff
path: root/pthread/pt-self.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread/pt-self.c')
-rw-r--r--pthread/pt-self.c7
1 files changed, 5 insertions, 2 deletions
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;
}