diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-08 14:35:53 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-08 14:35:53 +0100 |
| commit | ad7ed73c124c8fcda6629350307f0f4f41b87fe3 (patch) | |
| tree | 5faf9809401b64fecffe709f20cc9bb980aa7406 /common/common.h | |
| parent | 907debbb7d1e7ccc4914805cfe4acbed92b82bcc (diff) | |
| download | philosophers-ad7ed73c124c8fcda6629350307f0f4f41b87fe3.tar.gz philosophers-ad7ed73c124c8fcda6629350307f0f4f41b87fe3.tar.bz2 philosophers-ad7ed73c124c8fcda6629350307f0f4f41b87fe3.zip | |
Updated Makefile, restructuring common files
Diffstat (limited to 'common/common.h')
| -rw-r--r-- | common/common.h | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/common/common.h b/common/common.h deleted file mode 100644 index 09fdf79..0000000 --- a/common/common.h +++ /dev/null @@ -1,68 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* common.h :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2020/02/08 22:58:35 by cacharle #+# #+# */ -/* Updated: 2021/01/04 11:52:30 by cacharle ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#ifndef COMMON_H -# define COMMON_H - -# include <unistd.h> -# include <stdlib.h> -# include <stdbool.h> -# include <pthread.h> -# include <sys/time.h> -# include <limits.h> - -typedef long int t_time; - -typedef enum e_philo_event -{ - EVENT_FORK, - EVENT_EAT, - EVENT_SLEEP, - EVENT_THINK, - EVENT_DIE -} t_philo_event; - -typedef struct -{ - long int philo_num; - t_time timeout_death; - t_time timeout_eat; - t_time timeout_sleep; - long int meal_num; -} t_philo_args; - -typedef void *(*t_routine)(void *arg); - -/* -** args.c -*/ - -bool parse_args(t_philo_args *args, int argc, char **argv); - -/* -** helper.c -*/ - -long int h_atou_strict(char *s); -t_time h_time_now(void); -void h_sleep(t_time sleep_time); - -/* -** io.c -*/ - -void philo_put( - size_t id, t_philo_event event, t_time initial_time); -void philo_put_flush(void); -int h_err(int ret, const char *format, char *str); - -#endif |
