return ev->ev_arg;
}
+int
+event_get_priority(const struct event *ev)
+{
+ event_debug_assert_is_setup_(ev);
+ return ev->ev_pri;
+}
+
int
event_add(struct event *ev, const struct timeval *tv)
{
*/
void *event_get_callback_arg(const struct event *ev);
+/**
+ Return the priority of an event.
+ @see event_priority_init(), event_get_priority()
+*/
+int event_get_priority(const struct event *ev);
+
/**
Extract _all_ of arguments given to construct a given event. The
event_base is copied into *base_out, the fd is copied into *fd_out, and so
@param ev an event struct
@param priority the new priority to be assigned
@return 0 if successful, or -1 if an error occurred
- @see event_priority_init()
+ @see event_priority_init(), event_get_priority()
*/
int event_priority_set(struct event *, int);