Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

finish_wait(9) [centos man page]

FINISH_WAIT(9)							   Driver Basics						    FINISH_WAIT(9)

NAME
finish_wait - clean up after waiting in a queue SYNOPSIS
void finish_wait(wait_queue_head_t * q, wait_queue_t * wait); ARGUMENTS
q waitqueue waited on wait wait descriptor DESCRIPTION
Sets current thread back to running state and removes the wait descriptor from the given waitqueue if still queued. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 FINISH_WAIT(9)

Check Out this Related Man Page

DEL_TIMER_SYNC(9)						   Driver Basics						 DEL_TIMER_SYNC(9)

NAME
del_timer_sync - deactivate a timer and wait for the handler to finish. SYNOPSIS
int del_timer_sync(struct timer_list * timer); ARGUMENTS
timer the timer to be deactivated DESCRIPTION
This function only differs from del_timer on SMP: besides deactivating the timer it also makes sure the handler has finished executing on other CPUs. SYNCHRONIZATION RULES
Callers must prevent restarting of the timer, otherwise this function is meaningless. It must not be called from interrupt contexts unless the timer is an irqsafe one. The caller must not hold locks which would prevent completion of the timer's handler. The timer's handler must not call add_timer_on. Upon exit the timer is not queued and the handler is not running on any CPU. NOTE
For !irqsafe timers, you must not hold locks that are held in interrupt context while calling this function. Even if the lock has nothing to do with the timer in question. Here's why: CPU0 CPU1 ---- ---- <SOFTIRQ> call_timer_fn; base->running_timer = mytimer; spin_lock_irq(somelock); <IRQ> spin_lock(somelock); del_timer_sync(mytimer); while (base->running_timer == mytimer); Now del_timer_sync will never return and never release somelock. The interrupt on the other CPU is waiting to grab somelock but it has interrupted the softirq that CPU0 is waiting to finish. The function returns whether it has deactivated a pending timer or not. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 DEL_TIMER_SYNC(9)
Man Page

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

TCP_finwait2

Hi For All HELPE ME? I have HP UX 11i i Nous avons une paramètre system qui dure plus de 15 minute pour que le system libère les socle c'est une paramètre du noyau du system HpUx. Nous voulons réduire cette valeur par défaut pour avoir 2 ou 4 seconds au maximum. (2 Replies)
Discussion started by: beirouke
2 Replies

2. Shell Programming and Scripting

Limiting the hanging of a function inside a loop

#! /bin/ksh ..(some lines are here..) for t in (LIST) do a=function($t) #here I want to wait till the function hangs for 5 secs else want to continue the loop for other values of t. done if ;then ............. fi ...... ...................... Suppose in this script;... (7 Replies)
Discussion started by: Niroj
7 Replies

3. Shell Programming and Scripting

Script exits with $? not 0 randomly, how can I see what command failed?

Hi! I have this situation with 3 shellscripts. One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1. Script 1 in turn runs script 2 (import_catalogs_buyer.sh) Sometimes, seemingly... (2 Replies)
Discussion started by: trailsmoke
2 Replies

4. Shell Programming and Scripting

race condition with wait() function

Hi, I'm currently writing a bash script, that starts multiple threads: ____________________ #!/bin/bash loop=0 while((loop!=10)) do thread & ((loop++)) done #wait for all sub-processes (thread) to finish wait ___________________ Now I want to know, what happens, if a... (2 Replies)
Discussion started by: tho99
2 Replies

5. Shell Programming and Scripting

until loop fails.

i have a script like below, i am trying to print "...." until a background process that was executed before is running,, the below does work and teh loop keeps on printing "..", can someone help where i am wrong. /tmp/test/abc.sh & until do echo "..\c" done abc.sh is the scipt... (8 Replies)
Discussion started by: yesmani
8 Replies

6. Shell Programming and Scripting

Simple directory tree diff script

I have had some issues with a data drive and have copied all of the data to a new drive. The size used is not the same on both drives with a 3GB difference (less on the new drive). There are millions of files on the data drive, so it is not an easy task to determine if there are some files missing... (17 Replies)
Discussion started by: LMHmedchem
17 Replies

7. Shell Programming and Scripting

Need help in restarting process

Hi friends, I have one unix command which is used to check the network status manually. followig is the command check_Network this command give follwoing status Network 1 is ok Network 2 is ok network 3 is ok network 4 is ok . . . . Network 10 is... (8 Replies)
Discussion started by: Nakul_sh
8 Replies

8. Shell Programming and Scripting

How to determine the completion of a background process to trigger something else?

I've been thinking about a peculiar problem, and so far haven't been able to find out a convincing solution to that. To put it simply, I have a shell script (assume it to be parent_script.sh), calling another shell script (child_script.sh) 5 times, in nohup mode to be executed in the background.... (3 Replies)
Discussion started by: Aviktheory11
3 Replies