Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\semaphore.c Create Date:2022-07-28 09:47:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:down_interruptible - acquire the semaphore unless interrupted*@sem: the semaphore to be acquired* Attempts to acquire the semaphore. If no more tasks are allowed to* acquire the semaphore, calling this function will put the task to sleep.

Proto:int down_interruptible(struct semaphore *sem)

Type:int

Parameter:

TypeParameterName
struct semaphore *sem
78  result = 0
80  raw_spin_lock_irqsave( & lock, flags)
81  If Value is more likely to compile time(count > 0) Then count--
83  Else result = __down_interruptible(sem)
85  raw_spin_unlock_irqrestore( & lock, flags)
87  Return result