Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\futex.c Create Date:2022-07-28 10:53:37
Last Modify:2020-03-17 15:28:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Drops a reference to the pi_state object and frees or caches it* when the last reference is gone.

Proto:static void put_pi_state(struct futex_pi_state *pi_state)

Type:void

Parameter:

TypeParameterName
struct futex_pi_state *pi_state
854  If Not pi_state Then Return
857  If Not _dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED Then Return
864  If owner Then
867  raw_spin_lock_irq( & wait_lock)
868  owner = owner
869  If owner Then
874  _mutex_proxy_unlock - release a lock on behalf of owner*@lock: the rt_mutex to be locked* No locking. Caller has to do serializing itself* Special API call for PI-futex support. This merrily cleans up the rtmutex* (debugging) state
875  raw_spin_unlock_irq( & wait_lock)
878  If pi_state_cache Then
879  kfree(pi_state)
880  Else
886  owner = NULL
887  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
888  pi_state_cache = pi_state
Caller
NameDescribe
futex_requeueex_requeue() - Requeue waiters from uaddr1 to uaddr2*@uaddr1: source futex user address*@flags: futex flags (FLAGS_SHARED, etc
unqueue_me_piPI futexes can not be requeued and must remove themself from the* hash bucket. The hash bucket lock (i.e. lock_ptr) is held on entry* and dropped here.
futex_lock_piUserspace tried a 0 -> TID atomic transition of the futex value* and failed. The kernel side here does the whole locking operation:* if there are waiters then it will block as a consequence of relying* on rt-mutexes, it does PI, etc
futex_unlock_piUserspace attempted a TID -> 0 atomic transition, and failed.* This is the in-kernel slowpath: we look up the PI state (if any),* and do the rt-mutex unlock.
futex_wait_requeue_piex_wait_requeue_pi() - Wait on uaddr and take uaddr2*@uaddr: the futex we initially wait on (non-pi)*@flags: futex flags (FLAGS_SHARED, FLAGS_CLOCKRT, etc