/haiku/src/system/libroot/posix/ |
H A D | poll.cpp | 19 extern "C" int __ppoll(struct pollfd *fds, nfds_t numfds, const struct timespec *tv, 23 poll(struct pollfd *fds, nfds_t numfds, int timeout) argument 25 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_poll(fds, numfds, timeout * 1000LL, 31 __ppoll(struct pollfd *fds, nfds_t numfds, const struct timespec *tv, argument 39 status = _kern_poll(fds, numfds, timeout, sigMask);
|
H A D | spawn.cpp | 506 int fds[2]; local 509 if (pipe(fds) != 0) 511 if (fcntl(fds[0], F_SETFD, FD_CLOEXEC) != 0 512 || fcntl(fds[1], F_SETFD, FD_CLOEXEC) != 0) { 523 close(fds[1]); 524 read(fds[0], &err, sizeof(err)); 527 close(fds[0]); 532 close(fds[0]); 536 err = process_file_actions(actions, &fds[1]); 548 write(fds[ [all...] |
/haiku/src/tests/system/network/ |
H A D | unix_send_test.c | 8 int fds[2]; local 13 int ret = socketpair(domain, SOCK_DGRAM, 0, fds); // try also: SOCK_STREAM 25 //ret = setsockopt(fds[0], SOL_SOCKET, SO_SNDTIMEO, &v, sizeof(v)); 35 ret = send(fds[0], &buf[0], bufLen, MSG_DONTWAIT);
|
H A D | unix_recv_test.c | 7 int fds[2]; local 12 int ret = socketpair(domain, SOCK_DGRAM, 0, fds); // try also: SOCK_STREAM 23 ret = setsockopt(fds[0], SOL_SOCKET, SO_RCVTIMEO, &v, sizeof(v)); 34 ret = recv(fds[0], &buf[0], bufLen, MSG_DONTWAIT);
|
/haiku/headers/posix/ |
H A D | poll.h | 40 extern int poll(struct pollfd *fds, nfds_t numfds, int timeout); 41 extern int ppoll(struct pollfd *fds, nfds_t numfds,
|
/haiku/src/tests/kits/storage/ |
H A D | BasicTest.cpp | 17 set<int> fds; local 20 fds.insert(fd); 21 for (set<int>::iterator it = fds.begin(); it != fds.end(); it++) 23 return fds.size();
|
/haiku/src/apps/poorman/ |
H A D | PoorManServer.cpp | 218 pollfd fds[nfds]; local 220 // N.B. these fds could be -1, which poll() should skip 221 memset(&fds, 0, sizeof(fds)); 222 fds[0].fd = s->fHttpdServer->listen4_fd; 223 fds[0].events = POLLIN; 224 fds[1].fd = s->fHttpdServer->listen6_fd; 225 fds[1].events = POLLIN; 229 retval = poll(fds, nfds, -1); 233 return -1; // fds n [all...] |
/haiku/src/system/kernel/events/ |
H A D | wait_for_objects.cpp | 210 PollTraceEntry(pollfd* fds, int count, bool resultEvents) argument 215 if (fds != NULL && count > 0) { 217 if (resultEvents ? fds[i].revents : fds[i].events) 227 for (int i = 0; i < fCount; fds++) { 228 uint16 events = resultEvents ? fds->revents : fds->events; 230 fEntries[i].fd = fds->fd; 294 PollBegin(pollfd* fds, int count, bigtime_t timeout) argument 296 PollTraceEntry(fds, coun 316 PollDone(pollfd* fds, int count, int result) argument 569 common_poll(struct pollfd *fds, nfds_t numFDs, bigtime_t timeout, const sigset_t *sigMask, bool kernel) argument 918 _kern_poll(struct pollfd *fds, int numFDs, bigtime_t timeout, const sigset_t *sigMask) argument [all...] |
/haiku/src/apps/text_search/ |
H A D | Grepper.cpp | 287 int fds[2]; local 288 if (pipe(fds) != 0) { 296 dup2(fds[0], STDIN_FILENO); 297 close(fds[0]); 298 fXargsInput = fds[1]; // write to in, appears on command's stdin 300 if (pipe(fds) != 0) { 309 dup2(fds[1], STDOUT_FILENO); 310 close(fds[1]); 311 int out = fds[0]; // read from out, taken from command's stdout 313 if (pipe(fds) ! [all...] |
/haiku/src/servers/power/ |
H A D | power_daemon.cpp | 108 const std::set<int>& fds = fPowerMonitors[i]->FDs(); local 109 for (std::set<int>::iterator it = fds.begin(); it != fds.end(); ++it) {
|
/haiku/src/bin/network/ftpd/ |
H A D | popen.c | 72 static int fds; variable 86 if ((fds = getdtablesize()) <= 0) 88 if ((pids = calloc(fds, sizeof(int))) == NULL)
|
/haiku/src/tools/fs_shell/ |
H A D | fd.cpp | 104 if (!context->fds[i]) { 114 context->fds[fd] = descriptor; 223 descriptor = context->fds[fd]; 253 descriptor = context->fds[fd]; 257 context->fds[fd] = NULL; 322 // Check if the fds are valid (mutex must be locked because 326 || context->fds[oldfd] == NULL) { 336 evicted = context->fds[newfd]; 337 fssh_atomic_add(&context->fds[oldfd]->ref_count, 1); 338 fssh_atomic_add(&context->fds[oldf [all...] |
H A D | vfs.h | 37 struct file_descriptor **fds; member in struct:FSShell::io_context
|
H A D | vfs.cpp | 2800 struct file_descriptor *descriptor = context->fds[i]; 2804 context->fds[i] = NULL; 2844 context->fds = (file_descriptor **)malloc(sizeof(struct file_descriptor *) * tableSize 2846 if (context->fds == NULL) { 2851 fssh_memset(context->fds, 0, sizeof(struct file_descriptor *) * tableSize 2853 context->fds_close_on_exec = (uint8_t *)(context->fds + tableSize); 2869 struct file_descriptor *descriptor = parentContext->fds[i]; 2872 context->fds[i] = descriptor; 2905 if (struct file_descriptor *descriptor = context->fds[i]) { 2913 free(context->fds); [all...] |
/haiku/src/add-ons/kernel/network/protocols/unix/ |
H A D | unix.cpp | 303 int* fds = (int*)CMSG_DATA(header); local 319 descriptors[i] = get_open_fd(ioContext, fds[i]); 382 int* fds = (int*)CMSG_DATA(messageHeader); local 391 fds[i] = new_fd(ioContext, descriptors[i]); 393 if (fds[i] < 0) { 394 error = fds[i]; 399 close_fd_index(ioContext, fds[k]);
|
/haiku/src/libs/compat/freebsd_iflib/ |
H A D | nvlist.c | 758 int *fds; local 761 fds = nv_malloc(sizeof(fds[0]) * (nitems + 1)); 762 if (fds == NULL) 765 nvlist_xdescriptors(nvl, fds); 766 fds[nitems] = -1; 769 return (fds); 1096 nvlist_xunpack(const void *buf, size_t size, const int *fds, size_t nfds, argument 1150 fds, nfds); 1154 &left, fds, nfd 1236 int *fds; local 1281 int *fds; local [all...] |
H A D | nvpair_impl.h | 101 const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds); 111 const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds);
|
/haiku/src/system/kernel/fs/ |
H A D | fd.cpp | 126 if (!context->fds[i]) { 138 context->fds[fd] = descriptor; 259 struct file_descriptor* descriptor = context->fds[fd]; 311 descriptor = context->fds[fd]; 320 context->fds[fd] = NULL; 389 // Check if the fds are valid (mutex must be locked because 393 || context->fds[oldfd] == NULL 394 || (context->fds[oldfd]->open_mode & O_DISCONNECTED) != 0) { 406 evicted = context->fds[newfd]; 409 atomic_add(&context->fds[oldf [all...] |
H A D | vfs_tracing.h | 130 FDTraceEntry(context->fds[oldFD]), 132 fEvictedDescriptor(context->fds[newFD]),
|
H A D | vfs.cpp | 1935 struct file_descriptor* descriptor = context->fds[i]; 3375 kprintf(" used fds:\t%" B_PRIu32 "\n", context->num_used_fds); 3376 kprintf(" max fds:\t%" B_PRIu32 "\n", context->table_size); 3384 struct file_descriptor* fd = context->fds[i]; 3638 if (struct file_descriptor* descriptor = context->fds[i]) { 3647 free(context->fds); 4902 struct file_descriptor* descriptor = context->fds[i]; 4906 context->fds[i] = NULL; 4947 context->fds = (file_descriptor**)malloc( 4951 if (context->fds 9547 int fds[2]; local [all...] |
H A D | socket.cpp | 585 common_socketpair(int family, int type, int protocol, int fds[2], bool kernel) argument 600 fds[i] = create_socket_fd(sockets[i], kernel); 601 if (fds[i] < 0) { 605 return fds[i];
|
/haiku/src/kits/network/libnetapi/ |
H A D | NetEndpoint.cpp | 478 fd_set fds; local 480 FD_ZERO(&fds); 481 FD_SET(fSocket, &fds); 495 status = select(fSocket + 1, &fds, NULL, NULL, 504 return FD_ISSET(fSocket, &fds);
|
/haiku/headers/private/kernel/ |
H A D | vfs.h | 55 struct file_descriptor **fds; member in struct:io_context 209 status_t _user_create_pipe(int *fds); 214 ssize_t _user_poll(struct pollfd *fds, int numfds, bigtime_t timeout,
|
/haiku/headers/private/system/ |
H A D | syscalls.h | 296 extern status_t _kern_create_pipe(int *fds); 302 extern ssize_t _kern_poll(struct pollfd *fds, int numFDs,
|