#[repr(C)]
pub struct robust_list_head_t { pub list: robust_list_t, pub futex_offset: isize, pub list_op_pending: *mut robust_list_t, }
Expand description

Per-thread list head:

NOTE: this structure is part of the syscall ABI, and must only be changed if the change is first communicated with the glibc folks. (When an incompatible change is done, we’ll increase the structure size, which glibc will detect)

Fields§

§list: robust_list_t

The head of the list. Points back to itself if empty:

§futex_offset: isize

This relative offset is set by user-space, it gives the kernel the relative position of the futex field to examine. This way we keep userspace flexible, to freely shape its data-structure, without hardcoding any particular offset into the kernel:

§list_op_pending: *mut robust_list_t

The death of the thread may race with userspace setting up a lock’s links. So to handle this race, userspace first sets this field to the address of the to-be-taken lock, then does the lock acquire, and then adds itself to the list, and then clears this field. Hence the kernel will always have full knowledge of all locks that the thread might have taken. We check the owner TID in any case, so only truly owned locks will be handled.

Trait Implementations§

source§

impl Debug for robust_list_head_t

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.