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/t2.c File Reference

Detailed Description

Thread example (background sorting; no mutexes) [Sec. 5.17 (not in book)].

Definition in file t2.c.

Go to the source code of this file.


struct  dict


#define MAX_ENTRIES   100


int compar (const void *x, const void *y)
void * sorter (void *arg)
int main (void)

Define Documentation

#define MAX_ENTRIES   100

Definition at line 24 of file t2.c.

Function Documentation

int compar const void *  x,
const void *  y

Definition at line 32 of file t2.c.

Referenced by sorter().

int main void   ) 

Definition at line 50 of file t2.c.

References dict::d_entry, dict::d_issorted, dict::d_nentries, EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_null, ec_rv, errno, MAX_ENTRIES, pthread_create(), and sorter().

void* sorter void *  arg  )  [static]

Definition at line 37 of file t2.c.

References compar(), dict::d_entry, dict::d_issorted, dict::d_nentries, and sleep().

Referenced by main().

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