Fetch the koid current owner of a futex, if any.
#include <zircon/syscalls.h> zx_status_t zx_futex_get_owner(const zx_futex_t* value_ptr, zx_koid_t* koid);
Fetch the koid of the current owner of the futex identified by value_ptr, or ZX_KOID_INVALID if there is no current owner. Knowledge of the ownership of a futex typically serves no purpose when building synchronization primitives from futexes. This syscall is used primarily for testing.
See Ownership and Priority Inheritance in futex for details.
zx_futex_get_owner() returns ZX_OK on success, and koids hold the owner of
the futex at the time of the syscall, or ZX_KOID_INVALID if there was no
ZX_ERR_INVALID_ARGS One of the following is true:
- value_ptr is not a valid userspace pointer.
- value_ptr is not aligned to a
- koid is not a valid userspace pointer.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-20.