UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2015 - January 2016

11.4.3.  Initialization

In the initialization of the condition variable, there are two options; the first is the use of a feature called pthread_cond_init and the second one is to use the PTHREAD_COND_INITIALIZER macro that performs a static initialization.

int pthread_cond_init(pthread_cond_t *restrict cond,
	 const pthread_condattr_t *restrict attr);
	 pthread_cond_t cond = PTHREAD_COND_INITIALIZER;