Changeset 35285fd
- Timestamp:
- Jan 12, 2021, 1:10:41 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 481ee28
- Parents:
- d48b174
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
rd48b174 r35285fd 195 195 static unsigned __collect_submitions( struct __io_data & ring ); 196 196 static __u32 __release_consumed_submission( struct __io_data & ring ); 197 static inline void __clean( volatile struct io_uring_sqe * sqe ); 197 198 198 199 // Process a single completion message from the io_uring … … 746 747 747 748 /* paranoid */ verify( 0 != ring.submit_q.sqes[ idx ].user_data ); 748 ring.submit_q.sqes[ idx ].user_data = 3ul64;749 __clean( &ring.submit_q.sqes[ idx ] ); 749 750 } 750 751 return count; 751 752 } 753 754 void __sqe_clean( volatile struct io_uring_sqe * sqe ) { 755 __clean( sqe ); 756 } 757 758 static inline void __clean( volatile struct io_uring_sqe * sqe ) { 759 // If we are in debug mode, thrash the fields to make sure we catch reclamation errors 760 __cfaabi_dbg_debug_do( 761 memset(sqe, 0xde, sizeof(*sqe)); 762 sqe->opcode = IORING_OP_LAST; 763 ); 764 765 // Mark the entry as unused 766 __atomic_store_n(&sqe->user_data, 3ul64, __ATOMIC_SEQ_CST); 767 } 752 768 #endif -
libcfa/src/concurrency/io/setup.cfa
rd48b174 r35285fd 382 382 abort("KERNEL ERROR: IO_URING MMAP3 - %s\n", strerror(errno)); 383 383 } 384 memset(sq.sqes, 0xde, size);385 386 verify( 0 != (params.features & IORING_FEAT_NODROP) );387 384 388 385 // Step 3 : Initialize the data structure -
libcfa/src/concurrency/io/types.hfa
rd48b174 r35285fd 134 134 void __ioctx_register($io_ctx_thread & ctx); 135 135 void __ioctx_prepare_block($io_ctx_thread & ctx); 136 void __sqe_clean( volatile struct io_uring_sqe * sqe ); 136 137 #endif 137 138
Note: See TracChangeset
for help on using the changeset viewer.