summaryrefslogtreecommitdiff
path: root/ptw32_new.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-05-17 01:38:02 +0000
committerrpj <rpj>2004-05-17 01:38:02 +0000
commit771465fed0cf50ee2dd790723245fc091699c324 (patch)
treed8c18d095a33fe7c4564bd90c5f313bb9e4057dd /ptw32_new.c
parent8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff)
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'ptw32_new.c')
-rw-r--r--ptw32_new.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/ptw32_new.c b/ptw32_new.c
index dc1d8e9..c2da5d5 100644
--- a/ptw32_new.c
+++ b/ptw32_new.c
@@ -46,7 +46,7 @@ ptw32_new (void)
/*
* If there's a reusable pthread_t then use it.
*/
- t = ptw32_threadReusePop();
+ t = ptw32_threadReusePop ();
if (NULL == t)
{
@@ -56,23 +56,21 @@ ptw32_new (void)
if (t != NULL)
{
t->sched_priority = THREAD_PRIORITY_NORMAL;
- t->detachState = PTHREAD_CREATE_JOINABLE;
- t->cancelState = PTHREAD_CANCEL_ENABLE;
- t->cancelType = PTHREAD_CANCEL_DEFERRED;
- t->cancelLock = PTHREAD_MUTEX_INITIALIZER;
- t->threadLock = PTHREAD_MUTEX_INITIALIZER;
- t->cancelEvent = CreateEvent (
- 0,
- (int) PTW32_TRUE, /* manualReset */
- (int) PTW32_FALSE, /* setSignaled */
- NULL);
+ t->detachState = PTHREAD_CREATE_JOINABLE;
+ t->cancelState = PTHREAD_CANCEL_ENABLE;
+ t->cancelType = PTHREAD_CANCEL_DEFERRED;
+ t->cancelLock = PTHREAD_MUTEX_INITIALIZER;
+ t->threadLock = PTHREAD_MUTEX_INITIALIZER;
+ t->cancelEvent = CreateEvent (0, (int) PTW32_TRUE, /* manualReset */
+ (int) PTW32_FALSE, /* setSignaled */
+ NULL);
if (t->cancelEvent == NULL)
{
/*
* Thread ID structs are never freed.
*/
- ptw32_threadReusePush(t);
+ ptw32_threadReusePush (t);
t = NULL;
}
}