Searched defs:fd (Results 1 - 25 of 1450) sorted by path

1234567891011>>

/external/aac/libSYS/src/linux/
H A DgenericStds_linux.cpp188 static int fd; variable
194 fd = open("/dev/sram", 0);
195 if (fd < 0)
199 fd = -1;
205 ptr = (unsigned long *)mmap(NULL, KERNEL_SRAM_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
210 close(fd);
212 fd = -1;
225 if (fd == -1)
234 close(fd);
/external/aac/libSYS/src/mips/
H A DgenericStds_mips.cpp125 static int fd; variable
131 fd = open("/dev/sram", 0);
132 if (fd < 0)
136 fd = -1;
142 ptr = (unsigned long *)mmap(NULL, MIPS_SRAM_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
147 close(fd);
149 fd = -1;
162 if (fd == -1)
171 close(fd);
/external/android-clat/
H A Dclatd.c72 int fd; local
74 fd = open("/dev/tun", O_RDWR);
75 if(fd < 0) {
76 fd = open("/dev/net/tun", O_RDWR);
79 return fd;
86 int tun_alloc(char *dev, int fd) { argument
98 if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){
99 close(fd);
360 * reads a packet from the tunnel fd and passes it down the stack
367 int fd; local
[all...]
H A Dclatd_test.cpp424 // fd results in EINVAL.
425 extern "C" void send_rawv6(int fd, clat_packet out, int iov_len) { argument
426 writev(fd, out, iov_len);
H A Dmtu.c33 int fd; local
36 fd = socket(AF_INET, SOCK_STREAM, 0);
37 if(fd < 0) {
42 if(ioctl(fd, SIOCGIFMTU, &if_mtu) < 0) {
H A Dtranslate.c107 * fill in the header for the tun fd
468 void send_tun(int fd, clat_packet out, int iov_len) { argument
469 writev(fd, out, iov_len);
473 void send_rawv6(int fd, clat_packet out, int iov_len) __attribute__((weak));
475 void send_rawv6(int fd, clat_packet out, int iov_len) { argument
489 sendmsg(fd, &msg, 0);
493 * takes a packet, translates it, and writes it to fd
494 * fd - fd to write translated packet to
499 void translate_packet(int fd, in argument
[all...]
/external/antlr/antlr-3.4/runtime/C/src/
H A Dantlr3filestream.c413 antlr3Fclose(ANTLR3_FDSC fd) argument
415 fclose(fd);
/external/bison/djgpp/
H A Dsubpipe.c59 #define remove_tmp_file(fd, name) \
61 close ((fd)); \
71 int fd; local
83 fd = mkstemp(tmp_file_name[0]);
84 if (fd < 0)
86 close (fd);
90 fd = mkstemp(tmp_file_name[1]);
91 if (fd < 0)
93 close (fd);
112 create_subpipe(char const *const *argv, int fd[ argument
178 end_of_output_subpipe(pid_t pid, int fd[2]) argument
[all...]
/external/bison/lib/
H A Dcloexec.c80 dup_cloexec (int fd) argument
82 return fcntl (fd, F_DUPFD_CLOEXEC, 0);
H A Dclose.c24 #include "fd-hook.h"
31 close_nothrow (int fd) argument
37 result = close (fd);
55 rpl_close (int fd) argument
58 int retval = execute_all_close_hooks (close_nothrow, fd);
60 int retval = close_nothrow (fd);
65 _gl_unregister_fd (fd);
H A Ddup-safer-flag.c34 dup_safer_flag (int fd, int flag) argument
36 return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD,
H A Ddup-safer.c31 dup_safer (int fd) argument
33 return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
H A Ddup2.c44 ms_windows_dup2 (int fd, int desired_fd) argument
48 /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
49 dup2 (fd, fd) returns 0, but all further attempts to use fd in
51 if (fd == desired_fd)
53 if ((HANDLE) _get_osfhandle (fd)
91 rpl_dup2(int fd, int desired_fd) argument
121 dupfd(int fd, int desired_fd) argument
138 dup2(int fd, int desired_fd) argument
[all...]
H A Derror.c125 is_open (int fd) argument
132 return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
137 return 0 <= fcntl (fd, F_GETFL);
156 the fd of a FILE stream is stored as a field in its allocated memory. */
H A Dfcntl.c52 /* Mingw has no way to create an arbitrary fd. Iterate until all
155 F_DUPFD - duplicate FD, with int ARG being the minimum target fd.
160 target fd. If successful, return the duplicate, which will not be
169 rpl_fcntl (int fd, int action, /* arg */...) argument
181 result = dupfd (fd, target, 0);
193 /* Haiku alpha 2 loses fd flags on original. */
194 int flags = fcntl (fd, F_GETFD);
200 result = fcntl (fd, action, target);
201 if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
210 result = _gl_register_dup (fd, resul
[all...]
H A Dfd-hook.c21 #include "fd-hook.h"
35 int fd)
39 return primary (fd);
42 primary, fd);
46 execute_all_close_hooks (gl_close_fn primary, int fd) argument
48 return execute_close_hooks (anchor.private_next, primary, fd);
53 int fd, int request, void *arg)
57 return primary (fd, request, arg);
60 primary, fd, request, arg);
65 int fd, in
34 execute_close_hooks(const struct fd_hook *remaining_list, gl_close_fn primary, int fd) argument
52 execute_ioctl_hooks(const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg) argument
64 execute_all_ioctl_hooks(gl_ioctl_fn primary, int fd, int request, void *arg) argument
[all...]
H A Dfd-safer-flag.c40 fd_safer_flag (int fd, int flag) argument
42 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
44 int f = dup_safer_flag (fd, flag);
46 close (fd);
48 fd = f;
51 return fd;
H A Dfd-safer.c37 fd_safer (int fd) argument
39 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
41 int f = dup_safer (fd);
43 close (fd);
45 fd = f;
48 return fd;
H A Dfopen-safer.c37 int fd = fileno (fp); local
39 if (0 <= fd && fd <= STDERR_FILENO)
41 int f = dup_safer (fd);
H A Dfopen.c76 int fd; local
86 fd = open (filename, O_RDONLY);
87 if (fd < 0)
90 if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
92 close (fd);
97 fp = fdopen (fd, mode);
101 close (fd);
H A Dfstat.c35 orig_fstat (int fd, struct stat *buf) argument
37 return fstat (fd, buf);
55 fstat_nothrow (int fd, struct stat *buf) argument
61 result = orig_fstat (fd, buf);
77 rpl_fstat (int fd, struct stat *buf) argument
82 const char *name = _gl_directory_name (fd);
87 return fstat_nothrow (fd, buf);
H A Dlocalcharset.c156 int fd; local
165 fd = open (file_name,
167 if (fd < 0)
174 fp = fdopen (fd, "r");
178 close (fd);
H A Dmsvc-nothrow.c33 _gl_nothrow_get_osfhandle (int fd) argument
39 result = _get_osfhandle (fd);
H A Dopen.c56 int fd; local
118 fd = orig_open (filename, flags, mode);
127 if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES
135 fd = open ("/dev/null", flags, mode);
136 if (0 <= fd)
137 fd = _gl_register_fd (fd, filename);
145 /* If the filename ends in a slash and fd does not refer to a directory,
157 if (fd >= 0)
165 if (fstat (fd,
[all...]
H A Dpipe-safer.c31 pipe_safer (int fd[2]) argument
34 if (pipe (fd) == 0)
39 fd[i] = fd_safer (fd[i]);
40 if (fd[i] < 0)
43 close (fd[1 - i]);

Completed in 3641 milliseconds

1234567891011>>