Changeset 35285fd for libcfa/src/concurrency/io.cfa
- Timestamp:
- Jan 12, 2021, 1:10:41 PM (16 months ago)
- Branches:
- arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr
- Children:
- 481ee28
- Parents:
- d48b174
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.