Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void *philosophe_does(void *data)
- {
- t_philo *current_philo = (t_philo *)data;
- int count = current_philo->how_many_eat;
- while (count != 0){
- if (current_philo->status == H_REST)
- count = take_decision(current_philo, count);
- else if (current_philo->status == H_THINK)
- count = eat(current_philo, count);
- else if (current_philo->status == H_EAT)
- rest(current_philo);
- }
- return (NULL);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement