]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep_decls.h
Threads now have load averages of sorts.
[citadel.git] / citadel / sysdep_decls.h
index cb40fb0e0f29448dc9f568796840e273789040c2..1b000f7b267205806021d1efeb1802fd4282a10c 100644 (file)
@@ -143,6 +143,12 @@ extern struct CtdlThreadNode {
        pthread_mutex_t ThreadMutex;            /* A mutex to sync this thread to others if this thread allows (also used for sleeping) */
        pthread_cond_t ThreadCond;              /* A condition variable to sync this thread with others (also used for sleeping) */
        pthread_attr_t attr;                    /* Attributes of this thread */
+       struct timeval start_time;              /* Time this thread was started */
+       struct timeval last_state_change;       /* Time when this thread last changed state */
+       double avg_sleeping;                    /* Average sleeping time */
+       double avg_running;                     /* Average running time */
+       double avg_blocked;                     /* Average blocked time */
+       double load_avg;                        /* Load average for this thread */
        struct CtdlThreadNode *prev;            /* Previous thread in the thread table */
        struct CtdlThreadNode *next;            /* Next thread in the thread table */
 } *CtdlThreadList;