Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/iofwd.hfa

    r40a606d2 rff1240f  
    1919extern "C" {
    2020        #include <asm/types.h>
    21         #include <sys/stat.h> // needed for mode_t
    2221        #if CFA_HAVE_LINUX_IO_URING_H
    2322                #include <linux/io_uring.h>
     
    2524}
    2625#include "bits/defs.hfa"
    27 #include "kernel/fwd.hfa"
    2826#include "time.hfa"
    2927
     
    4947
    5048struct cluster;
     49struct io_future_t;
    5150struct $io_context;
    5251
     
    5857
    5958struct io_uring_sqe;
    60 
    61 //-----------------------------------------------------------------------
    62 // IO user data
    63 struct io_future_t {
    64         future_t self;
    65         __s32 result;
    66 };
    67 
    68 static inline {
    69         thread$ * fulfil( io_future_t & this, __s32 result, bool do_unpark = true ) {
    70                 this.result = result;
    71                 return fulfil(this.self, do_unpark);
    72         }
    73 
    74         // Wait for the future to be fulfilled
    75         bool wait     ( io_future_t & this ) { return wait     (this.self); }
    76         void reset    ( io_future_t & this ) { return reset    (this.self); }
    77         bool available( io_future_t & this ) { return available(this.self); }
    78 }
    7959
    8060//----------
     
    153133// Check if a function is blocks a only the user thread
    154134bool has_user_level_blocking( fptr_t func );
    155 
    156 #if CFA_HAVE_LINUX_IO_URING_H
    157         static inline void zero_sqe(struct io_uring_sqe * sqe) {
    158                 sqe->flags = 0;
    159                 sqe->ioprio = 0;
    160                 sqe->fd = 0;
    161                 sqe->off = 0;
    162                 sqe->addr = 0;
    163                 sqe->len = 0;
    164                 sqe->fsync_flags = 0;
    165                 sqe->__pad2[0] = 0;
    166                 sqe->__pad2[1] = 0;
    167                 sqe->__pad2[2] = 0;
    168                 sqe->fd = 0;
    169                 sqe->off = 0;
    170                 sqe->addr = 0;
    171                 sqe->len = 0;
    172         }
    173 #endif
Note: See TracChangeset for help on using the changeset viewer.