[haiku-commits] r33937 - haiku/trunk/src/system/libroot/posix/pthread

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 7 Nov 2009 11:58:19 +0100 (CET)

Author: axeld
Date: 2009-11-07 11:58:18 +0100 (Sat, 07 Nov 2009)
New Revision: 33937
Changeset: http://dev.haiku-os.org/changeset/33937/haiku

Modified:
   haiku/trunk/src/system/libroot/posix/pthread/pthread.c
Log:
* Cleanup, no functional change.


Modified: haiku/trunk/src/system/libroot/posix/pthread/pthread.c
===================================================================
--- haiku/trunk/src/system/libroot/posix/pthread/pthread.c      2009-11-07 
10:53:19 UTC (rev 33936)
+++ haiku/trunk/src/system/libroot/posix/pthread/pthread.c      2009-11-07 
10:58:18 UTC (rev 33937)
@@ -4,6 +4,7 @@
  * Distributed under the terms of the MIT License.
  */
 
+
 #include "pthread_private.h"
 
 #include <signal.h>
@@ -32,13 +33,13 @@
 
 
 static void
-pthread_destroy_thread(void *data)
+pthread_destroy_thread(void* data)
 {
-       pthread_thread *thread = pthread_self();
+       pthread_thread* thread = pthread_self();
 
        // call cleanup handlers
        while (true) {
-               struct __pthread_cleanup_handler *handler
+               struct __pthread_cleanup_handler* handler
                        = __pthread_cleanup_pop_handler();
                if (handler == NULL)
                        break;
@@ -54,9 +55,9 @@
 
 
 static int32
-pthread_thread_entry(thread_func _unused, void *_thread)
+pthread_thread_entry(thread_func _unused, void* _thread)
 {
-       pthread_thread *thread = (pthread_thread *)_thread;
+       pthread_thread* thread = (pthread_thread*)_thread;
 
        // store thread data in TLS
        *tls_address(sPthreadSlot) = thread;
@@ -68,15 +69,15 @@
 }
 
 
-//     #pragma mark - public API
+// #pragma mark - public API
 
 
 int
-pthread_create(pthread_t *_thread, const pthread_attr_t *_attr,
-               void *(*startRoutine)(void*), void *arg)
+pthread_create(pthread_t* _thread, const pthread_attr_t* _attr,
+       void* (*startRoutine)(void*), void* arg)
 {
-       const pthread_attr *attr = NULL;
-       pthread_thread *thread;
+       const pthread_attr* attr = NULL;
+       pthread_thread* thread;
        struct thread_creation_attributes attributes;
 
        if (_thread == NULL)
@@ -90,7 +91,7 @@
                        return EINVAL;
        }
 
-       thread = (pthread_thread *)malloc(sizeof(pthread_thread));
+       thread = (pthread_thread*)malloc(sizeof(pthread_thread));
        if (thread == NULL)
                return EAGAIN;
 
@@ -136,12 +137,12 @@
 pthread_t
 pthread_self(void)
 {
-       pthread_thread *thread;
+       pthread_thread* thread;
 
        if (sPthreadSlot == -1)
                return &sMainThread;
 
-       thread = (pthread_thread *)tls_get(sPthreadSlot);
+       thread = (pthread_thread*)tls_get(sPthreadSlot);
        if (thread == NULL)
                return &sMainThread;
 
@@ -157,7 +158,7 @@
 
 
 int
-pthread_join(pthread_t thread, void **_value)
+pthread_join(pthread_t thread, void** _value)
 {
        status_t dummy;
        status_t error = wait_for_thread(thread->id, &dummy);
@@ -175,7 +176,7 @@
 
 
 void
-pthread_exit(void *value)
+pthread_exit(void* value)
 {
        pthread_self()->exit_value = value;
        exit_thread(B_OK);


Other related posts:

  • » [haiku-commits] r33937 - haiku/trunk/src/system/libroot/posix/pthread - axeld