Changeset 93829cb for libcfa


Ignore:
Timestamp:
Mar 2, 2022, 2:11:32 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
362f760
Parents:
ced2e855
Message:

Added helper function to zero out sqes.
Not done in allocate since so it can be inlined and redudant writes eliminated.

File:
1 edited

Legend:

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

    rced2e855 r93829cb  
    1919extern "C" {
    2020        #include <asm/types.h>
     21        #include <sys/stat.h> // needed for mode_t
    2122        #if CFA_HAVE_LINUX_IO_URING_H
    2223                #include <linux/io_uring.h>
     
    133134// Check if a function is blocks a only the user thread
    134135bool has_user_level_blocking( fptr_t func );
     136
     137#if CFA_HAVE_LINUX_IO_URING_H
     138        static inline void zero_sqe(struct io_uring_sqe * sqe) {
     139                sqe->flags = 0;
     140                sqe->ioprio = 0;
     141                sqe->fd = 0;
     142                sqe->off = 0;
     143                sqe->addr = 0;
     144                sqe->len = 0;
     145                sqe->fsync_flags = 0;
     146                sqe->__pad2[0] = 0;
     147                sqe->__pad2[1] = 0;
     148                sqe->__pad2[2] = 0;
     149                sqe->fd = 0;
     150                sqe->off = 0;
     151                sqe->addr = 0;
     152                sqe->len = 0;
     153        }
     154#endif
Note: See TracChangeset for help on using the changeset viewer.