Changeset 510e6f9 for libcfa/src/concurrency/io
- Timestamp:
- Mar 11, 2022, 1:56:07 PM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 623d1c8
- Parents:
- eb3bc52 (diff), 630c4bb (diff)
 Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
 Use the(diff)links above to see all the changes relative to each parent.
- Location:
- libcfa/src/concurrency/io
- Files:
- 
      - 2 edited
 
 
Legend:
- Unmodified
- Added
- Removed
- 
      libcfa/src/concurrency/io/setup.cfareb3bc52 r510e6f9 56 56 57 57 #include "bitmanip.hfa" 58 #include "fstream.hfa" 58 59 #include "kernel_private.hfa" 59 60 #include "thread.hfa" … … 258 259 struct __sub_ring_t & sq = this.sq; 259 260 struct __cmp_ring_t & cq = this.cq; 261 { 262 __u32 fhead = sq.free_ring.head; 263 __u32 ftail = sq.free_ring.tail; 264 265 __u32 total = *sq.num; 266 __u32 avail = ftail - fhead; 267 268 if(avail != total) abort | "Processor (" | (void*)this.proc | ") tearing down ring with" | (total - avail) | "entries allocated but not submitted, out of" | total; 269 } 260 270 261 271 // unmap the submit queue entries 
- 
      libcfa/src/concurrency/io/types.hfareb3bc52 r510e6f9 23 23 #include "bits/locks.hfa" 24 24 #include "bits/queue.hfa" 25 #include "iofwd.hfa" 25 26 #include "kernel/fwd.hfa" 26 27 … … 170 171 // void __ioctx_prepare_block($io_context & ctx); 171 172 #endif 172 173 //-----------------------------------------------------------------------174 // IO user data175 struct io_future_t {176 future_t self;177 __s32 result;178 };179 180 static inline {181 thread$ * fulfil( io_future_t & this, __s32 result, bool do_unpark = true ) {182 this.result = result;183 return fulfil(this.self, do_unpark);184 }185 186 // Wait for the future to be fulfilled187 bool wait ( io_future_t & this ) { return wait (this.self); }188 void reset ( io_future_t & this ) { return reset (this.self); }189 bool available( io_future_t & this ) { return available(this.self); }190 }
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  