2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c5/tx3.c File Reference


Detailed Description

Thread example (mutex) [Sec. 5.17.3].

Definition in file tx3.c.

Go to the source code of this file.

Functions

void * thread_func (void *arg)
int main (void)

Variables

pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER
long x = 0


Function Documentation

int main void   ) 
 

Definition at line 52 of file tx3.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_rv, mtx, pthread_create(), pthread_join(), pthread_mutex_lock(), pthread_mutex_unlock(), sleep(), thread_func(), and x.

void* thread_func void *  arg  )  [static]
 

Definition at line 28 of file tx3.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FLUSH, ec_rv, mtx, pthread_mutex_lock(), pthread_mutex_unlock(), sleep(), and x.

Referenced by main().


Variable Documentation

pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER [static]
 

Definition at line 25 of file tx3.c.

Referenced by main(), and thread_func().

long x = 0 [static]
 

Definition at line 26 of file tx3.c.

Referenced by main(), and thread_func().


Generated on Fri Apr 23 10:57:08 2004 for AUP2 Example Source by doxygen 1.3.1