Lockless Task Scheduler  v1.0a
A lockless task scheduler
profilenone.h
1 // ***********************************************************************
2 // Assembly : task_scheduler
3 // Author : viknash
4 // ***********************************************************************
5 // <copyright file="profilenone.h" >
6 // Copyright (c) viknash. All rights reserved.
7 // </copyright>
8 // <summary></summary>
9 // ***********************************************************************
10 #pragma once
11 
12 #include <thread>
13 
14 #include "utils.h"
15 #include "containers.h"
16 
20 namespace task_scheduler
21 {
22  namespace profile
23  {
24 
25 #if TASK_SCHEDULER_PROFILER == TASK_SCHEDULER_PROFILER_NONE
27  {
28  public:
29  inline void suppress(enum errors::type _error)
30  {
31  ts_unused(_error);
32  }
33 
34  inline void unsuppress(enum errors::type _error)
35  {
36  ts_unused(_error);
37  }
38  };
39 
40  static errors* instance()
41  {
42  static error_stack<basic_errors> error_instance;
43  return &error_instance;
44  }
45 
46  template<class TKey>
47  memory* memory::instance()
48  {
49  ts_always_assert();
50  return nullptr;
51  }
52 
53  namespace thread
54  {
55  inline void set_name(const tchar_t* _name)
56  {
57  ts_unused(_name);
58  }
59  }
60 
62  {
63  typedef void* handle;
64  protected:
65 
66  null_string(const tchar_t* _name)
67  {
68  ts_unused(_name);
69  };
70 
71  typename handle& operator* ()
72  {
73  static handle dummy = nullptr;
74  return dummy;
75  }
76  };
77 
79 
80  template <class TKey>
81  static domain* domain::instance()
82  {
83  static domain static_domain;
84  return &static_domain;
85  }
86 
87  struct task_param
88  {
89  task_param(function _func, const tchar_t* _task_id, const tchar_t* _parent_task_id, const tchar_t* _task_name)
90  {}
91  };
92 
93  class task
94  {
95 
96  public:
97 
98  task()
99  {
100  }
101 
102  bool enter(task_param& _param)
103  {
104  ts_unused(_param);
105  return true;
106  }
107 
108  bool exit(task_param& _param)
109  {
110  ts_unused(_param);
111  return true;
112  }
113  };
114 
116 
117 #endif
118 
119  }
120 
121 }
Definition: profilenone.h:61
Class stl_allocator.
Definition: allocator.h:16
Definition: profilebase.h:212
Definition: profilebase.h:101
Definition: profilebase.h:128
Class scoped_enter_exit.
Definition: utils.h:140
Definition: profilebase.h:196
Definition: profileitt.h:188
Definition: lockfreenode.h:19
Definition: profilebase.h:80
Definition: profileitt.h:173
Definition: profilenone.h:26