[llvm-commits] [parallel] CVS: llvm/runtime/libthread/threadlib.c threadlib.h
Misha Brukman
brukman at cs.uiuc.edu
Fri Apr 16 12:24:01 PDT 2004
Changes in directory llvm/runtime/libthread:
threadlib.c updated: 1.1.2.1 -> 1.1.2.2
threadlib.h updated: 1.1.2.1 -> 1.1.2.2
---
Log message:
* Return a thread ID, not an error code, as per Chris' suggestion ;)
* pthread_t is an unsigned long, not just a measly int
---
Diffs of the changes: (+6 -5)
Index: llvm/runtime/libthread/threadlib.c
diff -u llvm/runtime/libthread/threadlib.c:1.1.2.1 llvm/runtime/libthread/threadlib.c:1.1.2.2
--- llvm/runtime/libthread/threadlib.c:1.1.2.1 Fri Apr 16 12:17:26 2004
+++ llvm/runtime/libthread/threadlib.c Fri Apr 16 12:23:24 2004
@@ -1,12 +1,13 @@
#include "threadlib.h"
#include <pthread.h>
-int __llvm_thread_start(void*(*fn)(void*), void* arg) {
+unsigned long __llvm_thread_start(void*(*fn)(void*), void* arg) {
pthread_t pt;
- return pthread_create(&pt, 0, fn, arg);
+ pthread_create(&pt, 0, fn, arg);
+ return pt;
}
-void __llvm_thread_join(int thread_id) {
+void __llvm_thread_join(unsigned long thread_id) {
pthread_join(thread_id, 0);
}
Index: llvm/runtime/libthread/threadlib.h
diff -u llvm/runtime/libthread/threadlib.h:1.1.2.1 llvm/runtime/libthread/threadlib.h:1.1.2.2
--- llvm/runtime/libthread/threadlib.h:1.1.2.1 Fri Apr 16 12:17:26 2004
+++ llvm/runtime/libthread/threadlib.h Fri Apr 16 12:23:24 2004
@@ -1,8 +1,8 @@
#ifndef THREADLIB_H
#define THREADLIB_H
-int __llvm_thread_start(void*(*fn)(void*), void* arg);
+unsigned long __llvm_thread_start(void*(*fn)(void*), void* arg);
-void __llvm_thread_join(int thread_id);
+void __llvm_thread_join(unsigned long thread_id);
#endif
More information about the llvm-commits
mailing list