From 2afbe1378812ca8ac120aa14fcb173c093748682 Mon Sep 17 00:00:00 2001 From: "Chas Williams (CONTRACTOR)" Date: Sat, 19 Feb 2011 08:26:20 -0500 Subject: [PATCH] lwp: fix the rw test program We should not need to prototype calloc() anymore and osi_Assert() has been replaced with assert() apparently. Change-Id: I3ef6178c589cabcd0637cd88c35d2276833b4590 Change-Id: I0626475f120ff9a373e0251f3c4485c052922747 Reviewed-on: http://gerrit.openafs.org/3991 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/lwp/rw.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lwp/rw.c b/src/lwp/rw.c index 6fff9c75e..3710db43d 100644 --- a/src/lwp/rw.c +++ b/src/lwp/rw.c @@ -23,7 +23,6 @@ Created: 11/1/83, J. Rosenberg #include #else #include -extern char *calloc(); #endif #include #include @@ -31,7 +30,6 @@ extern char *calloc(); #include "lwp.h" #include "lock.h" #include "preempt.h" -#include #define DEFAULT_READERS 5 @@ -81,7 +79,7 @@ Remove(queue *q) if (empty(q)) { printf("Remove from empty queue"); - osi_Assert(0); + exit(0); } old = q->next; @@ -97,9 +95,10 @@ queue *q; int asleep; /* Number of processes sleeping -- used for * clean termination */ -static int -read_process(int *id) +static void * +read_process(void *arg) { + int *id = (int *) arg; printf("\t[Reader %d]\n", *id); LWP_DispatchProcess(); /* Just relinquish control for now */ @@ -126,8 +125,8 @@ read_process(int *id) return 0; } -static int -write_process() +static void * +write_process(void *dummy) { static char *messages[] = { "Mary had a little lamb,", -- 2.39.5