search for: set_fd

Displaying 10 results from an estimated 10 matches for "set_fd".

Did you mean: set_fs
2013 Jan 03
20
[PATCH] Switch to poll in xenconsoled's io loop.
...(xs_fileno(xs), max_fd); - - if (log_hv) { - FD_SET(xc_evtchn_fd(xce_handle), &readfds); - max_fd = MAX(xc_evtchn_fd(xce_handle), max_fd); - } +#define MAX_POLL_FDS 8192 + static struct pollfd fds[MAX_POLL_FDS]; + static struct pollfd *fd_to_pollfd[MAX_POLL_FDS]; + int nr_fds; +#define SET_FDS(_fd, _events) do { \ + if (_fd >= MAX_POLL_FDS) \ + break; \ + fds[nr_fds].fd = (_fd); \ + fds[nr_fds].events = (_events); \ + fd_to_pollfd[(_fd)] = &fds[nr_fds]; \ + nr_fds++; \ + } while (0) +#define FD_REVENTS(_fd) (((_fd) < MAX_POLL_FDS && fd_to_pol...
2012 Jan 25
26
[PATCH v4 00/23] Xenstore stub domain
Changes from v3: - mini-os configuration files moved into stubdom/ - mini-os extra console support now a config option - Fewer #ifdefs - grant table setup uses hypercall bounce - Xenstore stub domain syslog support re-enabled Changes from v2: - configuration support added to mini-os build system - add mini-os support for conditionally compiling frontends, xenbus -
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...+ + for (i = 0; i < LGUEST_MAX_DEVICES; i++) { + if (!descs[i].type) { + descs[i].features = descs[i].status = 0; + descs[i].type = type; + descs[i].num_pages = num_pages; + descs[i].pfn = pfn; + return &descs[i]; + } + } + errx(1, "too many devices"); +} + +static void set_fd(int fd, struct devices *devices) +{ + FD_SET(fd, &devices->infds); + if (fd > devices->max_infd) + devices->max_infd = fd; +} + +static struct device *new_device(struct devices *devices, + struct lguest_device_desc *descs, + u16 type, u16 num_pages, + int fd, + int...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...+ + for (i = 0; i < LGUEST_MAX_DEVICES; i++) { + if (!descs[i].type) { + descs[i].features = descs[i].status = 0; + descs[i].type = type; + descs[i].num_pages = num_pages; + descs[i].pfn = pfn; + return &descs[i]; + } + } + errx(1, "too many devices"); +} + +static void set_fd(int fd, struct devices *devices) +{ + FD_SET(fd, &devices->infds); + if (fd > devices->max_infd) + devices->max_infd = fd; +} + +static struct device *new_device(struct devices *devices, + struct lguest_device_desc *descs, + u16 type, u16 num_pages, + int fd, + int...
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
...gesize(); + top += num_pages*getpagesize(); + } + return &descs[i]; + } + } + errx(1, "too many devices"); } static struct device *new_device(struct device_list *devices, @@ -669,7 +672,7 @@ static struct device *new_device(struct dev->fd = fd; if (handle_input) set_fd(dev->fd, devices); - dev->desc = new_dev_desc(type, features, num_pages); + dev->desc = new_dev_desc(devices->descs, type, features, num_pages); dev->mem = (void *)(dev->desc->pfn * getpagesize()); dev->handle_input = handle_input; dev->watch_key = (unsigned long)de...
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
...gesize(); + top += num_pages*getpagesize(); + } + return &descs[i]; + } + } + errx(1, "too many devices"); } static struct device *new_device(struct device_list *devices, @@ -669,7 +672,7 @@ static struct device *new_device(struct dev->fd = fd; if (handle_input) set_fd(dev->fd, devices); - dev->desc = new_dev_desc(type, features, num_pages); + dev->desc = new_dev_desc(devices->descs, type, features, num_pages); dev->mem = (void *)(dev->desc->pfn * getpagesize()); dev->handle_input = handle_input; dev->watch_key = (unsigned long)de...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...INITIALIZE, + LGUEST_GUEST_TOP/getpagesize(), /* Just below us */ + pgdir, start, page_offset }; + int fd; + + fd = open_or_die("/dev/lguest", O_RDWR); + if (write(fd, args, sizeof(args)) < 0) + err(1, "Writing to /dev/lguest"); + return fd; +} + +static void set_fd(int fd, struct device_list *devices) +{ + FD_SET(fd, &devices->infds); + if (fd > devices->max_infd) + devices->max_infd = fd; +} + +/* We send lguest_add signals while input is pending: avoids races. */ +static void wake_parent(int pipefd, struct device_list *devices) +{ + nice(19...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...INITIALIZE, + LGUEST_GUEST_TOP/getpagesize(), /* Just below us */ + pgdir, start, page_offset }; + int fd; + + fd = open_or_die("/dev/lguest", O_RDWR); + if (write(fd, args, sizeof(args)) < 0) + err(1, "Writing to /dev/lguest"); + return fd; +} + +static void set_fd(int fd, struct device_list *devices) +{ + FD_SET(fd, &devices->infds); + if (fd > devices->max_infd) + devices->max_infd = fd; +} + +/* We send lguest_add signals while input is pending: avoids races. */ +static void wake_parent(int pipefd, struct device_list *devices) +{ + nice(19...
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c