Changes in / [c72ea7a:44a88528]


Ignore:
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • examples/io_uring.c

    rc72ea7a r44a88528  
    3333      io_uring_prep_readv(sqe, fd, &iov, 1, 0);
    3434
     35      sqe->user_data = data;
     36
    3537      /* tell the kernel we have an sqe ready for consumption */
    3638      io_uring_submit(&ring);
     
    3840      /* wait for the sqe to complete */
    3941      int ret = io_uring_wait_cqe(&ring, &cqe);
    40       printf("%d\n", ret);
     42     
     43      /* read and process cqe event */
     44      if(ret == 0) {
     45            char * out = cqe->user_data;
     46            signed int len = cqe->res;
     47            io_uring_cqe_seen(&ring, cqe);
    4148
    42       /* read and process cqe event */
    43       printf("%s", data);
    44       io_uring_cqe_seen(&ring, cqe);
     49            if(len > 0) {
     50                  printf("%.*s", len, out);
     51            }
     52      }
     53      else {
     54            printf("%d\n", ret);
     55            io_uring_cqe_seen(&ring, cqe);
     56      }
    4557
    4658      io_uring_queue_exit(&ring);
  • libcfa/src/concurrency/kernel.cfa

    rc72ea7a r44a88528  
    344344
    345345                __cfaabi_dbg_debug_do(
    346                         thrd_dst->park_stale = true;
    347                         thrd_dst->park_stale = false;
     346                        thrd_dst->park_stale   = true;
     347                        thrd_dst->unpark_stale = true;
    348348                )
    349349
Note: See TracChangeset for help on using the changeset viewer.