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