/external/bison/lib/ |
H A D | pipe2-safer.c | 31 pipe2_safer (int fd[2], int flags) argument 34 if (pipe2 (fd, flags) == 0) 39 fd[i] = fd_safer_flag (fd[i], flags); 40 if (fd[i] < 0) 43 close (fd[1 - i]);
|
H A D | pipe2.c | 40 pipe2 (int fd[2], int flags) argument 42 /* Mingw _pipe() corrupts fd on failure; also, if we succeed at 44 to leave fd unchanged: http://austingroupbugs.net/view.php?id=467 */ 46 tmp[0] = fd[0]; 47 tmp[1] = fd[1]; 58 int result = pipe2 (fd, flags); 79 if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0) 81 fd[0] = tmp[0]; 82 fd[1] = tmp[1]; 92 if (set_nonblocking_flag (fd[ [all...] |
H A D | spawn-pipe.c | 64 nonintr_close (int fd) argument 69 retval = close (fd); 98 * parent -> fd[1] -> STDIN_FILENO -> child if pipe_stdin 99 * parent <- fd[0] <- STDOUT_FILENO <- child if pipe_stdout 115 int fd[2]) 244 fd[0] = ifd[0]; 246 fd[1] = ofd[1]; 376 fd[0] = ifd[0]; 378 fd[1] = ofd[1]; 387 * parent -> fd[ 109 create_pipe(const char *progname, const char *prog_path, char **prog_argv, bool pipe_stdin, bool pipe_stdout, const char *prog_stdin, const char *prog_stdout, bool null_stderr, bool slave_process, bool exit_on_error, int fd[2]) argument 393 create_pipe_bidi(const char *progname, const char *prog_path, char **prog_argv, bool null_stderr, bool slave_process, bool exit_on_error, int fd[2]) argument 414 create_pipe_in(const char *progname, const char *prog_path, char **prog_argv, const char *prog_stdin, bool null_stderr, bool slave_process, bool exit_on_error, int fd[1]) argument 438 create_pipe_out(const char *progname, const char *prog_path, char **prog_argv, const char *prog_stdout, bool null_stderr, bool slave_process, bool exit_on_error, int fd[1]) argument [all...] |
H A D | spawn_faction_addclose.c | 37 int fd) 43 if (fd < 0 || fd >= maxfd) 47 return posix_spawn_file_actions_addclose (file_actions, fd); 61 rec->action.open_action.fd = fd; 36 posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions, int fd) argument
|
H A D | spawn_faction_adddup2.c | 37 int fd, int newfd) 43 if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd) 47 return posix_spawn_file_actions_adddup2 (file_actions, fd, newfd); 61 rec->action.dup2_action.fd = fd; 36 posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fd, int newfd) argument
|
H A D | spawn_faction_addopen.c | 37 int fd, const char *path, int oflag, 44 if (fd < 0 || fd >= maxfd) 48 return posix_spawn_file_actions_addopen (file_actions, fd, path, oflag, mode); 62 rec->action.open_action.fd = fd; 36 posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *file_actions, int fd, const char *path, int oflag, mode_t mode) argument
|
H A D | spawn_int.h | 33 int fd; member in struct:__spawn_action::__anon357::__anon358 37 int fd; member in struct:__spawn_action::__anon357::__anon359 42 int fd; member in struct:__spawn_action::__anon357::__anon360
|
H A D | w32spawn.h | 39 dup_noinherit (int fd) argument 41 fd = dup_cloexec (fd); 42 if (fd < 0 && errno == EMFILE) 45 return fd; 54 fd_safer_noinherit (int fd) argument 56 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) 59 int nfd = fd_safer_noinherit (dup_noinherit (fd)); 61 close (fd); 72 dup_safer_noinherit(int fd) argument [all...] |
/external/blktrace/ |
H A D | blkparse.c | 348 if (!pci->fd) { 349 pci->fd = -1; 2090 static int read_data(int fd, void *buffer, int bytes, int block, int *fdblock) argument 2096 fl = fcntl(fd, F_GETFL); 2100 fcntl(fd, F_SETFL, fl | O_NONBLOCK); 2103 fcntl(fd, F_SETFL, fl & ~O_NONBLOCK); 2110 ret = read(fd, p, bytes_left); 2154 static int read_events(int fd, int always_block, int *fdblock) argument 2169 ret = read_data(fd, bit, sizeof(*bit), should_block, fdblock); 2194 if (read_data(fd, pt 2538 do_pipe(int fd) argument 2567 int fd; local [all...] |
H A D | blktrace.c | 96 int fd, idx, ncpus; member in struct:devpath 211 * Each connection (client to server socket ('fd')) has one of these. A 218 int fd, ncpus; member in struct:cl_conn 587 static void net_close_connection(int *fd) argument 589 shutdown(*fd, SHUT_RDWR); 590 close(*fd); 591 *fd = -1; 678 int fd; local 681 fd = open(path, flags); 682 } while (fd < 689 int fd; local 700 int fd; local 709 my_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) argument 732 setup_mmap(int fd, unsigned int maxlen, struct mmap_info *mip) argument 765 __stop_trace(int fd) argument 804 __net_recv_data(int fd, void *buf, unsigned int len) argument 829 net_recv_data(int fd, void *buf, unsigned int len) argument 837 net_send_data(int fd, void *buf, unsigned int buf_len) argument 856 net_send_header(int fd, int cpu, char *buts_name, int len) argument 876 net_send_open_close(int fd, int cpu, char *buts_name, int len) argument 884 net_send_open(int fd, int cpu, char *buts_name) argument 889 net_send_close(int fd, char *buts_name, int drops) argument 902 ack_open_close(int fd, char *buts_name) argument 907 net_send_drops(int fd) argument 980 int fd; local 1080 int fd, drops = 0; local 1212 int fd; local 1256 int fd = cl_fds[tbp->cpu]; local 2165 ch_add_connection(struct net_server_s *ns, struct cl_host *ch, int fd) argument 2276 int fd; local 2525 int fd, opt; local [all...] |
H A D | blktrace.h | 45 int fd; member in struct:per_cpu_info
|
/external/blktrace/btt/ |
H A D | misc.c | 168 int fd; local 171 fd = open(path, flags); 172 } while (fd < 0 && handle_open_failure()); 174 return fd;
|
H A D | mmap.c | 35 static int fd; variable 91 cur_map = mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 108 fd = my_open(fname, O_RDONLY); 109 if (fd < 0) { 113 if (fstat(fd, &buf) < 0) { 127 close(fd);
|
/external/bluetooth/bluedroid/audio_a2dp_hw/ |
H A D | audio_a2dp_hw.c | 231 INFO("connected to stack fd = %d", skt_fd); 236 static int skt_read(int fd, void *p, size_t len) argument 246 if ((read = recv(fd, p, len, MSG_NOSIGNAL)) == -1) 255 static int skt_write(int fd, const void *p, size_t len) argument 262 pfd.fd = fd; 273 if ((sent = send(fd, p, len, MSG_NOSIGNAL)) == -1) 282 static int skt_disconnect(int fd) argument 284 INFO("fd %d", fd); 676 out_dump(const struct audio_stream *stream, int fd) argument 878 in_dump(const struct audio_stream *stream, int fd) argument 1288 adev_dump(const audio_hw_device_t *device, int fd) argument [all...] |
/external/bluetooth/bluedroid/bta/fs/ |
H A D | bta_fs_ci.c | 43 ** Parameters fd - file descriptor passed to the stack in the 50 void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt) argument 57 p_evt->fd = fd; 74 ** Parameters fd - file descriptor passed to the stack in the 85 void bta_fs_ci_read(int fd, UINT16 num_bytes_read, tBTA_FS_CO_STATUS status, UINT16 evt) argument 92 p_evt->fd = fd; 107 ** Parameters fd - file descriptor passed to the stack in the 121 void bta_fs_ci_open(int fd, tBTA_FS_CO_STATU argument 259 bta_fs_ci_resume_op(int fd, tBTA_FS_CO_STATUS status, const char *p_file, UINT32 file_size, UINT16 evt) argument [all...] |
/external/bluetooth/bluedroid/bta/include/ |
H A D | bta_fs_ci.h | 39 int fd; member in struct:__anon753 48 int fd; member in struct:__anon754 57 int fd; member in struct:__anon755 107 ** Parameters fd - file descriptor passed to the stack in the 116 BTA_API extern void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt); 128 ** Parameters fd - file descriptor passed to the stack in the 141 BTA_API extern void bta_fs_ci_read(int fd, UINT16 num_bytes_read, 151 ** Parameters fd - file descriptor passed to the stack in the 165 BTA_API extern void bta_fs_ci_open(int fd, tBTA_FS_CO_STATUS status, 233 ** Parameters fd [all...] |
/external/bluetooth/bluedroid/btif/co/ |
H A D | bta_fs_co.c | 334 int fd = -1; local 348 if ((fd = open(p_path, oflags | O_NONBLOCK, 0666)) >= 0) 350 if (fstat(fd, &file_stat) == 0) 355 fchown(fd, BT_UID, BT_GID); 368 fd, err, oflags, app_id); 390 bta_fs_ci_open(fd, status, file_size, evt); 400 ** Parameters fd - file descriptor of file to close. 410 tBTA_FS_CO_STATUS bta_fs_co_close(int fd, UINT8 app_id) argument 416 fd, app_id); 417 if (close (fd) < 454 bta_fs_co_read(int fd, UINT8 *p_buf, UINT16 nbytes, UINT16 evt, UINT8 ssn, UINT8 app_id) argument 499 bta_fs_co_write(int fd, const UINT8 *p_buf, UINT16 nbytes, UINT16 evt, UINT8 ssn, UINT8 app_id) argument 533 bta_fs_co_seek(int fd, INT32 offset, INT16 origin, UINT8 app_id) argument 1228 bta_fs_co_sess_ssn(int fd, UINT8 ssn, UINT8 app_id) argument [all...] |
H A D | bta_hh_co.c | 45 static int uhid_write(int fd, const struct uhid_event *ev) argument 48 ret = write(fd, ev, sizeof(*ev)); 73 ret = read(p_dev->fd, &ev, sizeof(ev)); 167 APPL_TRACE_DEBUG("%s: Thread created fd = %d", __FUNCTION__, p_dev->fd); 170 pfds[0].fd = p_dev->fd; 202 void bta_hh_co_destroy(int fd) argument 207 uhid_write(fd, &ev); 208 close(fd); 211 bta_hh_co_write(int fd, UINT8* rpt, UINT16 len) argument [all...] |
/external/bluetooth/bluedroid/btif/include/ |
H A D | btif_hh.h | 65 int fd; member in struct:__anon1013
|
H A D | btif_hl.h | 277 int fd; member in struct:__anon1037
|
/external/bluetooth/bluedroid/btif/src/ |
H A D | btif_config_util.cpp | 397 int fd; local 399 if((fd = open(pathname, O_RDONLY)) >= 0) 401 //debug("fd:%d", fd); 402 if(fstat(fd, &st) == 0 && st.st_size) 405 *map = (const char*)mmap(NULL, *size, PROT_READ, MAP_SHARED, fd, 0); 409 return fd; 412 close(fd); 417 static void close_file_map(int fd, const char* map, int size) argument 420 close(fd); 502 int fd = open_file_map(path, &map, &size); local 590 int fd = open_file_map(path, &map, &size); local 767 int fd = open_file_map(path, &map, &size); local 828 int fd = open_file_map(path, &map, &size); local [all...] |
H A D | btif_hh.c | 152 extern void bta_hh_co_destroy(int fd); 153 extern void bta_hh_co_write(int fd, UINT8* rpt, UINT16 len); 168 static void toggle_os_keylockstates(int fd, int changedkeystates); 204 static void toggle_os_keylockstates(int fd, int changedlockstates) argument 206 BTIF_TRACE_EVENT("%s: fd = %d, changedlockstates = 0x%x", 207 __FUNCTION__, fd, changedlockstates); 236 bta_hh_co_write(fd , hidreport, sizeof(hidreport)); 247 bta_hh_co_write(fd , hidreport, sizeof(hidreport)); 328 toggle_os_keylockstates(p_dev->fd, keylockstates); 541 BTIF_TRACE_DEBUG("%s: uhid fd [all...] |
H A D | btif_pan.c | 93 static void btpan_tap_fd_signaled(int fd, int type, int flags, uint32_t user_id); 404 int fd, err; local 410 if( (fd = open(clonedev, O_RDWR)) < 0 ) { 413 return fd; 422 if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 )//|| tap_setup_ip(TAP_IF_NAME) == FALSE) 425 close(fd); 431 int flags = fcntl(fd, F_GETFL, 0); 432 fcntl(fd, F_SETFL, flags | O_NONBLOCK); 433 return fd; 436 close(fd); 474 btpan_tap_close(int fd) argument 678 int fd = (int)p_param; local 762 btpan_tap_fd_signaled(int fd, int type, int flags, uint32_t user_id) argument [all...] |
H A D | btif_rc.c | 141 static int send_event (int fd, uint16_t type, uint16_t code, int32_t value); 142 static void send_key (int fd, uint16_t key, int pressed); 232 int send_event (int fd, uint16_t type, uint16_t code, int32_t value) argument 242 return write(fd, &event, sizeof(event)); 245 void send_key (int fd, uint16_t key, int pressed) argument 247 BTIF_TRACE_DEBUG("%s fd:%d key:%u pressed:%d", __FUNCTION__, 248 fd, key, pressed); 250 if (fd < 0) 255 BTIF_TRACE_DEBUG("AVRCP: Send key %d (%d) fd=%d", key, pressed, fd); 277 int fd, err, x = 0; local [all...] |
H A D | btif_sock.c | 47 static void btsock_signaled(int fd, int type, int flags, uint32_t user_id); 153 static void btsock_signaled(int fd, int type, int flags, uint32_t user_id) argument 158 btsock_rfc_signaled(fd, flags, user_id); 161 BTIF_TRACE_ERROR("bt l2cap socket type not supported, fd:%d, flags:%d", fd, flags); 164 BTIF_TRACE_ERROR("bt sco socket type not supported, fd:%d, flags:%d", fd, flags); 167 BTIF_TRACE_ERROR("unknown socket type:%d, fd:%d, flags:%d", type, fd, flags);
|