all ops done; without synchronization
This commit is contained in:
parent
30ad265779
commit
ebe57f783d
4 changed files with 117 additions and 31 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue