Ignore:
Timestamp:
Mar 22, 2021, 2:24:00 PM (7 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
d27b6be
Parents:
5c2b454
Message:

Temporary hack to allow printing stats in memcached

Location:
libcfa/src/concurrency/clib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/clib/cfathread.cfa

    r5c2b454 rd971c8d  
    1717#include "locks.hfa"
    1818#include "kernel.hfa"
     19#include "stats.hfa"
    1920#include "thread.hfa"
    2021#include "time.hfa"
     
    139140        cfathread_cluster_t cfathread_cluster_self(void) {
    140141                return active_cluster();
     142        }
     143
     144        int cfathread_cluster_print_stats( cfathread_cluster_t cl ) {
     145                #if !defined(__CFA_NO_STATISTICS__)
     146                        print_stats_at_exit( *cl, CFA_STATS_READY_Q | CFA_STATS_IO );
     147                        print_stats_now( *cl, CFA_STATS_READY_Q | CFA_STATS_IO );
     148                #endif
     149                return 0;
    141150        }
    142151
  • libcfa/src/concurrency/clib/cfathread.h

    r5c2b454 rd971c8d  
    2929        int cfathread_cluster_create(cfathread_cluster_t * cluster);
    3030        cfathread_cluster_t cfathread_cluster_self(void);
     31        int cfathread_cluster_print_stats(cfathread_cluster_t cluster);
    3132        int cfathread_cluster_add_worker(cfathread_cluster_t cluster, pthread_t* tid, void (*init_routine) (void *), void * arg);
    3233        int cfathread_cluster_pause (cfathread_cluster_t cluster);
Note: See TracChangeset for help on using the changeset viewer.