Ignore:
Timestamp:
Aug 15, 2022, 11:19:28 AM (21 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
d93ea1d
Parents:
41a6a78
Message:

Changed io types to have trailing $ instead of leading

Location:
libcfa/src/concurrency/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/io/call.cfa.in

    r41a6a78 r8bee858  
    7575        ;
    7676
    77         extern struct $io_context * cfa_io_allocate(struct io_uring_sqe * out_sqes[], __u32 out_idxs[], __u32 want)  __attribute__((nonnull (1,2)));
    78         extern void cfa_io_submit( struct $io_context * in_ctx, __u32 in_idxs[], __u32 have, bool lazy ) __attribute__((nonnull (1,2)));
     77        extern struct io_context$ * cfa_io_allocate(struct io_uring_sqe * out_sqes[], __u32 out_idxs[], __u32 want)  __attribute__((nonnull (1,2)));
     78        extern void cfa_io_submit( struct io_context$ * in_ctx, __u32 in_idxs[], __u32 have, bool lazy ) __attribute__((nonnull (1,2)));
    7979#endif
    8080
     
    200200                __u32 idx;
    201201                struct io_uring_sqe * sqe;
    202                 struct $io_context * ctx = cfa_io_allocate( &sqe, &idx, 1 );
     202                struct io_context$ * ctx = cfa_io_allocate( &sqe, &idx, 1 );
    203203
    204204                sqe->opcode = IORING_OP_{op};
  • libcfa/src/concurrency/io/setup.cfa

    r41a6a78 r8bee858  
    2828        void ?{}(io_context_params & this) libcfa_public {}
    2929
    30         void  ?{}($io_context & this, struct cluster & cl) {}
    31         void ^?{}($io_context & this) {}
     30        void  ?{}(io_context$ & this, struct cluster & cl) {}
     31        void ^?{}(io_context$ & this) {}
    3232
    3333        void __cfa_io_start( processor * proc ) {}
     
    3737        void __cfa_io_stop ( processor * proc ) {}
    3838
    39         $io_arbiter * create(void) { return 0p; }
    40         void destroy($io_arbiter *) {}
     39        io_arbiter$ * create(void) { return 0p; }
     40        void destroy(io_arbiter$ *) {}
    4141
    4242#else
     
    105105
    106106
    107         static void __io_uring_setup ( $io_context & this, const io_context_params & params_in, int procfd );
    108         static void __io_uring_teardown( $io_context & this );
    109         static void __epoll_register($io_context & ctx);
    110         static void __epoll_unregister($io_context & ctx);
    111         void __ioarbiter_register( $io_arbiter & mutex, $io_context & ctx );
    112         void __ioarbiter_unregister( $io_arbiter & mutex, $io_context & ctx );
    113 
    114         void ?{}($io_context & this, processor * proc, struct cluster & cl) {
     107        static void __io_uring_setup ( io_context$ & this, const io_context_params & params_in, int procfd );
     108        static void __io_uring_teardown( io_context$ & this );
     109        static void __epoll_register(io_context$ & ctx);
     110        static void __epoll_unregister(io_context$ & ctx);
     111        void __ioarbiter_register( io_arbiter$ & mutex, io_context$ & ctx );
     112        void __ioarbiter_unregister( io_arbiter$ & mutex, io_context$ & ctx );
     113
     114        void ?{}(io_context$ & this, processor * proc, struct cluster & cl) {
    115115                /* paranoid */ verify( cl.io.arbiter );
    116116                this.proc = proc;
     
    122122        }
    123123
    124         void ^?{}($io_context & this) {
     124        void ^?{}(io_context$ & this) {
    125125                __cfadbg_print_safe(io_core, "Kernel I/O : tearing down io_context %u\n", this.fd);
    126126
     
    129129        }
    130130
    131         static void __io_uring_setup( $io_context & this, const io_context_params & params_in, int procfd ) {
     131        static void __io_uring_setup( io_context$ & this, const io_context_params & params_in, int procfd ) {
    132132                // Step 1 : call to setup
    133133                struct io_uring_params params;
     
    270270        }
    271271
    272         static void __io_uring_teardown( $io_context & this ) {
     272        static void __io_uring_teardown( io_context$ & this ) {
    273273                // Shutdown the io rings
    274274                struct __sub_ring_t & sq = this.sq;
     
    313313// I/O Context Sleep
    314314//=============================================================================================
    315         // static inline void __epoll_ctl($io_context & ctx, int op, const char * error) {
     315        // static inline void __epoll_ctl(io_context$ & ctx, int op, const char * error) {
    316316        //      struct epoll_event ev;
    317317        //      ev.events = EPOLLIN | EPOLLONESHOT;
     
    323323        // }
    324324
    325         // static void __epoll_register($io_context & ctx) {
     325        // static void __epoll_register(io_context$ & ctx) {
    326326        //      __epoll_ctl(ctx, EPOLL_CTL_ADD, "ADD");
    327327        // }
    328328
    329         // static void __epoll_unregister($io_context & ctx) {
     329        // static void __epoll_unregister(io_context$ & ctx) {
    330330        //      // Read the current epoch so we know when to stop
    331331        //      size_t curr = __atomic_load_n(&iopoll.epoch, __ATOMIC_SEQ_CST);
     
    346346        // }
    347347
    348         // void __ioctx_prepare_block($io_context & ctx) {
     348        // void __ioctx_prepare_block(io_context$ & ctx) {
    349349        //      __cfadbg_print_safe(io_core, "Kernel I/O - epoll : Re-arming io poller %d (%p)\n", ctx.fd, &ctx);
    350350        //      __epoll_ctl(ctx, EPOLL_CTL_MOD, "REARM");
     
    355355// I/O Context Misc Setup
    356356//=============================================================================================
    357         void ?{}( $io_arbiter & this ) {
     357        void ?{}( io_arbiter$ & this ) {
    358358                this.pending.empty = true;
    359359        }
    360360
    361         void ^?{}( $io_arbiter & mutex this ) {}
    362 
    363         $io_arbiter * create(void) {
     361        void ^?{}( io_arbiter$ & mutex this ) {}
     362
     363        io_arbiter$ * create(void) {
    364364                return new();
    365365        }
    366         void destroy($io_arbiter * arbiter) {
     366        void destroy(io_arbiter$ * arbiter) {
    367367                delete(arbiter);
    368368        }
  • libcfa/src/concurrency/io/types.hfa

    r41a6a78 r8bee858  
    3333
    3434        struct processor;
    35         monitor $io_arbiter;
     35        monitor io_arbiter$;
    3636
    3737        //-----------------------------------------------------------------------
     
    125125
    126126
    127         struct __attribute__((aligned(64))) $io_context {
    128                 $io_arbiter * arbiter;
     127        struct __attribute__((aligned(64))) io_context$ {
     128                io_arbiter$ * arbiter;
    129129                processor * proc;
    130130
     
    137137        };
    138138
    139         static inline unsigned long long ts($io_context *& this) {
     139        static inline unsigned long long ts(io_context$ *& this) {
    140140                const __u32 head = *this->cq.head;
    141141                const __u32 tail = *this->cq.tail;
     
    150150                __u32 * idxs;
    151151                __u32 want;
    152                 $io_context * ctx;
     152                io_context$ * ctx;
    153153        };
    154154
    155         monitor __attribute__((aligned(64))) $io_arbiter {
     155        monitor __attribute__((aligned(64))) io_arbiter$ {
    156156                __outstanding_io_queue pending;
    157157        };
     
    186186        #endif
    187187
    188         // void __ioctx_prepare_block($io_context & ctx);
     188        // void __ioctx_prepare_block(io_context$ & ctx);
    189189#endif
Note: See TracChangeset for help on using the changeset viewer.