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