summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpj <rpj>2003-09-01 04:53:45 +0000
committerrpj <rpj>2003-09-01 04:53:45 +0000
commita5f3d62017a8e705016d0083a24837d6a56f178d (patch)
tree9bf9e8208ddb23ddda41c7ca31887929e58ca49a
parentbea8978fb8ab1a6d106fc6761b50fb55a98373d4 (diff)
Reuse the thread struct on failure.
-rw-r--r--ChangeLog5
-rw-r--r--pthread_self.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 23819b5..5232528 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-01 Ross Johnson <rpj@callisto.canberra.edu.au>
+
+ * pthread_self.c (pthread_self): The newly aquired pthread_t must be
+ assigned to the reuse stack, not freed, if the routine fails somehow.
+
2003-08-13 Ross Johnson <rpj@ise.canberra.edu.au>
* pthread_getschedparam.c (pthread_getschedparam): An invalid thread ID
diff --git a/pthread_self.c b/pthread_self.c
index bd67e83..e7a81b8 100644
--- a/pthread_self.c
+++ b/pthread_self.c
@@ -110,7 +110,8 @@ pthread_self (void)
FALSE,
DUPLICATE_SAME_ACCESS ) )
{
- free( self );
+ /* Thread structs are never freed. */
+ ptw32_threadReusePush(self);
return (NULL);
}
#endif