「🎉」 init: hello world !
This commit is contained in:
31
philo/include/philo.h
Normal file
31
philo/include/philo.h
Normal file
@ -0,0 +1,31 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* philo.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/07 15:11:02 by adjoly #+# #+# */
|
||||
/* Updated: 2024/07/07 16:18:23 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef PHILO_H
|
||||
# define PHILO_H
|
||||
|
||||
# include <stdio.h>
|
||||
# include <pthread.h>
|
||||
# include <stdint.h>
|
||||
|
||||
typedef enum s_philo_state
|
||||
{
|
||||
DIED = -1,
|
||||
EAT,
|
||||
THINK,
|
||||
SLEEP,
|
||||
FORK_TAKEN
|
||||
} t_philo_state;
|
||||
|
||||
void log_philo(uint32_t timestamp, uint16_t philo, t_philo_state type);
|
||||
|
||||
#endif
|
22
philo/include/philo_msg.h
Normal file
22
philo/include/philo_msg.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* philo_msg.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/07 17:50:46 by adjoly #+# #+# */
|
||||
/* Updated: 2024/07/07 17:53:53 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef PHILO_MSG_H
|
||||
# define PHILO_MSG_H
|
||||
|
||||
# define EATING_MSG "is eating\n"
|
||||
# define THINK_MSG "is thinking\n"
|
||||
# define SLEEP_MSG "is sleeping\n"
|
||||
# define DIED_MSG "died\n"
|
||||
# define FORK_MSG "has taken a fork\n"
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user