Ignore:
Timestamp:
Aug 20, 2020, 11:48:15 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d685cb0
Parents:
67ca73e (diff), 013b028 (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:

fix conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/io/types.hfa

    r67ca73e re67a82d  
    1717
    1818#if defined(CFA_HAVE_LINUX_IO_URING_H)
     19        extern "C" {
     20                #include <linux/types.h>
     21        }
     22
    1923      #include "bits/locks.hfa"
     24
     25        #define LEADER_LOCK
     26        struct __leaderlock_t {
     27                struct $thread * volatile value;        // ($thread) next_leader | (bool:1) is_locked
     28        };
     29
     30        static inline void ?{}( __leaderlock_t & this ) { this.value = 0p; }
    2031
    2132        //-----------------------------------------------------------------------
     
    2334      struct __submition_data {
    2435                // Head and tail of the ring (associated with array)
    25                 volatile uint32_t * head;
    26                 volatile uint32_t * tail;
    27                 volatile uint32_t prev_head;
     36                volatile __u32 * head;
     37                volatile __u32 * tail;
     38                volatile __u32 prev_head;
    2839
    2940                // The actual kernel ring which uses head/tail
    3041                // indexes into the sqes arrays
    31                 uint32_t * array;
     42                __u32 * array;
    3243
    3344                // number of entries and mask to go with it
    34                 const uint32_t * num;
    35                 const uint32_t * mask;
     45                const __u32 * num;
     46                const __u32 * mask;
    3647
    3748                // Submission flags (Not sure what for)
    38                 uint32_t * flags;
     49                __u32 * flags;
    3950
    4051                // number of sqes not submitted (whatever that means)
    41                 uint32_t * dropped;
     52                __u32 * dropped;
    4253
    4354                // Like head/tail but not seen by the kernel
    44                 volatile uint32_t * ready;
    45                 uint32_t ready_cnt;
     55                volatile __u32 * ready;
     56                __u32 ready_cnt;
     57                __u32 prev_ready;
    4658
    47                 __spinlock_t lock;
    48                 __spinlock_t release_lock;
     59                #if defined(LEADER_LOCK)
     60                        __leaderlock_t submit_lock;
     61                #else
     62                        __spinlock_t submit_lock;
     63                #endif
     64                __spinlock_t  release_lock;
    4965
    5066                // A buffer of sqes (not the actual ring)
     
    5874        struct __completion_data {
    5975                // Head and tail of the ring
    60                 volatile uint32_t * head;
    61                 volatile uint32_t * tail;
     76                volatile __u32 * head;
     77                volatile __u32 * tail;
    6278
    6379                // number of entries and mask to go with it
    64                 const uint32_t * mask;
    65                 const uint32_t * num;
     80                const __u32 * mask;
     81                const __u32 * num;
    6682
    6783                // number of cqes not submitted (whatever that means)
    68                 uint32_t * overflow;
     84                __u32 * overflow;
    6985
    7086                // the kernel ring
     
    7995                struct __submition_data submit_q;
    8096                struct __completion_data completion_q;
    81                 uint32_t ring_flags;
     97                __u32 ring_flags;
    8298                int fd;
    8399                bool eager_submits:1;
     
    89105        // IO user data
    90106        struct __io_user_data_t {
    91                 int32_t result;
    92                 $thread * thrd;
     107                __s32 result;
     108                oneshot sem;
    93109        };
    94110
Note: See TracChangeset for help on using the changeset viewer.