Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

complete(9) [centos man page]

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)
Man Page

15 More Discussions You Might Find Interesting

1. New to Unix. Which books should I read?

Unix OR Linux Cert?

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

2. UNIX for Dummies Questions & Answers

fun with tar

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

3. SuSE

When a FTP download is completed

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

4. Shell Programming and Scripting

shell script takes long time to complete

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

5. SCO

Complete backup of system spanning all filesystems

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

6. UNIX for Dummies Questions & Answers

Can grep command return word instead of complete line

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

7. Shell Programming and Scripting

Scripting job to complete

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

8. UNIX for Dummies Questions & Answers

Unable to execute the complete cmd - using find command

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

9. Solaris

Show complete command on command line when we use 'ps'

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

10. Shell Programming and Scripting

Move all files from dir and subdir to Archive with File name as complete path_filename

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

11. Shell Programming and Scripting

shell scripts do not exit once completed

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

12. Shell Programming and Scripting

While loop - how to run processes one after another (2nd starts after first completes, and so on)

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

13. Shell Programming and Scripting

Wait for one processes to complete in a shell script

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

14. Shell Programming and Scripting

Completey new to scripting, question/help?

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

15. Shell Programming and Scripting

Find and select complete paragraph

HI Friends, I need your help once again. I have following $cat april_2015.txt == :: == Gender: Female Service: Tattoo Nature: Permanent Amt: 21000 INR Date: 04/04/2015 Artist: Anushka == :: == Gender: Female Service: Makeup Nature: Bridal Amt: 19200 INR Date: 05/04/2015 Artist:... (13 Replies)
Discussion started by: anushree.a
13 Replies