Another epoll() change: Should not call printf from inside the OS
This commit is contained in:
parent
c74dc5f83f
commit
422ea4f673
@ -37,13 +37,16 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/epoll.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <poll.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/epoll.h>
|
||||
#include <debug.h>
|
||||
|
||||
#ifndef CONFIG_DISABLE_POLL
|
||||
|
||||
@ -111,8 +114,8 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||
switch (op)
|
||||
{
|
||||
case EPOLL_CTL_ADD:
|
||||
printf("%08x CTL ADD(%d): fd=%d ev=%08x\n",
|
||||
epfd, eph->occupied, fd, ev->events);
|
||||
fvdbg("%08x CTL ADD(%d): fd=%d ev=%08x\n",
|
||||
epfd, eph->occupied, fd, ev->events);
|
||||
|
||||
eph->evs[eph->occupied].events = ev->events | POLLERR | POLLHUP;
|
||||
eph->evs[eph->occupied++].data.fd = fd;
|
||||
@ -144,8 +147,8 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||
{
|
||||
int i;
|
||||
|
||||
printf("%08x CTL MOD(%d): fd=%d ev=%08x\n",
|
||||
epfd, eph->occupied, fd, ev->events);
|
||||
fvdbg("%08x CTL MOD(%d): fd=%d ev=%08x\n",
|
||||
epfd, eph->occupied, fd, ev->events);
|
||||
|
||||
for (i = 0; i < eph->occupied; i++)
|
||||
{
|
||||
@ -187,12 +190,12 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents,
|
||||
{
|
||||
if (rc < 0)
|
||||
{
|
||||
printf("%08x poll fail: %d for %d, %d msecs\n",
|
||||
epfd, rc, eph->occupied, timeout);
|
||||
fdbg("%08x poll fail: %d for %d, %d msecs\n",
|
||||
epfd, rc, eph->occupied, timeout);
|
||||
|
||||
for (i = 0; i < eph->occupied; i++)
|
||||
{
|
||||
printf("%02d: fd=%d\n", i, eph->evs[i].data.fd);
|
||||
fdbg("%02d: fd=%d\n", i, eph->evs[i].data.fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user