Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_cond_broadcast(3) [mojave man page]

PTHREAD_COND_BROADCAST(3)				   BSD Library Functions Manual 				 PTHREAD_COND_BROADCAST(3)

NAME
pthread_cond_broadcast -- unblock all threads waiting for a condition variable SYNOPSIS
#include <pthread.h> int pthread_cond_broadcast(pthread_cond_t *cond); DESCRIPTION
The pthread_cond_broadcast() function unblocks all threads waiting for the condition variable cond. RETURN VALUES
If successful, the pthread_cond_broadcast() function will return zero, otherwise an error number will be returned to indicate the error. ERRORS
The pthread_cond_broadcast() function will fail if: [EINVAL] The value specified by cond is invalid. SEE ALSO
pthread_cond_destroy(3), pthread_cond_init(3), pthread_cond_signal(3), pthread_cond_timedwait(3), pthread_cond_wait(3) STANDARDS
The pthread_cond_broadcast() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1''). BSD
July 28, 1998 BSD

Check Out this Related Man Page

PTHREAD_COND_BROADCAST(3)				   BSD Library Functions Manual 				 PTHREAD_COND_BROADCAST(3)

NAME
pthread_cond_broadcast -- unblock all threads waiting for a condition variable LIBRARY
POSIX Threads Library (libpthread, -lpthread) SYNOPSIS
#include <pthread.h> int pthread_cond_broadcast(pthread_cond_t *cond); DESCRIPTION
The pthread_cond_broadcast() function unblocks all threads waiting for the condition variable cond. RETURN VALUES
If successful, the pthread_cond_broadcast() function will return zero, otherwise an error number will be returned to indicate the error. ERRORS
The pthread_cond_broadcast() function will fail if: [EINVAL] The value specified by cond is invalid. SEE ALSO
pthread_cond_destroy(3), pthread_cond_init(3), pthread_cond_signal(3), pthread_cond_timedwait(3), pthread_cond_wait(3) STANDARDS
The pthread_cond_broadcast() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1''). BSD
July 28, 1998 BSD
Man Page

7 More Discussions You Might Find Interesting

1. AIX

pthread lock question

Is it possible that the function "pthread_cond_broadcast" block itself and the function "pthread_cond_wait" unblock in multi-threads programming ? The operating system is AIX 5.2, its maintenance level is : 5.2.0.4, VisualAge C++ 6.0. Thanks (0 Replies)
Discussion started by: Frank2004
0 Replies

2. Programming

using pthread_mutex_destroy()

As part of a multi-threaded code that I am designing, I am using mutexes to control access to a shared data segments in the code. I have no problems initalising and manipulating the mutexes to control access, however terminating the mutex itself is proving to be a bit difficult. I am... (3 Replies)
Discussion started by: JamesGoh
3 Replies

3. Programming

Thread prog (core dump)

Could any one please suggest me how to solve this...... when I compiled the program and tried to execute it as follows, it works fine under different inputs like: ./main -r 300 -w 3 -s 100 ./main -r 600 -w 3 -s 1000 ./main -r 10 -w 3 -s 100 But it fails when I tired to give the input as... (1 Reply)
Discussion started by: kumars
1 Replies

4. Programming

threads and signals

can any one give me an example of a concurrency program in threads and signals, i.e how to deliver messages between threads using signals. thanks (2 Replies)
Discussion started by: moe_7
2 Replies

5. Programming

Posix Semaphore Use - Releasing all resources?

I am attempting to write a program with multiple POSIX threads. I want to ensure all threads are released at the same time. I am (trying to) use a semaphore to accomplish this. Without too much irrelevant information, I declare my semaphore with 0 of 25 resources available. Is there a way... (7 Replies)
Discussion started by: snowbarr
7 Replies

6. Programming

problem with threads in C

I have problem that if I create for example 100 threads program work correctly but if I define more threads for example 1000 // if I change static int NUM_E from 100 to 1000 than program stop about 350 threads and doesn't continue where should be problem please? #include <pthread.h>... (4 Replies)
Discussion started by: Sevco777
4 Replies

7. Programming

Question (pthread): How to Signal all threads w/o "broadcast"?

Hello all, Is there any way that I can signal (wake) all threads that I have created without using pthread_cond_broadcast? Cheers! Aaron (6 Replies)
Discussion started by: mobility
6 Replies