Scheduler
newJob.h
Go to the documentation of this file.
1 
10 #ifndef NEW_JOB_H
11 #define NEW_JOB_H
12 
13 #include <memory>
14 #include <atomic>
15 
16 #include "event.h"
17 #include "newProcess.h"
18 
19 namespace Scheduler
20 {
21 
24 class NewJob : public NewProcess
25 {
26 public:
27  static void init();
28 private:
29  static void initEventSchedulingThread();
30  static void eventSchedulingThreadFunction();
31  static std::atomic<bool> startEventScheduling;
32  static NewJob* processBeingCreated;
33 public:
34  NewJob(double time, bool renew=true) : NewProcess(time, renew){};
35  void process() override;
36  std::string getName() override;
37 private:
38  std::shared_ptr<Process> createTask() override;
39  void scheduleNextEvent() override;
40  void scheduleMissedDeadlineEvent();
41  int pid{-1};
42 };
43 }
44 
45 
46 #endif
std::string getName() override
get the name of the event
Definition: newJob.cpp:72
NewJob(double time, bool renew=true)
Definition: newJob.h:34
void process() override
handle the the event TODO: &#39;process&#39; is maybe not the best word for that, given that our simulator ac...
Definition: newJob.cpp:55
static void init()
Definition: newJob.cpp:28
bool renew
Definition: event.h:59
double time
Definition: event.h:58