- for (int i = 0; i < enabled_len; i++) {
- thread_id_t tid = int_to_id(i);
- if (n->has_priority(tid)) {
- DEBUG("Node (tid %d) has priority\n", i);
- //Have a thread with priority
- if (enabled[i] != THREAD_DISABLED)
- have_enabled_thread_with_priority = true;
- }
- }
+ for (int i = 0;i < enabled_len;i++) {
+ if (enabled[i] == THREAD_ENABLED)
+ thread_list[avail_threads++] = i;
+ else if (enabled[i] == THREAD_SLEEP_SET)
+ sleep_list[sleep_threads++] = i;
+ }