Ask coding questions

← Back to all posts
I need help with my function called start_philosopher
jnrob900 (0)

void start_philosopher( void the_args )
{
int f;

pthread_cond_init(pthread_cond_t restrict __cond, const pthread_condattr_t restrict __cond_attr) (new Thread Start (struct p_args *)the_args;

for(f = 0; f < phil_args (void *the_args)->num_cycles; f++)
{
think();
grab_forks( args->room, args->phil_num);
eat();
release_forks(args->room, args->phil_num);
}
return NULL;
}

Comments
hotnewtop
Coder100 (18893)

You never defined the args struct.