From 88e3fbcb5d6829f8980d6bb356b1c0cd7a38187b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 3 Jul 2005 04:40:34 +0000 Subject: linuxthreads, linuxthreads_db: Directories removed (preserved in ports repository). --- linuxthreads/Examples/ex3.c | 152 -------------------------------------------- 1 file changed, 152 deletions(-) delete mode 100644 linuxthreads/Examples/ex3.c (limited to 'linuxthreads/Examples/ex3.c') diff --git a/linuxthreads/Examples/ex3.c b/linuxthreads/Examples/ex3.c deleted file mode 100644 index b80b323a33..0000000000 --- a/linuxthreads/Examples/ex3.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Multi-thread searching. - Illustrates: thread cancellation, cleanup handlers. */ - -#include -#include -#include -#include -#include -#include - -/* Defines the number of searching threads */ -#define NUM_THREADS 5 - -/* Function prototypes */ -void *search(void *); -void print_it(void *); - -/* Global variables */ -pthread_t threads[NUM_THREADS]; -pthread_mutex_t lock; -int tries; -volatile int started; - -int main(int argc, char ** argv) -{ - int i; - int pid; - - /* create a number to search for */ - pid = getpid(); - printf("Searching for the number = %d...\n", pid); - - /* Initialize the mutex lock */ - pthread_mutex_init(&lock, NULL); - - /* Create the searching threads */ - for (started=0; started