wait_event_interruptible_exclusive_locked_irq(9) [centos man page]
WAIT_EVENT_INTERRUPT(9) Driver Basics WAIT_EVENT_INTERRUPT(9)NAME
wait_event_interruptible_exclusive_locked_irq - sleep until a condition gets true
SYNOPSIS
wait_event_interruptible_exclusive_locked_irq(wq, condition);
ARGUMENTS
wq
the waitqueue to wait on
condition
a C expression for the event to wait for
DESCRIPTION
The process is put to sleep (TASK_INTERRUPTIBLE) until the condition evaluates to true or a signal is received. The condition is checked
each time the waitqueue wq is woken up.
It must be called with wq.lock being held. This spinlock is unlocked while sleeping but condition testing is done while lock is held and
when this macro exits the lock is held.
The lock is locked/unlocked using spin_lock_irq/spin_unlock_irq functions which must match the way they are locked/unlocked outside of this
macro.
The process is put on the wait queue with an WQ_FLAG_EXCLUSIVE flag set thus when other process waits process on the list if this process
is awaken further processes are not considered.
wake_up_locked has to be called after changing any variable that could change the result of the wait condition.
The function will return -ERESTARTSYS if it was interrupted by a signal and 0 if condition evaluated to true.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 WAIT_EVENT_INTERRUPT(9)
Check Out this Related Man Page
msem_lock(2) System Calls Manual msem_lock(2)NAME
msem_lock() - lock a semaphore
SYNOPSIS DESCRIPTION
attempts to lock a binary semaphore.
sem points to an structure which specifies the semaphore to be locked.
If the semaphore is not currently locked, it becomes locked and the function returns successfully.
If the semaphore is currently locked, and condition is then the function returns with an error. If the semaphore is currently locked and
condition is zero, the function does not return until either the calling process is able to successfully lock the semaphore, or an error
condition occurs.
All calls to and by multiple processes sharing a common structure behave as if the calls were serialized.
If the structure contains any value not resulting from a call to followed by a (possibly empty) sequence of calls to and the results are
undefined. The address of an uniquely identifies the semaphore. If the structure contains any value copied from an structure at a differ-
ent address, the result is undefined.
IMPLEMENTATION NOTES
If blocked on a locked semaphore, suspends the calling process at a priority such that the process can be interrupted by a signal.
The system attempts to ignore or recover from invalid values written to the structure, but this is not guaranteed for all cases.
successfully acquires a semaphore that is locked by a process that has exited.
RETURN VALUE
returns one of the following values:
Success.
Failure.
is set to indicate the error.
ERRORS
sets to one of the following values if the corresponding condition is encountered.
was specified and the semaphore was already locked.
sem points to an structure that has been removed, or condition is invalid.
was interrupted by a signal that was caught.
The semaphore is currently locked,
condition is zero, and waiting to lock the semaphore would create a deadlock.
sem is not a properly aligned address or is otherwise an invalid pointer.
AUTHOR
was developed by HP and OSF.
SEE ALSO msem_init(2), msem_remove(2), msem_unlock(2), mman(5).
STANDARDS CONFORMANCE msem_lock(2)
Hey guyes!
i have a little problem in if condition, can anybody please solve my problem?
Here what i am doing.
if
then
echo "int1 is equal to int2"
elif
then
echo "int1 is greater than int2"
else
echo "int1 is smaller than int2"
fiNo, matter int1 is smaller than... (9 Replies)
Hi All ,,
This is my code .. i am checcking a file temp66.txt , when i execute this
shell it checks whether the file is 0 byte file or not ..
if it is a 0 byte file , then Program exists out else it Prints the Echo Statement ..
if then
RET_CODE=$?
if then
echo 'File... (18 Replies)
a=rhino
b=crocodil
c=testsc
if && "$c" = testsc ]
then
echo "Test #5 succeeds."
else
echo "Test #5 fails."
fi
i need to test or condition before check the output with AND condition. ur help is much appreciated... (11 Replies)
Is there any way to produce a code with all use dmacro to be substituted up to 'ready for compilation' condition?
Some macro are build up and it is hard to replace all them up to final code by hand.
I need to see the final line after all macro been applied by preprocessor.
How that could be... (5 Replies)
Hi,
I need to use if condition for search a file pattern on a particular location.
cd $file_Path
if ||
then
do this
else
do that
fi
Can someone help me with the if part, how i can put those conditions?
make sure format should be *.file* and *.file
file is a keyword which i... (5 Replies)
I trying to prevent user from entering empty string and alphabet, but i can do only on of either one cannot seem to make a double condition =.= Any one can help me?? Thank in advance
while expr "$sold" : "*" > /dev/null ; #check for int
do
echo "Number only!"
echo "No. of copies sold : "... (14 Replies)
i want to put if condition for particular statement. The statement should only execute if particular file size is < 4 kb.
Please let me know the correct way. (7 Replies)
Please help me with this:
I need to compare two values in if condition in shell script but its goes always to else condition:
TIME_CHECK=PM
TIME-CLOCK=PM
if ; then
echo "You have access!"
else
echo "ACCESS DENIED!"
fi (5 Replies)
in my code if condition is not working.
i am using array in the if condition
the code:
set -A rt 0 1 7 13 21
echo "Please enter a choice"
read choice;
for i in 0 1 2 3 4
do
if }]
then
echo "something"
fi
done (6 Replies)
Create Dynamic If condition
Hi,
I have a file color.txt which has data as shown below
Red
Blue
Green
Yellow
White
Pink
Black
Based on a variable I execute a tail command as shown below
tail -${LEFT_OVR} color.txt
LEFT_OVR can be any number less than count of number of lines in a... (7 Replies)
Hi,
I am writing a script and using if condition as per below example.
echo $abspath
echo if ]
then
echo "file exist"
fi
but this never satisfy the condition even if i am giving correct path to it. and this works on command prompt correctly.
Please help me out in finding the root... (11 Replies)
Hi Experts,
I have written the below script but its not working as per expectation.
My requirement is if this condition ] is satisfied
then only check for this condition ] if this also satisfied check for the condition ].
vi p_values.ksh
path="/db/ora/files"
mode=1
b_days=10... (5 Replies)
Request your help to change the field color based on condition , if it is otherthan 0. using html in unix.
Here is my condition
for(i=1;i<=NF;i++)
{
print "<td> "$i"</td>
}
Please use CODE tags when displaying sample input, output, and code segments. (17 Replies)
Hi Guys,
I am having below code which runs based on condition, Is it possible to check condition at the time of trigger
code=$1
if ;then
nohup sh script.sh $val 1 &
fi
I need to trigger if the $code = JP then only to trigger nohup sh script.sh $val 1 &
My try but wanted... (4 Replies)