Ignore:
Timestamp:
Apr 23, 2020, 5:53:21 PM (18 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
9edf835, cefc59f
Parents:
40b5417 (diff), 8962722 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r40b5417 r2a01c9b  
    3636
    3737        static void * __io_poller( void * arg );
     38
     39       // Weirdly, some systems that do support io_uring don't actually define these
     40       #ifdef __alpha__
     41       /*
     42       * alpha is the only exception, all other architectures
     43       * have common numbers for new system calls.
     44       */
     45       # ifndef __NR_io_uring_setup
     46       #  define __NR_io_uring_setup           535
     47       # endif
     48       # ifndef __NR_io_uring_enter
     49       #  define __NR_io_uring_enter           536
     50       # endif
     51       # ifndef __NR_io_uring_register
     52       #  define __NR_io_uring_register        537
     53       # endif
     54       #else /* !__alpha__ */
     55       # ifndef __NR_io_uring_setup
     56       #  define __NR_io_uring_setup           425
     57       # endif
     58       # ifndef __NR_io_uring_enter
     59       #  define __NR_io_uring_enter           426
     60       # endif
     61       # ifndef __NR_io_uring_register
     62       #  define __NR_io_uring_register        427
     63       # endif
     64       #endif
     65
    3866
    3967//=============================================================================================
     
    188216
    189217                struct io_user_data * data = (struct io_user_data *)cqe.user_data;
    190                 __cfaabi_bits_print_safe( STDERR_FILENO, "Performed reading io cqe %p, result %d for %p\n", data, cqe.res, data->thrd );
     218                // __cfaabi_bits_print_safe( STDERR_FILENO, "Performed reading io cqe %p, result %d for %p\n", data, cqe.res, data->thrd );
    191219
    192220                data->result = cqe.res;
     
    296324        // Submit however, many entries need to be submitted
    297325        int ret = syscall( __NR_io_uring_enter, ring.fd, 1, 0, 0, 0p, 0);
    298         __cfaabi_bits_print_safe( STDERR_FILENO, "Performed io_submit, returned %d\n", ret );
     326        // __cfaabi_bits_print_safe( STDERR_FILENO, "Performed io_submit, returned %d\n", ret );
    299327        if( ret < 0 ) {
    300328                switch((int)errno) {
     
    352380        #define __submit_wait \
    353381                io_user_data data = { 0, active_thread() }; \
    354                 __cfaabi_bits_print_safe( STDERR_FILENO, "Preparing user data %p for %p\n", &data, data.thrd ); \
     382                /*__cfaabi_bits_print_safe( STDERR_FILENO, "Preparing user data %p for %p\n", &data, data.thrd );*/ \
    355383                sqe->user_data = (uint64_t)&data; \
    356384                __submit( ring, idx ); \
     
    575603        int async_statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) {
    576604                #if !defined(IORING_OP_STATX)
    577                         return statx( dirfd, pathname, flags, mask, statxbuf );
     605                        //return statx( dirfd, pathname, flags, mask, statxbuf );
     606                        return syscall( __NR_io_uring_setup, dirfd, pathname, flags, mask, statxbuf );
    578607                #else
    579608                        __submit_prelude
Note: See TracChangeset for help on using the changeset viewer.