Lightweight locks. 2 times faster than pthrad_mutex lock/unlock