On the road to 64-bit happiness, we have the following patch:
--- lib-src/mlwp/test.c.orig Thu Jan 28 12:54:47 1999
+++ lib-src/mlwp/test.c Thu Jan 28 12:57:35 1999
@@ -94,7 +94,7 @@
if (count)
{
x = (t2.tv_sec -t1.tv_sec)*1000000 + (t2.tv_usec - t1.tv_usec);
- printf("%d milliseconds for %d MWaits (%f usec per Mwait and Signal)\n",
x/1000, count, (float)(x/count));
+ printf("%ld milliseconds for %ld MWaits (%f usec per Mwait and Signal)\n",
+x/1000, count, (float)(x/count));
}
return 0;
I also have a question about lib-src/mlwp/rw.c:
int main(int argc, char **argv)
{
int nreaders, i;
/* snip */
asleep = 0;
/* Now create readers */
printf("[Creating Readers...\n");
readers = (PROCESS *) calloc((unsigned)nreaders,
(unsigned)(sizeof(PROCESS)));
for (i=0; i<nreaders; i++)
LWP_CreateProcess((PFI)read_process, STACK_SIZE, 0, (char *)i,
"Reader", &readers[i]);
printf("done]\n");
/* snip */
the fourth argument of LWP_CreateProcess should be a pointer but i is an
integer...what's the right way to fix this?
Jason