locks: make posix_test_lock() interface more consistent