- File:
-
- 1 edited
-
libcfa/src/concurrency/thread.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/thread.hfa
r2d8f7b0 r3e2b9c9 84 84 85 85 //----------------------------------------------------------------------------- 86 // Thread getters87 static inline struct $thread * active_thread () { return TL_GET( this_thread ); }88 89 //-----------------------------------------------------------------------------90 86 // Scheduler API 91 87 … … 106 102 bool force_yield( enum __Preemption_Reason ); 107 103 108 static inline void yield() {109 force_yield(__MANUAL_PREEMPTION);110 }111 112 // Yield: yield N times113 static inline void yield( unsigned times ) {114 for( times ) {115 yield();116 }117 }118 119 104 //---------- 120 105 // sleep: force thread to block and be rescheduled after Duration duration
Note:
See TracChangeset
for help on using the changeset viewer.