all ops done; without synchronization

This commit is contained in:
Semere M. Mebrahtom 2026-03-24 20:16:27 +01:00
parent 30ad265779
commit ebe57f783d
Signed by: semere
GPG key ID: 7FC937214DF30488
4 changed files with 117 additions and 31 deletions

View file

@ -12,20 +12,30 @@
#ifndef CODEXION_H
# define CODEXION_H
# include <pthread.h>
# include <sys/time.h>
typedef struct s_args
{
int number_of_coders;
int time_to_burnout;
int time_to_compile;
int time_to_debug;
int time_to_refactor;
int number_of_compiles_required;
int dongle_cooldown;
int scheduler;
} t_args;
typedef struct s_data
{
int number_of_coders;
int time_to_burnout;
int time_to_compile;
int time_to_debug;
int time_to_refactor;
int number_of_compiles_required;
int dongle_cooldown;
int scheduler;
} t_data;
struct timeval start;
int coder_id;
t_args args;
pthread_mutex_t *left_dongle;
pthread_mutex_t *right_dongle;
} t_data;
// utils.h
t_data *parse_arguments(int count, char **args);
t_args *parse_arguments(int count, char **args);
#endif