Addition of DCB and Poll statistics in show status output

This commit is contained in:
Mark Riddoch
2015-02-20 10:05:50 +00:00
parent df3a548be1
commit 8eb14235d1
7 changed files with 287 additions and 10 deletions

View File

@ -271,6 +271,18 @@ typedef struct dcb {
#endif
} DCB;
/**
* The DCB usage filer used for returning DCB's in use for a certain reason
*/
typedef enum {
DCB_USAGE_CLIENT,
DCB_USAGE_LISTENER,
DCB_USAGE_BACKEND,
DCB_USAGE_INTERNAL,
DCB_USAGE_ZOMBIE,
DCB_USAGE_ALL
} DCB_USAGE;
#if defined(FAKE_CODE)
unsigned char dcb_fake_write_errno[10240];
__int32_t dcb_fake_write_ev[10240];
@ -319,6 +331,7 @@ int dcb_add_callback(DCB *, DCB_REASON, int (*)(struct dcb *, DCB_REASON, void
int dcb_remove_callback(DCB *, DCB_REASON, int (*)(struct dcb *, DCB_REASON, void *),
void *);
int dcb_isvalid(DCB *); /* Check the DCB is in the linked list */
int dcb_count_by_usage(DCB_USAGE); /* Return counts of DCBs */
bool dcb_set_state(DCB* dcb, dcb_state_t new_state, dcb_state_t* old_state);
void dcb_call_foreach (DCB_REASON reason);