projects
/
cdsspec-compiler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
509ac9f
)
threads: introduce THREAD_ID_T_NONE
author
Brian Norris
<banorris@uci.edu>
Fri, 20 Apr 2012 06:28:41 +0000
(23:28 -0700)
committer
Brian Norris
<banorris@uci.edu>
Fri, 20 Apr 2012 06:28:41 +0000
(23:28 -0700)
Represents a kind of 'NULL' thread, but for integer IDs.
threads.h
patch
|
blob
|
history
tree.h
patch
|
blob
|
history
diff --git
a/threads.h
b/threads.h
index b973224d7a3d1e436de2d1b7dc20673b813916b6..9787c3fb9514fdf4eee5c84503f1aedcb0e2ad31 100644
(file)
--- a/
threads.h
+++ b/
threads.h
@@
-5,6
+5,8
@@
#include "libthreads.h"
+#define THREAD_ID_T_NONE -1
+
typedef enum thread_state {
THREAD_CREATED,
THREAD_RUNNING,
diff --git
a/tree.h
b/tree.h
index 6d37038e87a42f0c068d6d1e4107ad2b983c9230..676cbe4608923b12de245b947c142a64727bf26c 100644
(file)
--- a/
tree.h
+++ b/
tree.h
@@
-3,7
+3,7
@@
#include "threads.h"
typedef thread_id_t tree_t;
-#define TREE_T_NONE
-1
+#define TREE_T_NONE
THREAD_ID_T_NONE
/*
* An n-ary tree