Changeset c1c95b1
- Timestamp:
- Apr 24, 2021, 6:07:42 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3bd4293, c6c7e6c
- Parents:
- 986cb99
- Location:
- libcfa/src/concurrency
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r986cb99 rc1c95b1 90 90 static inline __u32 __release_sqes( struct $io_context & ); 91 91 92 void__cfa_io_drain( processor * proc ) {92 bool __cfa_io_drain( processor * proc ) { 93 93 /* paranoid */ verify( ! __preemption_enabled() ); 94 94 /* paranoid */ verify( proc ); … … 104 104 __STATS__( false, io.calls.drain++; io.calls.completed += count; ) 105 105 106 if(count == 0) return false; 107 106 108 for(i; count) { 107 109 unsigned idx = (head + i) & mask; … … 124 126 /* paranoid */ verify( ! __preemption_enabled() ); 125 127 126 return ;128 return true; 127 129 } 128 130 -
libcfa/src/concurrency/kernel.cfa
r986cb99 rc1c95b1 118 118 119 119 extern void __cfa_io_start( processor * ); 120 extern void__cfa_io_drain( processor * );120 extern bool __cfa_io_drain( processor * ); 121 121 extern void __cfa_io_flush( processor * ); 122 122 extern void __cfa_io_stop ( processor * ); 123 static inline void__maybe_io_drain( processor * );123 static inline bool __maybe_io_drain( processor * ); 124 124 125 125 extern void __disable_interrupts_hard(); … … 743 743 #endif 744 744 745 static inline void__maybe_io_drain( processor * proc ) {745 static inline bool __maybe_io_drain( processor * proc ) { 746 746 #if defined(CFA_HAVE_LINUX_IO_URING_H) 747 747 __cfadbg_print_safe(runtime_core, "Kernel : core %p checking io for ring %d\n", proc, proc->io.ctx->fd); … … 751 751 unsigned head = *ctx->cq.head; 752 752 unsigned tail = *ctx->cq.tail; 753 if(head != tail) __cfa_io_drain( proc ); 753 if(head == tail) return false; 754 return __cfa_io_drain( proc ); 754 755 #endif 755 756 }
Note: See TracChangeset
for help on using the changeset viewer.