use lock_t for lock definitions