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

Add a shared mutex / readers-write lock #265

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lhmouse
Copy link
Owner

@lhmouse lhmouse commented Oct 12, 2024

'New Folder'

Add the new type __MCF_shared_mutex, like POSIX pthread_rwlock_t.

  1. The mutex may be locked in either shared mode or exclusive mode.
  2. There is only one unlocking function.
  3. Writers are preferred and may preempt a mutex.

@lhmouse lhmouse self-assigned this Oct 12, 2024
@lhmouse lhmouse force-pushed the shared_mutex branch 2 times, most recently from 4f11bcf to a854abd Compare October 12, 2024 14:43
@lhmouse lhmouse force-pushed the shared_mutex branch 5 times, most recently from 9ca2031 to f6f4da7 Compare October 12, 2024 16:19
@lhmouse lhmouse force-pushed the shared_mutex branch 6 times, most recently from f42b54d to 219dd97 Compare October 13, 2024 07:31
@lhmouse lhmouse marked this pull request as ready for review October 13, 2024 07:32
@lhmouse lhmouse force-pushed the shared_mutex branch 4 times, most recently from d0c35ed to a7ae9ea Compare October 13, 2024 16:47
Signed-off-by: LIU Hao <lh_mouse@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant