- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.hfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
r92e7631 r71c8b7e 17 17 18 18 #include <stdbool.h> 19 #include <stdint.h> 19 20 20 21 #include "invoke.h" … … 37 38 void ?{}(semaphore & this, int count = 1); 38 39 void ^?{}(semaphore & this); 39 voidP (semaphore & this);40 bool P (semaphore & this); 40 41 bool V (semaphore & this); 42 bool V (semaphore & this, unsigned count); 41 43 42 44 … … 111 113 112 114 //----------------------------------------------------------------------------- 115 // I/O 116 struct __io_data; 117 118 #define CFA_CLUSTER_IO_POLLER_USER_THREAD 1 << 0 119 // #define CFA_CLUSTER_IO_POLLER_KERNEL_SIDE 1 << 1 120 121 //----------------------------------------------------------------------------- 113 122 // Cluster 114 123 struct cluster { … … 141 150 cluster * prev; 142 151 } node; 152 153 struct __io_data * io; 154 155 #if !defined(__CFA_NO_STATISTICS__) 156 bool print_stats; 157 #endif 143 158 }; 144 159 extern Duration default_preemption(); 145 160 146 void ?{} (cluster & this, const char name[], Duration preemption_rate );161 void ?{} (cluster & this, const char name[], Duration preemption_rate, int flags); 147 162 void ^?{}(cluster & this); 148 163 149 static inline void ?{} (cluster & this) { this{"Anonymous Cluster", default_preemption()}; } 150 static inline void ?{} (cluster & this, Duration preemption_rate) { this{"Anonymous Cluster", preemption_rate}; } 151 static inline void ?{} (cluster & this, const char name[]) { this{name, default_preemption()}; } 164 static inline void ?{} (cluster & this) { this{"Anonymous Cluster", default_preemption(), 0}; } 165 static inline void ?{} (cluster & this, Duration preemption_rate) { this{"Anonymous Cluster", preemption_rate, 0}; } 166 static inline void ?{} (cluster & this, const char name[]) { this{name, default_preemption(), 0}; } 167 static inline void ?{} (cluster & this, int flags) { this{"Anonymous Cluster", default_preemption(), flags}; } 168 static inline void ?{} (cluster & this, Duration preemption_rate, int flags) { this{"Anonymous Cluster", preemption_rate, flags}; } 169 static inline void ?{} (cluster & this, const char name[], int flags) { this{name, default_preemption(), flags}; } 152 170 153 171 static inline [cluster *&, cluster *& ] __get( cluster & this ) __attribute__((const)) { return this.node.[next, prev]; } … … 156 174 static inline struct cluster * active_cluster () { return TL_GET( this_processor )->cltr; } 157 175 176 #if !defined(__CFA_NO_STATISTICS__) 177 static inline void print_stats_at_exit( cluster & this ) { 178 this.print_stats = true; 179 } 180 #endif 181 158 182 // Local Variables: // 159 183 // mode: c //
Note:
See TracChangeset
for help on using the changeset viewer.