mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
replace references to __FUNCTION__ with __func__
svn:r40
This commit is contained in:
parent
3c2916aa13
commit
e72dff13d9
10
event.c
10
event.c
@ -207,7 +207,7 @@ event_loop(int flags)
|
|||||||
struct timeval off;
|
struct timeval off;
|
||||||
LOG_DBG((LOG_MIST, 10,
|
LOG_DBG((LOG_MIST, 10,
|
||||||
"%s: time is running backwards, corrected",
|
"%s: time is running backwards, corrected",
|
||||||
__FUNCTION__));
|
__func__));
|
||||||
|
|
||||||
timersub(&event_tv, &tv, &off);
|
timersub(&event_tv, &tv, &off);
|
||||||
timeout_correct(&off);
|
timeout_correct(&off);
|
||||||
@ -464,7 +464,7 @@ void
|
|||||||
event_queue_remove(struct event *ev, int queue)
|
event_queue_remove(struct event *ev, int queue)
|
||||||
{
|
{
|
||||||
if (!(ev->ev_flags & queue))
|
if (!(ev->ev_flags & queue))
|
||||||
errx(1, "%s: %p(fd %d) not on queue %x", __FUNCTION__,
|
errx(1, "%s: %p(fd %d) not on queue %x", __func__,
|
||||||
ev, ev->ev_fd, queue);
|
ev, ev->ev_fd, queue);
|
||||||
|
|
||||||
ev->ev_flags &= ~queue;
|
ev->ev_flags &= ~queue;
|
||||||
@ -482,7 +482,7 @@ event_queue_remove(struct event *ev, int queue)
|
|||||||
TAILQ_REMOVE(&eventqueue, ev, ev_next);
|
TAILQ_REMOVE(&eventqueue, ev, ev_next);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
errx(1, "%s: unknown queue %x", __FUNCTION__, queue);
|
errx(1, "%s: unknown queue %x", __func__, queue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,7 +490,7 @@ void
|
|||||||
event_queue_insert(struct event *ev, int queue)
|
event_queue_insert(struct event *ev, int queue)
|
||||||
{
|
{
|
||||||
if (ev->ev_flags & queue)
|
if (ev->ev_flags & queue)
|
||||||
errx(1, "%s: %p(fd %d) already on queue %x", __FUNCTION__,
|
errx(1, "%s: %p(fd %d) already on queue %x", __func__,
|
||||||
ev, ev->ev_fd, queue);
|
ev, ev->ev_fd, queue);
|
||||||
|
|
||||||
ev->ev_flags |= queue;
|
ev->ev_flags |= queue;
|
||||||
@ -508,6 +508,6 @@ event_queue_insert(struct event *ev, int queue)
|
|||||||
TAILQ_INSERT_TAIL(&eventqueue, ev, ev_next);
|
TAILQ_INSERT_TAIL(&eventqueue, ev, ev_next);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
errx(1, "%s: unknown queue %x", __FUNCTION__, queue);
|
errx(1, "%s: unknown queue %x", __func__, queue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
17
kqueue.c
17
kqueue.c
@ -47,12 +47,13 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <err.h>
|
||||||
|
|
||||||
#ifdef USE_LOG
|
#ifdef USE_LOG
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#else
|
#else
|
||||||
#define LOG_DBG(x)
|
#define LOG_DBG(x)
|
||||||
#define log_error(x) perror(x)
|
#define log_error warn
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
@ -142,7 +143,7 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
|
|||||||
newchange = realloc(kqop->changes,
|
newchange = realloc(kqop->changes,
|
||||||
nevents * sizeof(struct kevent));
|
nevents * sizeof(struct kevent));
|
||||||
if (newchange == NULL) {
|
if (newchange == NULL) {
|
||||||
log_error(__FUNCTION__": malloc");
|
log_error("%s: malloc", __func__);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
kqop->changes = newchange;
|
kqop->changes = newchange;
|
||||||
@ -155,7 +156,7 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
|
|||||||
* the next realloc will pick it up.
|
* the next realloc will pick it up.
|
||||||
*/
|
*/
|
||||||
if (newresult == NULL) {
|
if (newresult == NULL) {
|
||||||
log_error(__FUNCTION__": malloc");
|
log_error("%s: malloc", __func__);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
kqop->events = newchange;
|
kqop->events = newchange;
|
||||||
@ -165,8 +166,8 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
|
|||||||
|
|
||||||
memcpy(&kqop->changes[kqop->nchanges++], kev, sizeof(struct kevent));
|
memcpy(&kqop->changes[kqop->nchanges++], kev, sizeof(struct kevent));
|
||||||
|
|
||||||
LOG_DBG((LOG_MISC, 70, __FUNCTION__": fd %d %s%s",
|
LOG_DBG((LOG_MISC, 70, "%s: fd %d %s%s",
|
||||||
kev->ident,
|
__func__, kev->ident,
|
||||||
kev->filter == EVFILT_READ ? "EVFILT_READ" : "EVFILT_WRITE",
|
kev->filter == EVFILT_READ ? "EVFILT_READ" : "EVFILT_WRITE",
|
||||||
kev->flags == EV_DELETE ? " (del)" : ""));
|
kev->flags == EV_DELETE ? " (del)" : ""));
|
||||||
|
|
||||||
@ -203,7 +204,7 @@ kq_dispatch(void *arg, struct timeval *tv)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DBG((LOG_MISC, 80, __FUNCTION__": kevent reports %d", res));
|
LOG_DBG((LOG_MISC, 80, "%s: kevent reports %d", __func__, res));
|
||||||
|
|
||||||
for (i = 0; i < res; i++) {
|
for (i = 0; i < res; i++) {
|
||||||
int which = 0;
|
int which = 0;
|
||||||
@ -225,7 +226,7 @@ kq_dispatch(void *arg, struct timeval *tv)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ev = events[i].udata;
|
ev = (struct event *)events[i].udata;
|
||||||
|
|
||||||
if (events[i].filter == EVFILT_READ) {
|
if (events[i].filter == EVFILT_READ) {
|
||||||
which |= EV_READ;
|
which |= EV_READ;
|
||||||
@ -250,7 +251,7 @@ kq_dispatch(void *arg, struct timeval *tv)
|
|||||||
if (events[i].flags & EV_ERROR || events[i].filter == NULL)
|
if (events[i].flags & EV_ERROR || events[i].filter == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ev = events[i].udata;
|
ev = (struct event *)events[i].udata;
|
||||||
if (ev->ev_events & EV_PERSIST)
|
if (ev->ev_events & EV_PERSIST)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
7
poll.c
7
poll.c
@ -122,7 +122,7 @@ int
|
|||||||
poll_dispatch(void *arg, struct timeval *tv)
|
poll_dispatch(void *arg, struct timeval *tv)
|
||||||
{
|
{
|
||||||
int res, i, count, sec, nfds;
|
int res, i, count, sec, nfds;
|
||||||
struct event *ev, *next;
|
struct event *ev;
|
||||||
struct pollop *pop = arg;
|
struct pollop *pop = arg;
|
||||||
|
|
||||||
count = pop->event_count;
|
count = pop->event_count;
|
||||||
@ -192,8 +192,7 @@ poll_dispatch(void *arg, struct timeval *tv)
|
|||||||
} else if (evsignal_caught)
|
} else if (evsignal_caught)
|
||||||
evsignal_process();
|
evsignal_process();
|
||||||
|
|
||||||
LOG_DBG((LOG_MISC, 80, __FUNCTION__": poll reports %d",
|
LOG_DBG((LOG_MISC, 80, "%s: poll reports %d", __func__, res));
|
||||||
res));
|
|
||||||
|
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
return (0);
|
return (0);
|
||||||
@ -240,8 +239,6 @@ poll_del(void *arg, struct event *ev)
|
|||||||
{
|
{
|
||||||
struct pollop *pop = arg;
|
struct pollop *pop = arg;
|
||||||
|
|
||||||
int signal;
|
|
||||||
|
|
||||||
if (!(ev->ev_events & EV_SIGNAL))
|
if (!(ev->ev_events & EV_SIGNAL))
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
|
3
select.c
3
select.c
@ -194,8 +194,7 @@ select_dispatch(void *arg, struct timeval *tv)
|
|||||||
} else if (evsignal_caught)
|
} else if (evsignal_caught)
|
||||||
evsignal_process();
|
evsignal_process();
|
||||||
|
|
||||||
LOG_DBG((LOG_MISC, 80, __FUNCTION__": select reports %d",
|
LOG_DBG((LOG_MISC, 80, "%s: select reports %d", __func__, res));
|
||||||
res));
|
|
||||||
|
|
||||||
maxfd = 0;
|
maxfd = 0;
|
||||||
for (ev = TAILQ_FIRST(&eventqueue); ev != NULL; ev = next) {
|
for (ev = TAILQ_FIRST(&eventqueue); ev != NULL; ev = next) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user