diff options
author | rpj <rpj> | 1998-07-29 01:43:47 +0000 |
---|---|---|
committer | rpj <rpj> | 1998-07-29 01:43:47 +0000 |
commit | 0379281c3fc3bedede0177d43871ae5b1006eef7 (patch) | |
tree | 2225cae1200d5508d0a0264c542c87e397d51894 /create.c | |
parent | eca19329e11c472df9b62da0a643de6f90bb7f46 (diff) |
Wed Jul 29 11:39:03 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* cleanup.c (_pthread_handler_push): Same as below.
* create.c (pthread_create): Same as below.
* private.c (_pthread_new_thread): Rename "new" to "new_thread".
Since when has a C programmer been required to know C++?
Diffstat (limited to 'create.c')
-rw-r--r-- | create.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -56,21 +56,21 @@ pthread_create(pthread_t *thread, void * security = NULL; DWORD threadID; pthread_attr_t * attr_copy; - pthread_t new; + pthread_t new_thread; /* Success unless otherwise set. */ int ret; /* CRITICAL SECTION */ pthread_mutex_lock(&_pthread_table_mutex); - ret = _pthread_new_thread(&new); + ret = _pthread_new_thread(&new_thread); pthread_mutex_lock(&_pthread_table_mutex); /* END CRITICAL SECTION */ if (ret == 0) { - attr_copy = &(new->attr); + attr_copy = &(new_thread->attr); /* Map given attributes otherwise just use default values. */ if (attr != NULL) @@ -89,8 +89,8 @@ pthread_create(pthread_t *thread, } /* We call a generic wrapper which then calls the start routine. */ - new->call.routine = start_routine; - new->call.arg = arg; + new_thread->call.routine = start_routine; + new_thread->call.arg = arg; /* Start running, not suspended. */ flags = 0; @@ -98,7 +98,7 @@ pthread_create(pthread_t *thread, handle = (HANDLE) _beginthreadex(security, attr_copy->stacksize, _pthread_start_call, - (void *) new, + (void *) new_thread, flags, &threadID); @@ -115,9 +115,9 @@ pthread_create(pthread_t *thread, if (ret == 0) { /* Let the caller know the thread handle. */ - new->win32handle = handle; - new->ptstatus = _PTHREAD_INUSE; - *thread = new; + new_thread->win32handle = handle; + new_thread->ptstatus = _PTHREAD_INUSE; + *thread = new_thread; } else { @@ -125,7 +125,7 @@ pthread_create(pthread_t *thread, pthread_mutex_lock(&_pthread_table_mutex); /* Remove the failed thread entry. */ - _pthread_delete_thread(new); + _pthread_delete_thread(new_thread); pthread_mutex_lock(&_pthread_table_mutex); /* END CRITICAL SECTION */ |