tgrekov-philosophers
HIVE philosophers July 2024
Loading...
Searching...
No Matches
breakfast.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* breakfast.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/22 04:55:23 by tgrekov #+# #+# */
/* Updated: 2024/08/06 17:03:07 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file breakfast.c.

#include "../utils/utils.h"
#include "philo.h"
Include dependency graph for breakfast.c:

Go to the source code of this file.

Functions

static int eat (t_thread *thread, int fork2)
 Take forks, eat, release.
 
void * breakfast (void *arg)
 Ponder, eat, sleep, repeat.
 

Function Documentation

◆ breakfast()

void * breakfast ( void *  arg)

Ponder, eat, sleep, repeat.

Parameters
arg
Return values
void*

Definition at line 65 of file breakfast.c.

References eat(), philo_sleep(), status(), and stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eat()

static int eat ( t_thread thread,
int  fork2 
)
static

Take forks, eat, release.

Parameters
thread
fork2
Return values
int

Definition at line 30 of file breakfast.c.

References philo_sleep(), status(), stop(), and timestamp().

Here is the call graph for this function:
Here is the caller graph for this function: