Ignore:
File:
1 edited

Legend:

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

    rf6660520 r2d8f7b0  
    4040void   P (semaphore & this);
    4141bool   V (semaphore & this);
    42 bool   V (semaphore & this, unsigned count);
    4342
    4443
     
    136135        // Like head/tail but not seen by the kernel
    137136        volatile uint32_t alloc;
    138         volatile uint32_t ready;
    139137
    140138        __spinlock_t lock;
     
    146144        void * ring_ptr;
    147145        size_t ring_sz;
    148 
    149         // Statistics
    150         #if !defined(__CFA_NO_STATISTICS__)
    151                 struct {
    152                         struct {
    153                                 unsigned long long int val;
    154                                 unsigned long long int cnt;
    155                         } submit_avg;
    156                 } stats;
    157         #endif
    158146};
    159147
     
    176164        void * ring_ptr;
    177165        size_t ring_sz;
    178 
    179         // Statistics
    180         #if !defined(__CFA_NO_STATISTICS__)
    181                 struct {
    182                         struct {
    183                                 unsigned long long int val;
    184                                 unsigned long long int cnt;
    185                         } completed_avg;
    186                 } stats;
    187         #endif
    188 };
    189 
    190 #if defined(__CFA_IO_POLLING_USER__)
    191         struct __io_poller_fast {
    192                 struct io_ring * ring;
    193                 $thread thrd;
    194         };
    195 #endif
     166};
    196167
    197168struct io_ring {
     
    200171        uint32_t flags;
    201172        int fd;
     173        pthread_t poller;
     174        void * stack;
     175        volatile bool done;
    202176        semaphore submit;
    203         volatile bool done;
    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;
    214177};
    215178#endif
     
    250213                struct io_ring io;
    251214        #endif
    252 
    253         #if !defined(__CFA_NO_STATISTICS__)
    254                 bool print_stats;
    255         #endif
    256215};
    257216extern Duration default_preemption();
     
    268227static inline struct processor * active_processor() { return TL_GET( this_processor ); } // UNSAFE
    269228static inline struct cluster   * active_cluster  () { return TL_GET( this_processor )->cltr; }
    270 
    271 #if !defined(__CFA_NO_STATISTICS__)
    272         static inline void print_stats_at_exit( cluster & this ) {
    273                 this.print_stats = true;
    274         }
    275 #endif
    276229
    277230// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.