terminology - use 'thread id' instead of 'thread index'
[model-checker.git] / schedule.c
index c8f54e84e493b2c591d53a3b33bafdc850d64022..3b4d57cf1574500f75b267a49f6bf181e4a09a02 100644 (file)
@@ -23,8 +23,10 @@ static void enqueue_thread(struct thread *t)
        struct thread_list_node *node;
 
        for (node = nodes, i = 0; node->live && i < NUM_LIST_NODES; i++, node++);
-       if (i >= NUM_LIST_NODES)
+       if (i >= NUM_LIST_NODES) {
                printf("ran out of nodes\n");
+               exit(1);
+       }
        node->this = t;
        node->next = NULL;
        node->live = 1;
@@ -57,7 +59,7 @@ static struct thread *dequeue_thread(void)
 
 static void default_add_thread(struct thread *t)
 {
-       DEBUG("thread %d\n", t->index);
+       DEBUG("thread %d\n", t->id);
        enqueue_thread(t);
 }