event_get_version() and event_get_method() from

Nick Mathewson <nickm@freehaven.net>


svn:r133
This commit is contained in:
Niels Provos 2005-02-25 05:28:57 +00:00
parent a46c2609bf
commit c5e4eee03b
2 changed files with 23 additions and 0 deletions

19
event.c
View File

@ -798,3 +798,22 @@ event_queue_insert(struct event_base *base, struct event *ev, int queue)
errx(1, "%s: unknown queue %x", __func__, queue);
}
}
/* Functions for debugging */
const char *
event_get_version(void)
{
return (VERSION);
}
/*
* No thread-safe interface needed - the information should be the same
* for all threads.
*/
const char *
event_get_method(void)
{
return (current_base->evsel->name);
}

View File

@ -172,6 +172,10 @@ int event_pending(struct event *, short, struct timeval *);
#define event_initialized(ev) ((ev)->ev_flags & EVLIST_INIT)
#endif
/* Some simple debugging functions */
const char *event_get_version(void);
const char *event_get_method(void);
/* These functions deal with event priorities */
int event_priority_init(int);