#ifndef MAIN_H_
#define MAIN_H_
#include <stddef.h>

typedef long cpu_time_t;

// Average CPU burst length
// This is used for Round Robin and SRTF scheduling
#define AVG_BURST 1000

typedef struct process {
  // Input values
  int pid;
  cpu_time_t arrival;
  cpu_time_t burst;
  int priority;

  // Used internally by some schedulers
  cpu_time_t executed;

  // Scheduler output value
  size_t num_schedules;
  cpu_time_t *starts; // Dynamically allocated arrays; free after read
  cpu_time_t *durations;
  // Derived output values
  cpu_time_t waiting;
  cpu_time_t turnaround;
} process;

typedef struct scheduler {
  char *name;
  char *description;
  void (*run)(process *processes, int num_processes);
  int uses_priority;
} scheduler;

#endif // MAIN_H_
