Ignore:
Timestamp:
Apr 30, 2020, 3:27:11 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
9987d79
Parents:
c59a346
Message:

Added new implementation of io_uring that uses user-thread

File:
1 edited

Legend:

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

    rc59a346 rf6660520  
    136136        // Like head/tail but not seen by the kernel
    137137        volatile uint32_t alloc;
     138        volatile uint32_t ready;
    138139
    139140        __spinlock_t lock;
     
    187188};
    188189
     190#if defined(__CFA_IO_POLLING_USER__)
     191        struct __io_poller_fast {
     192                struct io_ring * ring;
     193                $thread thrd;
     194        };
     195#endif
     196
    189197struct io_ring {
    190198        struct io_uring_sq submit_q;
     
    192200        uint32_t flags;
    193201        int fd;
    194         pthread_t poller;
    195         void * stack;
     202        semaphore submit;
    196203        volatile bool done;
    197         semaphore submit;
     204        struct {
     205                struct {
     206                        void * stack;
     207                        pthread_t kthrd;
     208                } slow;
     209                #if defined(__CFA_IO_POLLING_USER__)
     210                        __io_poller_fast fast;
     211                        __bin_sem_t sem;
     212                #endif
     213        } poller;
    198214};
    199215#endif
Note: See TracChangeset for help on using the changeset viewer.