Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wait_event_interruptible_exclusive_locked_irq(9) [centos man page]

WAIT_EVENT_INTERRUPT(9) 					   Driver Basics					   WAIT_EVENT_INTERRUPT(9)

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_unlock(3)						     Library Functions Manual						    msem_unlock(3)

msem_unlock - Unlocks a semaphore LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/mman.h> int msem_unlock ( msemaphore *sem, int condition ); PARAMETERS
Points to an msemaphore structure which specifies the semaphore to be unlocked. Determines whether the msem_unlock() function unlocks the semaphore if no other processes are waiting to lock it. DESCRIPTION
The msem_unlock() function unlocks a binary semaphore. If the condition parameter is 0 (zero), the semaphore is unlocked, whether or not any other processes are currently attempting to lock it. If the condition parameter is MSEM_IF_WAITERS, and another process is waiting to lock the semaphore or it cannot be reliably determined whether some process is waiting to lock the semaphore, the semaphore is unlocked by the calling process. If the condition parameter is MSEM_IF_WAITERS, and no process is waiting to lock the semaphore, the semaphore will not be unlocked and an error will be returned. All calls to the msem_lock() and msem_unlock() functions by multiple processes sharing a common msemaphore structure behave as if the calls were serialized. If the msemaphore structure contains any value not resulting from a call to the msem_init() function followed by a (possibly empty) sequence of calls to the msem_lock() and msem_unlock() functions, the results are undefined. The address of an msemaphore structure may be significant. If the msemaphore structure contains any value copied from an msemaphore structure at a different address, the result is undefined. NOTES
On successful completion, the msem_unlock() function returns 0 (zero). On error, the msem_unlock() function returns -1 and sets errno to indicate the error. ERRORS
If the msem_unlock() function fails, errno may be set to one of the following values: MSEM_IF_WAITERS was specified and there were no wait- ers. The sem parameter points to an msemaphore structure which specifies a semaphore which has been removed, or the condition parameter is invalid. RELATED INFORMATION
Functions: msem_init(3), msem_lock(3), msem_remove(3) delim off msem_unlock(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers condition in Unix

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)
Discussion started by: abidmalik
9 Replies

2. Shell Programming and Scripting

need help in IF condition!!

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)
Discussion started by: raghav1982
18 Replies

3. Shell Programming and Scripting

Problem in using AND OR condition together

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)
Discussion started by: gokulraj23
11 Replies

4. Programming

Way to print a code with substituted macro..?

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)
Discussion started by: alex_5161
5 Replies

5. Shell Programming and Scripting

If condition problem

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)
Discussion started by: amit.mathur08
5 Replies

6. Shell Programming and Scripting

Double condition

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)
Discussion started by: GQiang
14 Replies

7. Emergency UNIX and Linux Support

if condition for file size

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)
Discussion started by: ajaypatil_am
7 Replies

8. Shell Programming and Scripting

Compare the two variable with if condition

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)
Discussion started by: aroragaurav.84
5 Replies

9. UNIX for Dummies Questions & Answers

if condition in ksh

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)
Discussion started by: jeanzibbin
6 Replies

10. Shell Programming and Scripting

Create Dynamic if condition

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)
Discussion started by: wahi80
7 Replies

11. UNIX for Dummies Questions & Answers

If else condition

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)
Discussion started by: vipin kumar rai
11 Replies

12. Shell Programming and Scripting

Not getting expected result

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)
Discussion started by: nalu
5 Replies

13. UNIX for Beginners Questions & Answers

If condition

hi what is different between two code below? what is the role of "./"? if ( -e wind ) then if ( -e ./wind ) then many thanks samad (5 Replies)
Discussion started by: abdossamad2003
5 Replies

14. UNIX for Beginners Questions & Answers

Change the field color based on condition in email

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)
Discussion started by: CatchMe
17 Replies

15. Shell Programming and Scripting

Trigger script based on condition

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 $val 1 & fi I need to trigger if the $code = JP then only to trigger nohup sh $val 1 & My try but wanted... (4 Replies)
Discussion started by: Master_Mind
4 Replies

Featured Tech Videos