Skip to content

Commit

Permalink
updated norminette
Browse files Browse the repository at this point in the history
  • Loading branch information
0bvim committed Mar 11, 2024
1 parent b594ca5 commit 5b83df0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Binary file modified philo_bonus/.cache/clangd/index/cleanup.c.5DE5994149B721F1.idx
Binary file not shown.
Binary file modified philo_bonus/.cache/clangd/index/parser.c.5C276DC1B1836CB8.idx
Binary file not shown.
Binary file modified philo_bonus/.cache/clangd/index/philo_bonus.h.615629696E53B6C3.idx
Binary file not shown.
4 changes: 2 additions & 2 deletions philo_bonus/includes/philo_bonus.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: vde-frei <vde-frei@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/21 22:43:36 by vde-frei #+# #+# */
/* Updated: 2024/03/11 01:59:14 by vde-frei ### ########.fr */
/* Updated: 2024/03/11 02:16:25 by vde-frei ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -131,7 +131,7 @@ long get_time(void);
/* routine function */
void eat(t_philo *philo);
void *monitor(void *philo_v);
void *monitor_count(void * table_v);
void *monitor_count(void *table_v);
void routine(t_philo *philo_v);

/* handle string functions */
Expand Down
7 changes: 3 additions & 4 deletions philo_bonus/src/dinner/dinner.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
/* By: vde-frei <vde-frei@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/26 21:18:44 by vde-frei #+# #+# */
/* Updated: 2024/03/11 01:17:17 by vde-frei ### ########.fr */
/* Updated: 2024/03/11 02:15:44 by vde-frei ### ########.fr */
/* */
/* ************************************************************************** */

#include "philo_bonus.h"

void routine(t_philo *philo_v)
{
t_philo *philo;
t_philo *philo;
pthread_t tid;

philo = (t_philo*)philo_v;
philo = (t_philo *)philo_v;
philo->last_meal = get_time();
philo->limit = philo->last_meal + philo->table->die;
if (pthread_create(&tid, NULL, &monitor, philo) != 0)
Expand Down Expand Up @@ -51,7 +51,6 @@ void take_forks(t_philo *philo)

void eat(t_philo *philo)
{

sem_wait(philo->mutex);
philo->is_eating = true;
philo->last_meal = get_time();
Expand Down

0 comments on commit 5b83df0

Please sign in to comment.