diff options
Diffstat (limited to 'src/chthreads.c')
-rw-r--r-- | src/chthreads.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/chthreads.c b/src/chthreads.c index 56ab4969e..9729a9b59 100644 --- a/src/chthreads.c +++ b/src/chthreads.c @@ -28,7 +28,9 @@ * Initializes a thread structure.
*/
void _InitThread(t_prio prio, t_tmode mode, Thread *tp) {
+ static t_tid nextid = 0;
+ tp->p_tid = nextid++;
tp->p_flags = mode;
tp->p_prio = prio;
tp->p_rdymsg = RDY_OK;
|