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 3.10 June 2014 WAIT_FOR_COMPLETION(9)
Check Out this Related Man Page
USB_INTERRUPT_MSG(9) USB Core APIs USB_INTERRUPT_MSG(9)NAME
usb_interrupt_msg - Builds an interrupt urb, sends it off and waits for completion
SYNOPSIS
int usb_interrupt_msg(struct usb_device * usb_dev, unsigned int pipe, void * data, int len, int * actual_length, int timeout);
ARGUMENTS
usb_dev
pointer to the usb device to send the message to
pipe
endpoint "pipe" to send the message to
data
pointer to the data to send
len
length in bytes of the data to send
actual_length
pointer to a location to put the actual length transferred in bytes
timeout
time in msecs to wait for the message to complete before timing out (if 0 the wait is forever)
CONTEXT
!in_interrupt ()
DESCRIPTION
This function sends a simple interrupt message to a specified endpoint and waits for the message to complete, or timeout.
Don't use this function from within an interrupt context, like a bottom half handler. If you need an asynchronous message, or need to send
a message from within interrupt context, use usb_submit_urb If a thread in your driver uses this call, make sure your disconnect method can
wait for it to complete. Since you don't have a handle on the URB used, you can't cancel the request.
RETURN
If successful, 0. Otherwise a negative error number. The number of actual bytes transferred will be stored in the actual_length paramater.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 USB_INTERRUPT_MSG(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)