SkillAgentSearch skills...

ReadWriteLock

A readers-prefered Read-Write lock written in C using POSIX semaphores.

Install / Use

/learn @JasonPap/ReadWriteLock
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

A portable Read-Write lock in C

This project aims to create a easy to use and portable read-write lock for C. This is implemented by using POSIX semaphores and "hide" the struct declaration to avoid missuse of the API provided.

This lock is readers-prefered, meaning that a writer will have to wait for every reader to finish before being able to acquire the lock. For more information on that see here.

I'm currently trying to make the destruction of the lock thread-safe. Until that is achieved the user of the API is responsible for releasing any lock before calling rwl_destroy().

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated7mo ago
Forks3

Languages

C

Security Score

77/100

Audited on Aug 20, 2025

No findings