threads: move thread_id_t definition and redefine thrd_t type
authorBrian Norris <banorris@uci.edu>
Tue, 1 May 2012 20:25:47 +0000 (13:25 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 1 May 2012 20:26:28 +0000 (13:26 -0700)
action.h
libthreads.h
threads.h

index 3eafaa99a9f971fe7111c8a640da32e7954d09c5..1bac4a4553fe32125633ed91e09b6e0705ea52b4 100644 (file)
--- a/action.h
+++ b/action.h
@@ -3,7 +3,7 @@
 
 #include <list>
 
-#include "libthreads.h"
+#include "threads.h"
 #include "libatomic.h"
 
 #define VALUE_NONE -1
index 4cf6ad352da0a47cd582a439f957c0d57a9b6528..a899881c3ee5185c94d3ad115ed90329e777699e 100644 (file)
@@ -5,10 +5,9 @@
 extern "C" {
 #endif
 
-       typedef int thread_id_t;
        typedef void (*thrd_start_t)();
 
-       typedef thread_id_t thrd_t;
+       typedef int thrd_t;
 
        int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
        int thrd_join(thrd_t);
index 7a21a30d8d93f49e4e0c13d37dfeb18f21260b47..38eac0a9cba43bc4107ee02f02eaaf4763b9595a 100644 (file)
--- a/threads.h
+++ b/threads.h
@@ -5,6 +5,8 @@
 
 #include "libthreads.h"
 
+typedef int thread_id_t;
+
 #define THREAD_ID_T_NONE       -1
 
 typedef enum thread_state {