mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-11 05:14:46 -04:00
event_get_version() and event_get_method() from
Nick Mathewson <nickm@freehaven.net> svn:r133
This commit is contained in:
parent
a46c2609bf
commit
c5e4eee03b
19
event.c
19
event.c
@ -798,3 +798,22 @@ event_queue_insert(struct event_base *base, struct event *ev, int queue)
|
|||||||
errx(1, "%s: unknown queue %x", __func__, 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);
|
||||||
|
}
|
||||||
|
4
event.h
4
event.h
@ -172,6 +172,10 @@ int event_pending(struct event *, short, struct timeval *);
|
|||||||
#define event_initialized(ev) ((ev)->ev_flags & EVLIST_INIT)
|
#define event_initialized(ev) ((ev)->ev_flags & EVLIST_INIT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Some simple debugging functions */
|
||||||
|
const char *event_get_version(void);
|
||||||
|
const char *event_get_method(void);
|
||||||
|
|
||||||
/* These functions deal with event priorities */
|
/* These functions deal with event priorities */
|
||||||
|
|
||||||
int event_priority_init(int);
|
int event_priority_init(int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user