/external/dbus/bus/ |
dir-watch-dnotify.c | 37 static int fds[MAX_DIRS_TO_WATCH]; variable 67 fds[num_fds++] = fd; 83 if (close (fds[i]) != 0) 85 _dbus_verbose ("Error closing fd %d for config directory watch\n", fds[i]);
|
dir-watch-kqueue.c | 41 static int fds[MAX_DIRS_TO_WATCH]; variable 154 fds[num_fds++] = fd; 170 if (close (fds[i]) != 0) 172 _dbus_verbose ("Error closing fd %d for config directory watch\n", fds[i]);
|
/frameworks/base/libs/gui/ |
SensorChannel.cpp | 35 int fds[2]; local 36 if (pipe(fds) == 0) { 37 mReceiveFd = fds[0]; 38 mSendFd = fds[1];
|
/hardware/libhardware_legacy/uevent/ |
uevent.c | 60 struct pollfd fds; local 63 fds.fd = fd; 64 fds.events = POLLIN; 65 fds.revents = 0; 66 nr = poll(&fds, 1, -1); 68 if(nr > 0 && fds.revents == POLLIN) {
|
/system/media/opensles/tests/sandbox/ |
getch.c | 37 fd_set fds; local 38 FD_ZERO(&fds); // not in original posting to stackoverflow 39 FD_SET(0, &fds); 40 return select(1, &fds, NULL, NULL, &tv);
|
/external/e2fsprogs/lib/ |
fpopen.c | 42 int fds[2]; local 92 if (pipe(fds) < 0) 101 close(fds[1]); 102 dup2(fds[0], 0); 104 close(fds[0]); 105 dup2(fds[1], 1); 107 dup2(fds[1], 2); 113 return fdopen(do_stdin ? fds[1] : fds[0], mode);
|
/device/samsung/crespo/alsa-lib/src/ |
socket.c | 48 int *fds = (int *) CMSG_DATA(cmsg); local 58 *fds = fd; 81 int *fds = (int *) CMSG_DATA(cmsg); local 91 *fds = -1; 106 *fd = *fds;
|
/external/chromium/base/ |
unix_domain_socket_posix.cc | 18 bool SendMsg(int fd, const void* buf, size_t length, std::vector<int>& fds) { 26 if (fds.size()) { 27 const unsigned control_len = CMSG_SPACE(sizeof(int) * fds.size()); 39 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size()); 40 memcpy(CMSG_DATA(cmsg), &fds[0], sizeof(int) * fds.size()); local 50 ssize_t RecvMsg(int fd, void* buf, size_t length, std::vector<int>* fds) { 53 fds->clear(); 93 fds->resize(wire_fds_len); 94 memcpy(&(*fds)[0], wire_fds, sizeof(int) * wire_fds_len) 101 int fds[2]; local [all...] |
message_pump_glib.cc | 132 int fds[2]; local 133 CHECK(pipe(fds) == 0); 134 wakeup_pipe_read_ = fds[0]; 135 wakeup_pipe_write_ = fds[1];
|
message_pump_libevent.cc | 113 int fds[2]; local 114 if (pipe(fds)) { 118 if (SetNonBlocking(fds[0])) { 122 if (SetNonBlocking(fds[1])) { 126 wakeup_pipe_out_ = fds[0]; 127 wakeup_pipe_in_ = fds[1]; 184 // It's illegal to use this function to listen on 2 separate fds with the 187 NOTREACHED() << "FDs don't match" << EVENT_FD(evt.get()) << "!=" << fd;
|
/external/qemu/ |
compatfd.c | 75 int fds[2]; local 83 if (pipe(fds) == -1) { 89 info->fd = fds[1]; 98 return fds[0]; 114 int qemu_eventfd(int *fds) 121 fds[0] = fds[1] = ret; 127 return pipe(fds);
|
/frameworks/base/libs/utils/tests/ |
TestHelpers.h | 30 int fds[2]; local 31 ::pipe(fds); 33 receiveFd = fds[0]; 34 sendFd = fds[1];
|
/development/simulator/wrapsim/ |
FakeDev.c | 19 (1) Always use real fds. We can dup() an open /dev/null to get a number 21 (2) Always use fake fds with absurdly high numeric values. Testing to see 24 (3) Use a mix of real and fake fds, in a high range (512-1023). Because 25 it's in the "real" range, we can pass real fds around for things that 31 a small risk of application fds wandering into our range, but we can 33 (We can also dup2(/dev/null) to "reserve" our fds, but that wastes 192 int fds[2]; local 194 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) { 200 if (dup2(fds[0], newDev->fd) < 0) { 202 fds[0], newDev->fd, strerror(errno)) [all...] |
/device/samsung/crespo/alsa-lib/test/ |
timer.c | 27 struct pollfd *fds; local 31 fds = calloc(count, sizeof(struct pollfd)); 32 if (fds == NULL) { 37 if ((err = snd_timer_poll_descriptors(handle, fds, count)) < 0) { 41 if ((err = poll(fds, count, timeout)) < 0) { 54 free(fds);
|
/external/bluetooth/glib/tests/ |
timeloop.c | 21 int fds[2]; local 23 if (pipe(fds) < 0) 29 channels[0] = g_io_channel_unix_new (fds[0]); 30 channels[1] = g_io_channel_unix_new (fds[1]);
|
timeloop-closure.c | 22 int fds[2]; local 24 if (pipe(fds) < 0) 30 channels[0] = g_io_channel_unix_new (fds[0]); 31 channels[1] = g_io_channel_unix_new (fds[1]);
|
/external/dropbear/ |
common-session.c | 163 * We don't want to read/write FDs. */ 288 fd_set fds; local 297 FD_ZERO(&fds); 304 FD_SET(fd, &fds); 308 if (select(fd+1, &fds, NULL, NULL, &timeout) < 0) { 321 if (FD_ISSET(fd, &fds)) {
|
svr-main.c | 113 fd_set fds; local 176 FD_ZERO(&fds); 183 FD_SET(listensocks[i], &fds); 189 FD_SET(childpipes[i], &fds); 194 val = select(maxsock+1, &fds, NULL, NULL, &seltimeout); 213 /* close fds which have been authed or closed - svr-auth.c handles 216 if (childpipes[i] >= 0 && FD_ISSET(childpipes[i], &fds)) { 234 if (!FD_ISSET(listensocks[i], &fds))
|
/libcore/luni/src/main/java/org/apache/harmony/nio/internal/ |
PipeImpl.java | 36 int[] fds = new int[2]; local 37 IoUtils.pipe(fds); 40 this.sink = new PipeSinkChannel(fds[1]); 41 this.source = new PipeSourceChannel(fds[0]);
|
/external/chromium/third_party/libevent/ |
devpoll.c | 63 struct evdevpoll *fds; member in struct:devpollop 162 devpollop->fds = calloc(nfiles, sizeof(struct evdevpoll)); 163 if (devpollop->fds == NULL) { 173 free(devpollop->fds); 191 struct evdevpoll *fds; local 198 fds = realloc(devpollop->fds, nfds * sizeof(struct evdevpoll)); 199 if (fds == NULL) { 203 devpollop->fds = fds; [all...] |
epoll.c | 65 struct evepoll *fds; member in struct:epollop 141 epollop->fds = calloc(INITIAL_NFILES, sizeof(struct evepoll)); 142 if (epollop->fds == NULL) { 160 struct evepoll *fds; local 167 fds = realloc(epollop->fds, nfds * sizeof(struct evepoll)); 168 if (fds == NULL) { 172 epollop->fds = fds; 173 memset(fds + epollop->nfds, 0 [all...] |
/external/e2fsprogs/misc/ |
logsave.c | 107 int fds[2]; local 111 if (pipe(fds) < 0) { 122 dup2(fds[1],1); /* fds[1] replaces stdout */ 123 dup2(fds[1],2); /* fds[1] replaces stderr */ 124 close(fds[0]); /* don't need this here */ 130 close(fds[1]); 133 do_read(fds[0]); 135 do_read(fds[0]) [all...] |
/external/qemu/android/utils/ |
tempfile.c | 138 int fds[ MAX_ATEXIT_FDS ]; member in struct:__anon5908 145 t->fds[t->count++] = fd; 157 if (t->fds[nn] == fd) { 160 t->fds[nn] = t->fds[t->count]; 170 close(t->fds[nn]);
|
/frameworks/base/core/jni/ |
android_os_ParcelFileDescriptor.cpp | 72 int fds[2]; local 73 if (pipe(fds) < 0) { 81 env->SetIntField(fdObj, gFileDescriptorOffsets.mDescriptor, fds[i]);
|
/hardware/qcom/media/mm-video/vidc/venc/src/ |
omx_video_encoder.cpp | 86 int fds[2]; local 358 if(pipe(fds)) 365 if(fds[0] == 0 || fds[1] == 0) 367 if(pipe(fds)) 375 m_pipe_in = fds[0]; 376 m_pipe_out = fds[1]; [all...] |