mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 18:44:10 +08:00
Change delete_timeouts into a macro.
This commit is contained in:
parent
681087be60
commit
ebf35f468c
10
eloop.c
10
eloop.c
@ -223,16 +223,6 @@ delete_q_timeouts(int queue, void *arg, void (*callback)(void *), ...)
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
void
|
||||
delete_timeouts( void *arg, void (*callback)(void *), ...)
|
||||
{
|
||||
va_list va;
|
||||
|
||||
va_start(va, callback);
|
||||
v_delete_q_timeouts(0, arg, callback, va);
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
void
|
||||
delete_q_timeout(int queue, void (*callback)(void *), void *arg)
|
||||
{
|
||||
|
2
eloop.h
2
eloop.h
@ -37,6 +37,7 @@
|
||||
#define add_timeout_tv(a, b, c) add_q_timeout_tv(ELOOP_QUEUE, a, b, c)
|
||||
#define add_timeout_sec(a, b, c) add_q_timeout_sec(ELOOP_QUEUE, a, b, c)
|
||||
#define delete_timeout(a, b) delete_q_timeout(ELOOP_QUEUE, a, b)
|
||||
#define delete_timeouts(a, ...) delete_q_timeouts(ELOOP_QUEUE, a, __VA_ARGS__)
|
||||
|
||||
void add_event(int fd, void (*)(void *), void *);
|
||||
void delete_event(int fd);
|
||||
@ -45,7 +46,6 @@ void add_q_timeout_tv(int queue, const struct timeval *, void (*)(void *),
|
||||
void *);
|
||||
void delete_q_timeout(int, void (*)(void *), void *);
|
||||
void delete_q_timeouts(int, void *, void (*)(void *), ...);
|
||||
void delete_timeouts(void *, void (*)(void *), ...);
|
||||
void start_eloop(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user