WAIT_FOR_COMPLETION(9) Driver Basics WAIT_FOR_COMPLETION(9)NAME
wait_for_completion - waits for completion of a task
SYNOPSIS
void __sched wait_for_completion(struct completion * x);
ARGUMENTS
x
holds the state of this particular completion
DESCRIPTION
This waits to be signaled for completion of a specific task. It is NOT interruptible and there is no timeout.
See also similar routines (i.e. wait_for_completion_timeout) with timeout and interrupt capability. Also see complete.
COPYRIGHT Kernel Hackers Manual 2.6. July 2010 WAIT_FOR_COMPLETION(9)
Check Out this Related Man Page
SCHEDULE_HRTIMEOUT_R(9) Driver Basics SCHEDULE_HRTIMEOUT_R(9)NAME
schedule_hrtimeout_range - sleep until timeout
SYNOPSIS
int __sched schedule_hrtimeout_range(ktime_t * expires, unsigned long delta, const enum hrtimer_mode mode);
ARGUMENTS
expires
timeout value (ktime_t)
delta
slack in expires timeout (ktime_t)
mode
timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
DESCRIPTION
Make the current task sleep until the given expiry time has elapsed. The routine will return immediately unless the current task state has
been set (see set_current_state).
The delta argument gives the kernel the freedom to schedule the actual wakeup to a time that is both power and performance friendly. The
kernel give the normal best effort behavior for "expires+delta", but may decide to fire the timer earlier, but no earlier than expires.
You can set the task state as follows -
TASK_UNINTERRUPTIBLE - at least timeout time is guaranteed to pass before the routine returns.
TASK_INTERRUPTIBLE - the routine may return early if a signal is delivered to the current task.
The current task state is guaranteed to be TASK_RUNNING when this routine returns.
Returns 0 when the timer has expired otherwise -EINTR
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 SCHEDULE_HRTIMEOUT_R(9)
I wrote a simple program which will create a child process to execute a command and the output will be redirected to the file.
Please have a look at the following code ->
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
void execute(char **argv)
{
... (0 Replies)
Hello
I have a box with aix 5.3
if I type lsvg -l rootvg all my filesystems are sync except one
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 32 64 ... (16 Replies)
I need to write a perl script to execute external programs and grab the output and return code. Each program should be killed if it has not completed within X seconds.
Imagine that the script goes something like this :
@commands = &get_commands();
foreach $cmd (@commands) {
$pid =... (4 Replies)
Hi,
I have written a some six scripts to move large files and re-size them. This has been done step by step, taking backup, creating the new files, merging the files, removing the temporary files created.
Since these files are around 500 MB, each step takes somewhere between 1 to 5 mins.
... (1 Reply)
can anyone help me in this code i need something like this >>
near to this but simple
thanxxxx
/* ----------------------------------------------------------------- */
/* PROGRAM shell.c */
/* This program reads in an input line,... (2 Replies)
What are the pros & cons, if any, between using Perl's copy module vs OS's system cp, for copying a file to another directory? Or are they exactly the same?
1) Perl's File::Copy module, as in
copy ($filename, $dest_path) or die "ERROR: Cannot copy\n";
2)
if (system ("cp $filename,... (3 Replies)
Hello all,
New to C and I'm trying to write a program which can run a unix command. Would like to have the option of giving the user the ability to enter arguments e.g for "ls" be able to run "ls -l".
I would appreciate any help.
Thanks
#include <stdio.h>
#include <unistd.h>
#include... (3 Replies)
Hey friends,
I am trying to execute a simple hello world in mpi on MPICH2 on Rocks cluster. here is the c source code.
#include <mpi.h>
#include <stdio.h>
int main( int argc, char ** argv )
{
MPI_Init( NULL, NULL );
int world_size;
MPI_Comm_size( MPI_COMM_WORLD, &world_size );
... (4 Replies)
Hi
I have a scenario:
I have a directory say DIR1 (no sub directories) and have few files in that directory as given below:
app-cnd-imp-20150820.txt
app-cxyzm-imp-20150820.txt
app-petco-imp-20150820.txt
app-mobility-imp-20150820.txt
app-mobility-imp-20150821.txt... (7 Replies)
Hello All.
We are getting one zip file from another server daily. The size of the zip file will be around 4.5 gb that takes time to download completely. I have to process that file furthest once get downloaded completely. I have written one code for that, but i need suggestion whether it is a... (7 Replies)
Does anyone know why the below script is not working? Why is not the variable tot_files updated?
location=$1
cd "$location"
tot_files=0
(
echo ""
# recursively gets the total number of files
tot_files=$(for t in files ; do echo `find . -type ${t:0:1} | wc -l` $t | cut -f1... (12 Replies)
Hi,
Can we apply multi threading in Unix. I am using bash shell.
We have a generic script to load the data to table based on file input. For each file there is an individual table to load.
For each file found in directory I want to load the data in parallel to target table using
... (3 Replies)