diff options
author | Paul Jakma <paul@quagga.net> | 2009-06-30 16:12:49 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-06-30 16:12:49 +0100 |
commit | 41b2373cece77f0cc9a06fba076c99a7be653593 (patch) | |
tree | bed11b842b7a33e78e8c5012bf624946aeaf1edc /lib/thread.h | |
parent | bd2462425205a681d75e04c94a94bf4cea5da58b (diff) |
[lib/cleanup] Use a typedef for the thread type
* lib/thread.{c,h}: As per subject. This will avoid head-scratching for next
person who adds a thread-type and gets strange breakage.
Diffstat (limited to 'lib/thread.h')
-rw-r--r-- | lib/thread.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/thread.h b/lib/thread.h index 1c324d86..b52bc541 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -57,11 +57,13 @@ struct thread_master unsigned long alloc; }; +typedef unsigned char thread_type; + /* Thread itself. */ struct thread { - unsigned char type; /* thread type */ - unsigned char add_type; /* thread type */ + thread_type type; /* thread type */ + thread_type add_type; /* thread type */ struct thread *next; /* next pointer of the thread */ struct thread *prev; /* previous pointer of the thread */ struct thread_master *master; /* pointer to the struct thread_master. */ @@ -89,7 +91,7 @@ struct cpu_thread_history #ifdef HAVE_RUSAGE struct time_stats cpu; #endif - unsigned char types; + thread_type types; }; /* Clocks supported by Quagga */ |