Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Will this project ever reach its goals? Probably not, but that's not the point.

## Notable Future Plans

- File servers (FUSE, 9P?).
- Implement 9P file servers. <-- Currently being worked on.
- Implement user system in user-space using namespaces.
- Improve `share()` and `claim()` security by specifying a target PID when sharing.
- Overhaul Desktop Window Manager to use the new security system and file servers?
Expand Down
8 changes: 6 additions & 2 deletions src/kernel/sched/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,19 @@ static thread_t* sched_first_eligible(sched_t* sched)
current = current->children[RBNODE_RIGHT];
}

#ifndef NDEBUG
if (!rbtree_is_empty(&sched->runqueue))
{
#ifndef NDEBUG
vclock_t vminEligible =
CONTAINER_OF_SAFE(rbtree_find_min(sched->runqueue.root), sched_client_t, node)->vminEligible;
panic(NULL, "No eligible threads found, vminEligible=%lld vtime=%lld", SCHED_FIXED_FROM(vminEligible),
SCHED_FIXED_FROM(sched->vtime));
}
#else
LOG_WARN("No eligible threads found, falling back to first thread in runqueue\n");
sched_client_t* first = CONTAINER_OF(rbtree_find_min(sched->runqueue.root), sched_client_t, node);
return CONTAINER_OF(first, thread_t, sched);
#endif
}

thread_t* victim = sched_steal();
if (victim != NULL)
Expand Down