C/C++
csc.asc
Associated article: Concurrent Small C
Tags: C/C++
_Concurrent Small C_
by Andy Yuen
Listing One
#include <stdio.h>
unsigned int seed = 127;
/* generate pseudo-random number between 1-200 inclusive */
rnd()
{
seed *= 177;
if (!seed)
seed = 127;
return seed % 200 + 1;
}
/* logic for a dining philosopher */
void philosopher(id)
int id;
{
char ...


