semaphore.h: move mutex_t within the file.
rwlock.h: rephrase some comments
spinlock.h: replace assembly code in spinlock_unlock with C code.
io.h: add compiler barrier