Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_threads is broken #224

Closed
roblabla opened this issue Mar 14, 2019 · 0 comments
Closed

test_threads is broken #224

roblabla opened this issue Mar 14, 2019 · 0 comments
Assignees
Labels
project-shell Related to the shell type-bug Something isn't working
Milestone

Comments

@roblabla
Copy link
Member

It appears to only runs thread A for some reason. The output of thread b is missing.

@roblabla roblabla added this to the KFS-6 milestone Mar 14, 2019
@roblabla roblabla added type-bug Something isn't working project-shell Related to the shell labels Mar 14, 2019
@Orycterope Orycterope self-assigned this Mar 14, 2019
roblabla pushed a commit to roblabla/KFS that referenced this issue Jul 20, 2019
The `test_threads` command used to display a seemingly random list
of variable number of As and Bs.
This was due to the fact that the `write!` macro internally makes
IPC calls, which reschedules the thread, while it is still holding
the lock.

When the concurrent threads gets to run, it sees that the lock is
held, so it does nothing and skips its turn silently.

We now make sure that every thread prints exactly 10 times,
not counting the rounds that are skipped.

This closes sunriseos#224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project-shell Related to the shell type-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants