tgrekov-philosophers
HIVE philosophers July 2024
Loading...
Searching...
No Matches
status.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* status.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/27 07:03:10 by tgrekov #+# #+# */
/* Updated: 2024/08/06 16:56:12 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file status.c.

#include <stdio.h>
#include "../utils/utils.h"
#include "philo.h"
Include dependency graph for status.c:

Go to the source code of this file.

Functions

static int status_print_verify (t_thread *thread, unsigned long ts, char *str)
 Print status and verify correct length.
 
int status (t_thread *thread, char *str, int ignore_end)
 Thread safe philosopher state logging.
 

Function Documentation

◆ status()

int status ( t_thread thread,
char *  str,
int  ignore_end 
)

Thread safe philosopher state logging.

Parameters
thread
str
ignore_end
Return values
int

Definition at line 46 of file status.c.

References check_end(), status_print_verify(), and timestamp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ status_print_verify()

static int status_print_verify ( t_thread thread,
unsigned long  ts,
char *  str 
)
static

Print status and verify correct length.

Parameters
thread
ts
str
Return values
int

Definition at line 32 of file status.c.

Here is the caller graph for this function: