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

mcslock: refine builtins to c11 atomic #21

Merged

Conversation

zondatw
Copy link
Contributor

@zondatw zondatw commented Aug 30, 2023

No description provided.

mcslock/tests.c Outdated
@@ -4,7 +4,7 @@

int main(void)
{
mcslock_t lock;
_Atomic(mcslock_t) lock;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a bit inconvenient. Users may regard mcslock_t as the userspace implementation of MCS lock and use mcslock_t without _Atomic.

Copy link
Contributor Author

@zondatw zondatw Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's inconvenient, and I moved definition of _Atomic for lock from test.c to msclock.h. Currently, users can use mcslock_t without _Atomic.

@jserv jserv merged commit cdf9eb4 into sysprog21:master Sep 2, 2023
@jserv
Copy link
Contributor

jserv commented Sep 2, 2023

Thank @zondatw for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants