Anonymous user
Dining philosophers: Difference between revisions
→{{header|C}}
(→{{header|Oz}}: simplified) |
|||
Line 204:
typedef struct philData {
pthread_mutex_t *fork_lft, *fork_rgt;
pthread_t thread;
int fail;
Line 249:
void Ponder()
{
const char *nameList[] = { "Kant", "Guatma", "Russel", "Aristotle", "Bart" };
pthread_mutex_t forks[5];
Philosopher philosophers[5];
Line 285:
}
int main(
{
Ponder();
|