mutex/rwlock for VxWorks/linux

Use Semaphore in VxWorks and pthread_mutex_lock in linux