COMPLETE(9) Driver Basics COMPLETE(9)NAME
complete - signals a single thread waiting on this completion
SYNOPSIS
void complete(struct completion * x);
ARGUMENTS
x
holds the state of this particular completion
DESCRIPTION
This will wake up a single thread waiting on this completion. Threads will be awakened in the same order in which they were queued.
See also complete_all, wait_for_completion and related routines.
It may be assumed that this function implies a write memory barrier before changing the task state if and only if any tasks are woken up.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 COMPLETE(9)
Check Out this Related Man Page
pthread_barrier_wait(3C) Standard C Library Functions pthread_barrier_wait(3C)NAME
pthread_barrier_wait - synchronize at a barrier
SYNOPSIS
cc -mt [ flag... ] file... [ library... ]
#include <pthread.h>
int pthread_barrier_wait(pthread_barrier_t *barrier);
DESCRIPTION
The pthread_barrier_wait() function synchronizes participating threads at the barrier referenced by barrier. The calling thread blocks
until the required number of threads have called pthread_barrier_wait() specifying the barrier.
When the required number of threads have called pthread_barrier_wait() specifying the barrier, the constant PTHREAD_BARRIER_SERIAL_THREAD
is returned to one unspecified thread and 0 is returned to each of the remaining threads. At this point, the barrier is reset to the state
it had as a result of the most recent pthread_barrier_init(3C) function that referenced it.
The constant PTHREAD_BARRIER_SERIAL_THREAD is defined in <pthread.h> and its value is distinct from any other value returned by
pthread_barrier_wait().
The results are undefined if this function is called with an uninitialized barrier.
If a signal is delivered to a thread blocked on a barrier, upon return from the signal handler the thread resumes waiting at the barrier if
the barrier wait has not completed (that is, if the required number of threads have not arrived at the barrier during the execution of the
signal handler); otherwise, the thread continues as normal from the completed barrier wait. Until the thread in the signal handler returns
from it, it is unspecified whether other threads may proceed past the barrier once they have all reached it.
A thread that has blocked on a barrier does not prevent any unblocked thread that is eligible to use the same processing resources from
eventually making forward progress in its execution.
Eligibility for processing resources is determined by the scheduling policy.
RETURN VALUES
Upon successful completion, the pthread_barrier_wait() function returns PTHREAD_BARRIER_SERIAL_THREAD for a single (arbitrary) thread syn-
chronized at the barrier and 0 for each of the other threads. Otherwise, an error number is returned to indicate the error.
ERRORS
The pthread_barrier_wait() function will fail if:
EINVAL The value specified by barrier does not refer to an initialized barrier object.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO pthread_barrier_destroy(3C), attributes(5), standards(5)SunOS 5.10 30 Jan 2004 pthread_barrier_wait(3C)
Hi,
I am an NT MCSE who has decided to abandon the MSCE Win2K path and take the UNIX/Linux Path.
But since I am very new to that field, I am not sure exactly what Certification I should get that would cover the biggest area of that field as possible. Not to mention if I should got with... (10 Replies)
ok, i've figured out my problem with distributed, in Solaris GUI if you click on a tar file it will untar it for you, using paramiters I don't know.
now, I've got a tar file in / called
dnetc-solaris26-x86.tar
i want to install it to the "/Veitch" directory
how exactly do I use the tar... (17 Replies)
I receive files by FTP in an input directory. Every 10 seconds a process checks if some new file has arrived to the input directory and then the process moves them to another directory to be read by a second process.
The problem is that there is no way to know if the download has finished... (11 Replies)
Hi all,
I wrote this shell script to validate filed numbers for input file. But it take forever to complete validation on a file. The average speed is like 9mins/MB.
Can anyone tell me how to improve the performance of a shell script?
Thanks (12 Replies)
how would a make a complete backup of all files spanning all file systems on my SCO box to tape?
i read somewhere:
find . -print | cpio -ocv > /dev/rStp0
from / ... will this do it??
(yes /dev/rStp0 is my tape drive) (11 Replies)
Hi
Is there any way GREP command can return word and not complete line.
My file has following data:
Hello Everyone I am NitinrajSrivastava
Hi Friends Welcome VrajSrivastava
I am using grep 'raj' which is returning me complete line.However I want only the word having keyword 'raj'.
Required... (11 Replies)
Hi Friends,
I don't have much experience in shell scripting & have a urgent scripting job to complete. Need your help to do the following.
I have a input file like below:
CDR #1
----------
Name James
Age 30
Country Japan
CDR #2
----------
Name Robin
Age 31
Country Germany
... (18 Replies)
Hi,
I'm unable to execute the below command completely ; it's not allowing me to type the complete command. It is allowing till "xargs" and i cannot even press enter after that.
I'm using Solaris. Let me know if anything needs to be added so as to execute the complete command. Appreciate... (12 Replies)
Hi,
When I query using ps -ef, the complete command is not displayed and is truncated.
Can you please tell me a method to resolve this ?
I have tried the below.
ps -ef | cat
ps -ef | grep imp >/tmp/t1.txt
/usr/ucb/ps -auxw
pargs <pid>
/usr/ucb/ps -aefyl | grep imp
Thanks (11 Replies)
HI,
I need to move all files from a dir & its all subdir to Archive folder which is indise dir only. and moved filename should changed to complete path ( Like Dir_subdir_subdir2_.._filename ). also all files names shoud capture in a file in order to mail
I written below code ... (11 Replies)
Hi Gurus,
I have to perform some oracle database task so i have written a test scripts which open the database connection and perform a select . once it is done i want it to come out from data base to unix prompt which is not happening. the below command will be a part of shell scripts and once... (11 Replies)
I'm a programming noob. I'm trying to run a memory intensive process for many files. But when I use the following script, it runs fine for the first 5-7 files, then runs out of memory. Monitoring the output files, it's clear the processes are going on in parallel. Once 5-7 of the files are being... (18 Replies)
Let's say I start process A.sh, then start process B.sh. I call both of them in my C.sh
How can I make sure that B starts its execution only after A.sh finishes.
I have to do this in loop.Execution time of A.sh may vary everytime.
It is a parameterized script. (17 Replies)
So I need to write a script that can parse our logs and give me the amount of daily activity per user on our website. Unfortunately I'm still learning the very basics so please bear with me :eek:. Below is an example snippet from a log to give you a basic idea of what each entry in the log... (21 Replies)