Added rwlock lock/unlock functions

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>