Searched defs:fd (Results 26 - 50 of 185) sorted by relevance

12345678

/system/core/include/cutils/
H A Dselector.h53 int fd; member in struct:SelectableFd
95 * The selector which selected this fd. Set by the selector itself.
106 * Creates a new selectable fd, adds it to the given selector and returns a
107 * pointer. Outside of 'selector' and 'fd', all fields are set to 0 or NULL
110 * The selectable fd should only be modified from the selector loop thread.
112 SelectableFd* selectorAdd(Selector* selector, int fd);
H A Dsockets.h51 int fd; local
70 fd = strtol(val, NULL, 10);
74 return fd;
92 extern int socket_local_client_connect(int fd,
106 extern bool socket_peer_is_trusted(int fd);
/system/core/libcutils/
H A Dashmem-dev.c44 int fd, ret; local
46 fd = open(ASHMEM_DEVICE, O_RDWR);
47 if (fd < 0)
48 return fd;
54 ret = ioctl(fd, ASHMEM_SET_NAME, buf);
59 ret = ioctl(fd, ASHMEM_SET_SIZE, size);
63 return fd;
66 close(fd);
70 int ashmem_set_prot_region(int fd, int prot) argument
72 return ioctl(fd, ASHMEM_SET_PROT_MAS
75 ashmem_pin_region(int fd, size_t offset, size_t len) argument
81 ashmem_unpin_region(int fd, size_t offset, size_t len) argument
87 ashmem_get_size_region(int fd) argument
[all...]
H A Ddebugger.c56 int dump_backtrace_to_file(pid_t tid, int fd) { argument
78 if (TEMP_FAILURE_RETRY(write(fd, buffer, n)) != n) {
H A Dsocket_local_client.c118 * connect to peer named "name" on fd
119 * returns same fd or -1 on error.
120 * fd is not closed on error. that's your job.
124 int socket_local_client_connect(int fd, const char *name, int namespaceId, argument
138 if(connect(fd, (struct sockaddr *) &addr, alen) < 0) {
142 return fd;
150 * returns fd or -1 on error
H A Dabort_socket.c26 struct asocket *asocket_init(int fd) { argument
32 flags = fcntl(fd, F_GETFL);
35 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK))
52 s->fd = fd;
65 ret = connect(s->fd, addr, addrlen);
73 pfd[0].fd = s->fd;
76 pfd[1].fd = s->abort_fd[0];
102 if (getsockopt(s->fd, SOL_SOCKE
[all...]
H A Dandroid_reboot.c81 int fd, cnt = 0; local
86 fd = open("/proc/sysrq-trigger", O_WRONLY);
87 if (fd < 0) {
90 write(fd, "u", 1);
91 close(fd);
H A Dashmem-host.c42 int fd; local
60 fd = open(name, O_RDWR | O_CREAT | O_EXCL, 0600);
61 if (fd == -1) {
69 if (ftruncate(fd, size) == -1)
75 return fd;
77 close(fd);
81 int ashmem_set_prot_region(int fd, int prot) argument
86 int ashmem_pin_region(int fd, size_t offset, size_t len) argument
91 int ashmem_unpin_region(int fd, size_t offset, size_t len) argument
96 int ashmem_get_size_region(int fd) argument
[all...]
H A Dbuffer.c77 ssize_t bufferRead(Buffer* buffer, int fd) { argument
80 ssize_t bytesRead = read(fd,
96 ssize_t bufferWrite(Buffer* buffer, int fd) { argument
100 ssize_t bytesWritten = write(fd,
H A Dfs.c78 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY)); local
79 if (fd == -1) {
85 if (TEMP_FAILURE_RETRY(read(fd, buf, BUF_SIZE)) == -1) {
93 close(fd);
97 close(fd);
109 int fd = TEMP_FAILURE_RETRY(mkstemp(temp)); local
110 if (fd == -1) {
121 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) {
125 if (close(fd) == -1) {
138 close(fd);
[all...]
/system/core/libdiskconfig/
H A Dwrite_lst.c70 wlist_commit(int fd, struct write_list *lst, int test) argument
73 if (lseek64(fd, lst->offset, SEEK_SET) != (loff_t)lst->offset) {
79 if (write(fd, lst->data, lst->len) != (int)lst->len) {
/system/core/libpixelflinger/codeflinger/
H A Dblending.cpp73 int fd = component==GGLFormat::ALPHA ? mBlendDstA : mBlendDst; local
76 const int blending = blending_codes(fs, fd);
101 (fs==GGL_DST_COLOR && fd==GGL_ONE_MINUS_DST_COLOR) ||
102 (fs==GGL_SRC_COLOR && fd==GGL_ONE_MINUS_SRC_COLOR) ||
103 (fs==GGL_DST_ALPHA && fd==GGL_ONE_MINUS_DST_ALPHA) ||
104 (fs==GGL_SRC_ALPHA && fd==GGL_ONE_MINUS_SRC_ALPHA);
107 (fs==GGL_ONE_MINUS_DST_COLOR && fd==GGL_DST_COLOR) ||
108 (fs==GGL_ONE_MINUS_SRC_COLOR && fd==GGL_SRC_COLOR) ||
109 (fs==GGL_ONE_MINUS_DST_ALPHA && fd==GGL_DST_ALPHA) ||
110 (fs==GGL_ONE_MINUS_SRC_ALPHA && fd
[all...]
/system/core/sh/
H A Doutput.h46 short fd; member in struct:output
/system/core/toolbox/
H A Dhd.c13 int fd; local
53 fd = open(argv[optind], O_RDONLY);
54 if(fd < 0) {
61 lseek(fd, base, SEEK_SET);
70 res = read(fd, &buf, read_len);
H A Dioctl.c16 int fd; local
66 fd = open(argv[optind], O_RDWR | O_SYNC);
67 if (fd < 0) {
109 res = ioctl(fd, ioctl_nr, *(uint32_t*)ioctl_args);
111 res = ioctl(fd, ioctl_nr, ioctl_args);
113 res = ioctl(fd, ioctl_nr, 0);
H A Dmd5.c23 int fd; local
27 fd = open(path, O_RDONLY);
28 if (fd < 0) {
39 rlen = read(fd, buf, sizeof(buf));
43 (void)close(fd);
49 if (close(fd)) {
H A Dr.c15 int width = 4, set = 0, fd; local
53 fd = open("/dev/mem", O_RDWR | O_SYNC);
54 if(fd < 0) {
64 MAP_SHARED, fd, mmap_start);
H A Dtouch.c17 int i, fd, aflag = 0, mflag = 0, debug = 0, flags = 0; local
62 if ((fd=creat(file, 0666)) != -1)
63 close(fd);
H A Ddate.c16 int fd; local
37 fd = open("/dev/alarm", O_RDWR);
40 ioctl(fd, ANDROID_ALARM_SET_RTC, &ts);
52 int fd; local
118 fd = open("/dev/alarm", O_RDWR);
121 res = ioctl(fd, ANDROID_ALARM_SET_RTC, &ts);
H A Dinsmod.c15 int ret, fd; local
21 fd = open(filename, O_RDONLY);
22 if (fd < 0)
26 if (fstat(fd, &sb) < 0)
36 ret = read(fd, buffer, size);
44 close(fd);
/system/extras/tests/ext4/
H A Dcorrupt_gdt_free_blocks.c15 int fd; local
27 fd = open(argv[1], O_RDWR);
29 if (fd < 0) {
34 if (lseek(fd, SB_OFFSET, SEEK_SET) == -1) {
39 if (read(fd, &sb, sizeof(sb)) != sizeof(sb)) {
67 if (lseek(fd, block_size, SEEK_SET) == -1) {
75 if (read(fd, &gd, sizeof(gd)) != sizeof(gd)) {
86 if (lseek(fd, -sizeof(gd), SEEK_CUR) == -1) {
91 if (write(fd, &gd, sizeof(gd)) != sizeof(gd)) {
96 close(fd);
[all...]
/system/vold/
H A DExt4.cpp71 int fd; local
H A DXwarp.cpp68 int fd = open(XWARP_CFG, O_WRONLY); local
70 if (fd < 0)
75 if (write(fd, tmp, strlen(tmp)+1) < 0) {
77 close(fd);
81 close(fd);
/system/core/init/
H A Dkeychords.c67 int fd, ret; local
75 fd = open("/dev/keychord", O_RDWR);
76 if (fd < 0) {
80 fcntl(fd, F_SETFD, FD_CLOEXEC);
82 ret = write(fd, keychords, keychords_length);
85 close(fd);
86 fd = -1;
92 keychord_fd = fd;
/system/core/libsync/
H A Dsync_test.c31 int fd[2]; member in struct:sync_thread_data
42 err = sync_wait(sync_data->fd[i], 10000);
51 info = sync_fence_info(sync_data->fd[i]);
95 int fd = sw_sync_fence_create(sync_timeline_fd, str, val); local
96 if (fd < 0) {
100 sync_data[i].fd[j] = fd;
101 printf("sync_data[%d].fd[%d] = %d;\n", i, j, fd);
109 sync_data[3].fd[
[all...]

Completed in 225 milliseconds

12345678