Ignore:
File:
1 edited

Legend:

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

    r2d8f7b0 r038be32  
    4040void   P (semaphore & this);
    4141bool   V (semaphore & this);
     42bool   V (semaphore & this, unsigned count);
    4243
    4344
     
    144145        void * ring_ptr;
    145146        size_t ring_sz;
     147
     148        // Statistics
     149        #if !defined(__CFA_NO_STATISTICS__)
     150                struct {
     151                        struct {
     152                                unsigned long long int val;
     153                                unsigned long long int cnt;
     154                        } submit_avg;
     155                } stats;
     156        #endif
    146157};
    147158
     
    164175        void * ring_ptr;
    165176        size_t ring_sz;
     177
     178        // Statistics
     179        #if !defined(__CFA_NO_STATISTICS__)
     180                struct {
     181                        struct {
     182                                unsigned long long int val;
     183                                unsigned long long int cnt;
     184                        } completed_avg;
     185                } stats;
     186        #endif
    166187};
    167188
     
    213234                struct io_ring io;
    214235        #endif
     236
     237        #if !defined(__CFA_NO_STATISTICS__)
     238                bool print_stats;
     239        #endif
    215240};
    216241extern Duration default_preemption();
     
    227252static inline struct processor * active_processor() { return TL_GET( this_processor ); } // UNSAFE
    228253static inline struct cluster   * active_cluster  () { return TL_GET( this_processor )->cltr; }
     254
     255#if !defined(__CFA_NO_STATISTICS__)
     256        static inline void print_stats_at_exit( cluster & this ) {
     257                this.print_stats = true;
     258        }
     259#endif
    229260
    230261// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.