When using the ReadWriteLock you should always wait for all threads to unlock then call rwl_destroy().
Currently if rwl_destroy() is called while another thread is waiting on one of the semaphores, the function will still destroy the semaphore leaving the other thread in an undefined state.
This should be fixed in order to make this API truly thread-safe.
With that in mind I implemented the isActive() function but it is currently unused.
When using the ReadWriteLock you should always wait for all threads to unlock then call rwl_destroy().
Currently if rwl_destroy() is called while another thread is waiting on one of the semaphores, the function will still destroy the semaphore leaving the other thread in an undefined state.
This should be fixed in order to make this API truly thread-safe.
With that in mind I implemented the isActive() function but it is currently unused.