aboutsummaryrefslogtreecommitdiff
path: root/common/inc
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-01-10 10:54:04 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-01-10 10:54:04 +0100
commiteb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb (patch)
treeefff80bbbc2157979eaae006f6835d020062dba9 /common/inc
parent802ea8347d1ceb7a02cf279359b3b101106fab94 (diff)
downloadphilosophers-eb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb.tar.gz
philosophers-eb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb.tar.bz2
philosophers-eb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb.zip
Fixing bad performance at school by adding more delay to the death checking loop, Added mutex/semaphore to protect against eating and dying at the same time
Diffstat (limited to 'common/inc')
-rw-r--r--common/inc/common.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/inc/common.h b/common/inc/common.h
index 6d36e35..56fb284 100644
--- a/common/inc/common.h
+++ b/common/inc/common.h
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 22:58:35 by cacharle #+# #+# */
-/* Updated: 2021/01/04 13:06:52 by charles ### ########.fr */
+/* Updated: 2021/01/10 10:32:17 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -56,6 +56,9 @@ bool parse_args(t_philo_args *args, int argc, char **argv);
long int h_atou_strict(char *s);
t_time h_time_now(void);
void h_sleep(t_time sleep_time);
+char *h_nbrcpy(char *dst, long long int num);
+char *h_strcpy_end(char *dst, const char *str);
+const char *philo_sem_eat_name(const char *prefix, long int id);
/*
** io.c