search for: rfds

Displaying 20 results from an estimated 44 matches for "rfds".

Did you mean: fds
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
...lect_poll(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds) { @@ -983,6 +1007,71 @@ out: return ret; } +/* Wrap around select */ +int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout) +{ + int ret; + int i, fd; + struct timeval _timeo, *timeo = NULL; + fd_set rfds, wfds, efds; + int max_fd = -1; + + DEBUG("poll("); + dump_pollfds(_pfd, _nfds, _timeout); + DEBUG(")\n"); + + if (_timeout != -1) { + /* Timeout in poll is in millisecond. */ + _timeo.tv_sec = _timeout / 1000; + _timeo.tv_usec = (_timeout -...
2014 Feb 13
3
Libguestfs (1.22.6) driver/changes for mingw/win32
Hi, I attached the changes I made to a vanilla libguestfs-1.22.6 in order to make it work in mingw/win32. Added is also the patch required to make QEMU compatible (add a command to QMP that lists the supported devices (the regilat way you do it print it to stderr, which is difficult to redirect in win32)). This is done on behalf of Intel Corp. Thanks, Or (oberon in irc)
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...ive(void *opaque) return (n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK) && n->can_receive; } -static void virtio_net_receive(void *opaque, const uint8_t *buf, int size) +void virtio_net_poll(void) { - VirtIONet *n = opaque; + VirtIONet *vnet; + int len; + fd_set rfds; + struct timeval tv; + int max_fd = -1; VirtQueueElement elem; struct virtio_net_hdr *hdr; - int offset, i; - - /* FIXME: the drivers really need to set their status better */ - if (n->rx_vq->vring.avail == NULL) { - n->can_receive = 0; - return; - } - -...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...ive(void *opaque) return (n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK) && n->can_receive; } -static void virtio_net_receive(void *opaque, const uint8_t *buf, int size) +void virtio_net_poll(void) { - VirtIONet *n = opaque; + VirtIONet *vnet; + int len; + fd_set rfds; + struct timeval tv; + int max_fd = -1; VirtQueueElement elem; struct virtio_net_hdr *hdr; - int offset, i; - - /* FIXME: the drivers really need to set their status better */ - if (n->rx_vq->vring.avail == NULL) { - n->can_receive = 0; - return; - } - -...
2004 Aug 06
2
icecast + irix
...bit, if you add #include <sys/select.h> it gets rid of: connection.c:192: `fd_set' undeclared (first use in this function) connection.c:192: (Each undeclared identifier is reported only once connection.c:192: for each function it appears in.) connection.c:192: parse error before "rfds" connection.c:193: storage size of `tv' isn't known connection.c:209: warning: implicit declaration of function `FD_ZERO' connection.c:209: `rfds' undeclared (first use in this function) connection.c:213: warning: implicit declaration of function `FD_SET' connection.c:223:...
2010 Feb 16
2
[LLVMdev] FD_ZERO unsupported inline asm on 64 bit
...#include <sys/types.h> #include <unistd.h> int main(void) { fd_set rfds; FD_ZERO(&rfds); //this is the error line return 0;...
2003 Feb 20
0
Netbios name service forwarding.
...(ptr, " bcast %s", inet_ntoa (i->bcast.sin_addr)); syslog (LOG_ERR, ptr); } i->next = ifs; ifs = i; } int main (int argc, char **argv) { unsigned char buf[8192]; int w = getdtablesize (); int len; int fromlen; iface i, j; struct sockaddr_in from; fd_set rfds; int tid; int bcast; int dmport; if (argc < 3) { fprintf (stderr, "Usage:\n"); fprintf (stderr, "%s nmbdport interface [interface] [interface] ...\n"); exit (1); } openlog ("nbnsfw", LOG_CONS, LOG_DAEMON); daemon (0, 0); se...
2004 Aug 06
2
icecast + irix
...l -c connection.c connection.c: In function `get_connection': connection.c:191: `fd_set' undeclared (first use in this function) connection.c:191: (Each undeclared identifier is reported only once connection.c:191: for each function it appears in.) connection.c:191: parse error before "rfds" connection.c:192: storage size of `tv' isn't known connection.c:208: warning: implicit declaration of function `FD_ZERO' connection.c:208: `rfds' undeclared (first use in this function) connection.c:212: warning: implicit declaration of function `FD_SET' connection.c:222:...
2012 Jan 19
3
[PATCH] libxl_qmp: Handle unexpected end-of-socket
...changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index 1777e44..d3b1d53 100644 --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -385,18 +385,22 @@ static int qmp_next(libxl__gc *gc, libxl__qmp_handler *qmp) FD_ZERO(&rfds); FD_SET(qmp->qmp_fd, &rfds); +do_select_again: ret = select(qmp->qmp_fd + 1, &rfds, NULL, NULL, &timeout); if (ret == 0) { LIBXL__LOG(qmp->ctx, LIBXL__LOG_ERROR, "timeout"); return -1; } else if (ret &lt...
2007 Apr 18
1
[PATCH] Lguest launcher, child starving parent
...================================ --- linux-2.6-lguest.orig/Documentation/lguest/lguest.c 2007-04-05 16:13:08.000000000 -0400 +++ linux-2.6-lguest/Documentation/lguest/lguest.c 2007-04-05 16:16:31.000000000 -0400 @@ -328,15 +328,15 @@ static void wake_parent(int pipefd, stru for (;;) { fd_set rfds = devices->infds; + int ignorefd; select(devices->max_infd+1, &rfds, NULL, NULL, NULL); - if (FD_ISSET(pipefd, &rfds)) { - int ignorefd; - if (read(pipefd, &ignorefd, sizeof(ignorefd)) == 0) - exit(0); - FD_CLR(ignorefd, &devices->infds); - } kill(getppi...
2007 Apr 18
1
[PATCH] Lguest launcher, child starving parent
...================================ --- linux-2.6-lguest.orig/Documentation/lguest/lguest.c 2007-04-05 16:13:08.000000000 -0400 +++ linux-2.6-lguest/Documentation/lguest/lguest.c 2007-04-05 16:16:31.000000000 -0400 @@ -328,15 +328,15 @@ static void wake_parent(int pipefd, stru for (;;) { fd_set rfds = devices->infds; + int ignorefd; select(devices->max_infd+1, &rfds, NULL, NULL, NULL); - if (FD_ISSET(pipefd, &rfds)) { - int ignorefd; - if (read(pipefd, &ignorefd, sizeof(ignorefd)) == 0) - exit(0); - FD_CLR(ignorefd, &devices->infds); - } kill(getppi...
2007 Jul 24
1
ssh client does not timeout if the network fails after ssh_connect but before ssh_exchange_identification, even with Alive options set
Hello, I am testing ssh with occasional network disconnection between server and client during these days. I found ssh sometimes hangs if the disconnection happens after the connection is established but before ssh_exchange_identification completes. The ssh configuration files show that both client and server alive options are set. In /etc/ssh/ssh_config: # Send keepalive messages to the server.
2006 Sep 06
7
[RFC PATCH] allow connecting to xenconsole from remote hosts
...int max; + + struct queue console = { + .head = NULL, + .tail = NULL, + }; + + struct queue out = { + .head = NULL, + .tail = NULL, + }; + + struct queue discard_queue = { + .head = NULL, + .tail = NULL, + }; + + struct queue *discard = (noecho ? &discard_queue : NULL); + + do { + fd_set rfds, wfds; + + FD_ZERO(&rfds); + FD_SET(infd, &rfds); + FD_SET(conspty, &rfds); + + FD_ZERO(&wfds); + FD_SET(conspty, &wfds); + FD_SET(outfd, &wfds); + + max = (conspty | infd | outfd) + 1; + + ret = select(max, &rfds, &wfds, NULL, NULL); + if (ret == -1) {...
2010 Feb 16
0
[LLVMdev] FD_ZERO unsupported inline asm on 64 bit
Hi Cristian, this is (part of) bug 3373, see http://llvm.org/bugs/show_bug.cgi?id=3373 > FD_ZERO(&rfds); //this is the error line ... > # define __FD_ZERO(fdsp) \ > do { \ > int __d0, __d1; \ > __asm__ __volatile__ ("cld; rep; " __FD_ZER...
2004 Aug 06
0
icecast + irix
...select.h> > > it gets rid of: > > connection.c:192: `fd_set' undeclared (first use in this function) > connection.c:192: (Each undeclared identifier is reported only once > connection.c:192: for each function it appears in.) > connection.c:192: parse error before "rfds" > connection.c:193: storage size of `tv' isn't known > connection.c:209: warning: implicit declaration of function `FD_ZERO' > connection.c:209: `rfds' undeclared (first use in this function) > connection.c:213: warning: implicit declaration of function `FD_SET'...
2004 Aug 06
2
icecast + irix
Just wondering if anyone has tried to compile icecast on a SGI machine running irix 6.5.14 or the like. I tried w/ a bunch of differnet compiler options, (using gcc for the compiler) just to get a myriad of errors. Thanks, Jeff Utter <p><p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...+ if (stmp->addr != NULL) > + free(stmp->addr); > + if (stmp->port != NULL) > + free(stmp->port); > + free(stmp); > + > + stmp = snext; > + } > > /* cleanup client fds */ > tmpcli = firstclient; > @@ -681,22 +762,30 @@ > { > fd_set rfds; > struct timeval tv; > - int res, maxfd; > + int res, maxfd = -1; > ctype *tmpcli, *tmpnext; > upstype *utmp, *unext; > + stype *stmp, *snext; > > if (reload_flag) { > conf_reload(); > reload_flag = 0; > } > - > - FD_ZERO(&rfds); > -...
2004 Aug 06
3
icecast + irix
...t gets rid of: > > > > connection.c:192: `fd_set' undeclared (first use in this function) > > connection.c:192: (Each undeclared identifier is reported only once > > connection.c:192: for each function it appears in.) > > connection.c:192: parse error before "rfds" > > connection.c:193: storage size of `tv' isn't known > > connection.c:209: warning: implicit declaration of function `FD_ZERO' > > connection.c:209: `rfds' undeclared (first use in this function) > > connection.c:213: warning: implicit declaration of...
2009 Jan 26
1
ups emerson liebert GTX2 ESP-II serial protocol demo
...ISSET(fd, &wfds) ) { int res = write(fd,buf+writ,len-writ); if( res>0 ) writ+=res; else return(-1); } if( retval<=0 ) return(-1); } return(writ); } int timedread(int fd, unsigned char *buf, int len, int msec) { fd_set rfds; struct timeval tv; int retval; int red=0; while(red<len) { // Watch fd to see when it has input. FD_ZERO(&rfds); FD_SET(fd, &rfds); tv.tv_sec = msec/1000; tv.tv_usec = (msec%1000)*1000; retval = select(fd+1, &rfds, NULL, NULL, &...
2005 Jun 20
2
app_valetparking.c
Since www.bkw.org seems not to exist anymore (getting response from some hosting provider), does anyone happend to have a copy of app_valetparking.c from www.bkw.org - the one that should work with * stable 1.0.X ? If so please contact me. One that can be downloaded from www.loligo.com dosn't compile with 1.0.X, and SuperValletParking (www.asterlink.com/svp/) seems to be for * HEAD