MT#55283 removed unused poller argument

Change-Id: I901ae8cfac177618a5cbf0192932f08060ee96c9
pull/1826/head
Richard Fuchs 1 year ago
parent 128e84edbf
commit a3f6a9228d

@ -1297,7 +1297,7 @@ void free_release_sfd_intf_list(struct sfd_intf_list *il) {
/* called lock-free */ /* called lock-free */
static void stream_fd_closed(int fd, void *p, uintptr_t u) { static void stream_fd_closed(int fd, void *p) {
stream_fd *sfd = p; stream_fd *sfd = p;
call_t *c; call_t *c;
int i; int i;
@ -3135,7 +3135,7 @@ out:
} }
static void stream_fd_readable(int fd, void *p, uintptr_t u) { static void stream_fd_readable(int fd, void *p) {
stream_fd *sfd = p; stream_fd *sfd = p;
char buf[RTP_BUFFER_SIZE]; char buf[RTP_BUFFER_SIZE];
int ret, iters; int ret, iters;
@ -3197,7 +3197,7 @@ restart:
continue; continue;
if (errno == EAGAIN || errno == EWOULDBLOCK) if (errno == EAGAIN || errno == EWOULDBLOCK)
break; break;
stream_fd_closed(fd, sfd, 0); stream_fd_closed(fd, sfd);
goto done; goto done;
} }
if (ret >= MAX_RTP_PACKET_SIZE) if (ret >= MAX_RTP_PACKET_SIZE)

@ -29,7 +29,7 @@ struct streambuf_callback {
TYPED_GHASHTABLE_IMPL(tcp_streams_ht, g_direct_hash, g_direct_equal, NULL, NULL) TYPED_GHASHTABLE_IMPL(tcp_streams_ht, g_direct_hash, g_direct_equal, NULL, NULL)
static void tcp_listener_incoming(int fd, void *p, uintptr_t x) { static void tcp_listener_incoming(int fd, void *p) {
struct tcp_listener_callback *cb = p; struct tcp_listener_callback *cb = p;
int ret; int ret;
char addr[64]; char addr[64];
@ -57,7 +57,7 @@ static void tcp_listener_incoming(int fd, void *p, uintptr_t x) {
} }
} }
static void tcp_listener_closed(int fd, void *p, uintptr_t u) { static void tcp_listener_closed(int fd, void *p) {
abort(); abort();
} }
@ -108,7 +108,7 @@ static void streambuf_stream_free(void *p) {
free(s->addr); free(s->addr);
} }
static void streambuf_stream_closed(int fd, void *p, uintptr_t u) { static void streambuf_stream_closed(int fd, void *p) {
struct streambuf_stream *s = p; struct streambuf_stream *s = p;
if (s->sock.fd == -1) if (s->sock.fd == -1)
@ -127,7 +127,7 @@ static void streambuf_stream_closed(int fd, void *p, uintptr_t u) {
obj_put(s); obj_put(s);
} }
static void streambuf_stream_readable(int fd, void *p, uintptr_t u) { static void streambuf_stream_readable(int fd, void *p) {
struct streambuf_stream *s = p; struct streambuf_stream *s = p;
int ret = streambuf_readable(s->inbuf); int ret = streambuf_readable(s->inbuf);
@ -142,14 +142,14 @@ static void streambuf_stream_readable(int fd, void *p, uintptr_t u) {
return; return;
close: close:
streambuf_stream_closed(fd, s, 0); streambuf_stream_closed(fd, s);
} }
static void streambuf_stream_writeable(int fd, void *p, uintptr_t u) { static void streambuf_stream_writeable(int fd, void *p) {
struct streambuf_stream *s = p; struct streambuf_stream *s = p;
if (streambuf_writeable(s->outbuf)) if (streambuf_writeable(s->outbuf))
streambuf_stream_closed(fd, s, 0); streambuf_stream_closed(fd, s);
} }
@ -248,7 +248,7 @@ void streambuf_listener_shutdown(struct streambuf_listener *listener) {
} }
void streambuf_stream_close(struct streambuf_stream *s) { void streambuf_stream_close(struct streambuf_stream *s) {
streambuf_stream_closed(s->sock.fd, s, 0); streambuf_stream_closed(s->sock.fd, s);
} }
void streambuf_stream_shutdown(struct streambuf_stream *s) { void streambuf_stream_shutdown(struct streambuf_stream *s) {
shutdown(s->sock.fd, SHUT_WR); shutdown(s->sock.fd, SHUT_WR);

@ -22,11 +22,11 @@ struct udp_listener_callback {
struct obj *p; struct obj *p;
}; };
static void udp_listener_closed(int fd, void *p, uintptr_t x) { static void udp_listener_closed(int fd, void *p) {
abort(); abort();
} }
static void udp_listener_incoming(int fd, void *p, uintptr_t x) { static void udp_listener_incoming(int fd, void *p) {
struct udp_listener_callback *cb = p; struct udp_listener_callback *cb = p;
int len; int len;
struct udp_buffer *udp_buf = NULL; struct udp_buffer *udp_buf = NULL;

@ -208,12 +208,12 @@ static int poller_poll(struct poller *p, int timeout, struct epoll_event *evs, i
mutex_unlock(&p->lock); mutex_unlock(&p->lock);
if (it->error) { if (it->error) {
it->item.closed(it->item.fd, it->item.obj, it->item.uintp); it->item.closed(it->item.fd, it->item.obj);
goto next; goto next;
} }
if ((ev->events & (POLLERR | POLLHUP))) if ((ev->events & (POLLERR | POLLHUP)))
it->item.closed(it->item.fd, it->item.obj, it->item.uintp); it->item.closed(it->item.fd, it->item.obj);
else if ((ev->events & POLLOUT)) { else if ((ev->events & POLLOUT)) {
mutex_lock(&p->lock); mutex_lock(&p->lock);
it->blocked = 0; it->blocked = 0;
@ -226,10 +226,10 @@ static int poller_poll(struct poller *p, int timeout, struct epoll_event *evs, i
mutex_unlock(&p->lock); mutex_unlock(&p->lock);
if (eret == 0 && it->item.writeable) if (eret == 0 && it->item.writeable)
it->item.writeable(it->item.fd, it->item.obj, it->item.uintp); it->item.writeable(it->item.fd, it->item.obj);
} }
else if ((ev->events & POLLIN)) else if ((ev->events & POLLIN))
it->item.readable(it->item.fd, it->item.obj, it->item.uintp); it->item.readable(it->item.fd, it->item.obj);
else if (!ev->events) else if (!ev->events)
goto next; goto next;
else else

@ -14,12 +14,11 @@ struct obj;
typedef void (*poller_func_t)(int, void *, uintptr_t); typedef void (*poller_func_t)(int, void *);
struct poller_item { struct poller_item {
int fd; int fd;
struct obj *obj; struct obj *obj;
uintptr_t uintp;
poller_func_t readable; poller_func_t readable;
poller_func_t writeable; poller_func_t writeable;

@ -328,7 +328,7 @@ static void *worker(void *p) {
return NULL; return NULL;
} }
static void readable(int fd, void *o, uintptr_t x) { static void readable(int fd, void *o) {
struct stream *s = o; struct stream *s = o;
obj_hold(s); obj_hold(s);
@ -391,7 +391,7 @@ static void readable(int fd, void *o, uintptr_t x) {
worker_self->comput += end - start; worker_self->comput += end - start;
} }
static void closed(int fd, void *o, uintptr_t x) { static void closed(int fd, void *o) {
abort(); abort();
} }

Loading…
Cancel
Save