libthreads: make typedef for 'thread_id_t'
authorBrian Norris <banorris@uci.edu>
Thu, 15 Mar 2012 22:42:36 +0000 (15:42 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 5 Apr 2012 17:05:44 +0000 (10:05 -0700)
Just in case we need to change it later on, let's use it as a named type.

libthreads.h

index aa7faf44d255452c172e2db2cf40919e4453b555..9d290a7ddf12162ce67fa2a20294da4e4034cfb8 100644 (file)
@@ -10,12 +10,14 @@ typedef enum thread_state {
        THREAD_COMPLETED
 } thread_state;
 
+typedef int thread_id_t;
+
 struct thread {
        void (*start_routine)();
        void *arg;
        ucontext_t context;
        void *stack;
-       int id;
+       thread_id_t id;
        thread_state state;
 };