Changeset 732b406
- Timestamp:
- Jul 9, 2020, 3:37:03 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3a32b3a
- Parents:
- 34b61882
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r34b61882 r732b406 130 130 131 131 __spinlock_t lock; 132 __spinlock_t release_lock; 132 133 133 134 // A buffer of sqes (not the actual ring) … … 270 271 271 272 (sq.lock){}; 273 (sq.release_lock){}; 272 274 273 275 if( io_flags & ( CFA_CLUSTER_IO_POLLER_THREAD_SUBMITS | CFA_CLUSTER_IO_EAGER_SUBMITS ) ) { … … 836 838 __atomic_fetch_add(tail, 1ul32, __ATOMIC_SEQ_CST); 837 839 840 /* paranoid */ verify( ring.submit_q.sqes[ idx ].user_data != 0 ); 841 838 842 // Submit however, many entries need to be submitted 839 843 int ret = syscall( __NR_io_uring_enter, ring.fd, 1, 0, 0, 0p, 0); … … 889 893 static uint32_t __release_consumed_submission( struct __io_data & ring ) { 890 894 const uint32_t smask = *ring.submit_q.mask; 895 896 if( !try_lock(ring.submit_q.release_lock __cfaabi_dbg_ctx2) ) return 0; 891 897 uint32_t chead = *ring.submit_q.head; 892 898 uint32_t phead = ring.submit_q.prev_head; 893 899 ring.submit_q.prev_head = chead; 900 unlock(ring.submit_q.release_lock); 901 894 902 uint32_t count = chead - phead; 895 903 for( i; count ) {
Note: See TracChangeset
for help on using the changeset viewer.