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

Lock primitives should have a 'is_locked()' function. #5

Open
Arignir opened this issue Jan 9, 2018 · 2 comments
Open

Lock primitives should have a 'is_locked()' function. #5

Arignir opened this issue Jan 9, 2018 · 2 comments

Comments

@Arignir
Copy link
Owner

Arignir commented Jan 9, 2018

Lock primitives (spinlock, mutex, semaphore, rwlock) should all have their is_locked() function.

This could be used in debugging assertions to make sure some golden rules are respected all along the kernel (lots of functions are assuming that some datas are already locked etc.).

Biggest beneficiaries are the vaspace_* functions. They assumes current thread and current virtual address space are both locked as writers. If they aren't, undefined behavior may occur.

@Gaspard--
Copy link
Collaborator

is_locked would be proper english, so use that please 🙏

@Arignir
Copy link
Owner Author

Arignir commented Jan 9, 2018

I have updated the issue's description. Thanks. 👍

@Arignir Arignir changed the title Lock primitives should have a is_lock() function. Lock primitives should have a is_locked() function. Jan 9, 2018
@Arignir Arignir changed the title Lock primitives should have a is_locked() function. Lock primitives should have a 'is_locked()' function. Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants