aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/spinlock.c')
-rw-r--r--linuxthreads/spinlock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c
index 4ed4203970..6cd2679d98 100644
--- a/linuxthreads/spinlock.c
+++ b/linuxthreads/spinlock.c
@@ -478,7 +478,8 @@ int __pthread_alt_timedlock(struct _pthread_fastlock * lock,
newstatus = 1;
} else {
if (self == NULL)
- p_wait_node->thr = self;
+ self = thread_self();
+ p_wait_node->thr = self;
newstatus = (long) p_wait_node;
}
p_wait_node->abandoned = 0;