SST/macro
cpuset_compute_scheduler.h
Go to the documentation of this file.
1 #ifndef CPUSET_COMPUTE_scheduleR_H
2 #define CPUSET_COMPUTE_scheduleR_H
3 
5 
6 namespace sstmac {
7 namespace sw {
8 
10 {
11  public:
15  {
16  }
17 
18  void configure(int ncore, int nsocket);
19 
20  void reserve_core(thread *thr);
21 
22  void release_core(thread *thr);
23 
24  private:
25  static int available_core(int ncore, uint64_t cpumask);
26 
27  void allocate_core(int core){
28  available_cores_ = available_cores_ & ~(1<<core);
29  }
30 
31  void deallocate_core(int core){
32  available_cores_ = available_cores_ | (1<<core);
33  }
34 
35  private:
36  uint64_t available_cores_;
37  std::list<thread*> pending_threads_;
38 
39 
40 };
41 
42 }
43 }
44 
45 #endif // CPUSET_COMPUTE_scheduleR_H
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
cpuset_compute_scheduler(sw::operating_system *os)
static int available_core(int ncore, uint64_t cpumask)
void configure(int ncore, int nsocket)