diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-08 17:57:23 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-08 17:57:23 +0100 |
| commit | 36c5e3a81de8b910bc04a37994b53296c1540353 (patch) | |
| tree | ed8ff37d914606ba3b4d6921956bd9b29cac0f17 /common/src/io.c | |
| parent | ad7ed73c124c8fcda6629350307f0f4f41b87fe3 (diff) | |
| download | philosophers-36c5e3a81de8b910bc04a37994b53296c1540353.tar.gz philosophers-36c5e3a81de8b910bc04a37994b53296c1540353.tar.bz2 philosophers-36c5e3a81de8b910bc04a37994b53296c1540353.zip | |
Added separate thread to flush buffer in philo_one and philo_two
Diffstat (limited to 'common/src/io.c')
| -rw-r--r-- | common/src/io.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/src/io.c b/common/src/io.c index c01accd..ae624fb 100644 --- a/common/src/io.c +++ b/common/src/io.c @@ -6,7 +6,7 @@ /* By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/09/30 10:03:53 by cacharle #+# #+# */ -/* Updated: 2021/01/04 12:10:14 by cacharle ### ########.fr */ +/* Updated: 2021/01/08 15:19:47 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -37,14 +37,13 @@ static char *st_strcpy_end(char *dst, char *str) return (dst); } -#define PHILO_PUT_BUF_SIZE 4048 +#define PHILO_PUT_BUF_SIZE 20000 static char g_buf[PHILO_PUT_BUF_SIZE + 256] = {'\0'}; static char *g_curr = g_buf; void philo_put(size_t id, t_philo_event event, t_time initial_time) { - g_curr = st_nbrcpy(g_curr, h_time_now() - initial_time); g_curr = st_strcpy_end(g_curr, " "); g_curr = st_nbrcpy(g_curr, id); |
