/system/core/adb/ |
D | sockets.c | 31 static void local_socket_close_locked(asocket *s); 64 asocket *s; in find_local_socket() local 68 for (s = local_socket_list.next; s != &local_socket_list; s = s->next) { in find_local_socket() 69 if (s->id == id) { in find_local_socket() 70 result = s; in find_local_socket() 80 insert_local_socket(asocket* s, asocket* list) in insert_local_socket() argument 82 s->next = list; in insert_local_socket() 83 s->prev = s->next->prev; in insert_local_socket() 84 s->prev->next = s; in insert_local_socket() 85 s->next->prev = s; in insert_local_socket() [all …]
|
D | file_sync_service.c | 56 static int do_stat(int s, const char *path) in do_stat() argument 73 return writex(s, &msg.stat, sizeof(msg.stat)); in do_stat() 76 static int do_list(int s, const char *path) in do_list() argument 111 if(writex(s, &msg.dent, sizeof(msg.dent)) || in do_list() 112 writex(s, de->d_name, len)) { in do_list() 126 return writex(s, &msg.dent, sizeof(msg.dent)); in do_list() 129 static int fail_message(int s, const char *reason) in fail_message() argument 138 if(writex(s, &msg.data, sizeof(msg.data)) || in fail_message() 139 writex(s, reason, len)) { in fail_message() 146 static int fail_errno(int s) in fail_errno() argument [all …]
|
D | backup_service.c | 53 int s[2]; in backup_service() local 70 if (backup_socketpair(s)) { in backup_service() 76 D("Backup/restore socket pair: (send=%d, receive=%d)\n", s[1], s[0]); in backup_service() 77 close_on_exec(s[0]); // only the side we hold on to in backup_service() 85 adb_close(s[0]); in backup_service() 86 adb_close(s[1]); in backup_service() 111 snprintf(portnum, sizeof(portnum), "%d", s[1]); in backup_service() 126 adb_close(s[0]); in backup_service() 139 adb_close(s[1]); in backup_service() 144 params->fd = s[0]; in backup_service() [all …]
|
D | jdwp_service.c | 444 jdwp_control_event(int s, unsigned events, void* user); 454 int s; in jdwp_control_init() local 468 s = socket( AF_UNIX, SOCK_STREAM, 0 ); in jdwp_control_init() 469 if (s < 0) { in jdwp_control_init() 477 if (bind(s, (struct sockaddr*)&addr, addrlen) < 0) { in jdwp_control_init() 480 adb_close(s); in jdwp_control_init() 484 if ( listen(s, 4) < 0 ) { in jdwp_control_init() 487 adb_close(s); in jdwp_control_init() 491 control->listen_socket = s; in jdwp_control_init() 493 control->fde = fdevent_create(s, jdwp_control_event, control); in jdwp_control_init() [all …]
|
/system/core/libpixelflinger/codeflinger/ |
D | load_store.cpp | 31 void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags) in store() argument 37 if (inc) STR(AL, s.reg, addr.reg, immed12_post(4)); in store() 38 else STR(AL, s.reg, addr.reg); in store() 43 STRB(AL, s.reg, addr.reg, immed12_pre(0)); in store() 44 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 8)); in store() 45 STRB(AL, s.reg, addr.reg, immed12_pre(1)); in store() 46 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 8)); in store() 47 STRB(AL, s.reg, addr.reg, immed12_pre(2)); in store() 48 if (!(s.flags & CORRUPTIBLE)) { in store() 49 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 16)); in store() [all …]
|
/system/core/libsparse/ |
D | sparse.c | 31 struct sparse_file *s = calloc(sizeof(struct sparse_file), 1); in sparse_file_new() local 32 if (!s) { in sparse_file_new() 36 s->backed_block_list = backed_block_list_new(block_size); in sparse_file_new() 37 if (!s->backed_block_list) { in sparse_file_new() 38 free(s); in sparse_file_new() 42 s->block_size = block_size; in sparse_file_new() 43 s->len = len; in sparse_file_new() 45 return s; in sparse_file_new() 48 void sparse_file_destroy(struct sparse_file *s) in sparse_file_destroy() argument 50 backed_block_list_destroy(s->backed_block_list); in sparse_file_destroy() [all …]
|
D | sparse_read.c | 53 char *s = ""; in verbose_error() local 76 s = " at "; in verbose_error() 81 sparse_print_verbose("EOF while reading file%s%s\n", s, at); in verbose_error() 85 sparse_print_verbose("Invalid sparse file format%s%s\n", s, at); in verbose_error() 88 s, at); in verbose_error() 90 sparse_print_verbose("Unknown error %d%s%s\n", err, s, at); in verbose_error() 98 static int process_raw_chunk(struct sparse_file *s, unsigned int chunk_size, in process_raw_chunk() argument 104 unsigned int len = blocks * s->block_size; in process_raw_chunk() 106 if (chunk_size % s->block_size != 0) { in process_raw_chunk() 110 if (chunk_size / s->block_size != blocks) { in process_raw_chunk() [all …]
|
/system/core/libcutils/ |
D | abort_socket.c | 29 struct asocket *s; in asocket_init() local 48 s = malloc(sizeof(struct asocket)); in asocket_init() 49 if (!s) in asocket_init() 52 s->fd = fd; in asocket_init() 53 s->abort_fd[0] = abort_fd[0]; in asocket_init() 54 s->abort_fd[1] = abort_fd[1]; in asocket_init() 56 return s; in asocket_init() 59 int asocket_connect(struct asocket *s, const struct sockaddr *addr, in asocket_connect() argument 65 ret = connect(s->fd, addr, addrlen); in asocket_connect() 73 pfd[0].fd = s->fd; in asocket_connect() [all …]
|
D | socket_local_server.c | 53 int socket_local_server_bind(int s, const char *name, int namespaceId) argument 78 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n)); 80 if(bind(s, (struct sockaddr *) &addr, alen) < 0) { 84 return s; 98 int s; local 100 s = socket(AF_LOCAL, type, 0); 101 if (s < 0) return -1; 103 err = socket_local_server_bind(s, name, namespace); 106 close(s); 113 ret = listen(s, LISTEN_BACKLOG); [all …]
|
D | debugger.c | 24 int s = socket_local_client(DEBUGGER_SOCKET_NAME, in dump_tombstone() local 26 if (s < 0) { in dump_tombstone() 35 if (TEMP_FAILURE_RETRY(write(s, &msg, sizeof(msg))) != sizeof(msg)) { in dump_tombstone() 39 if (TEMP_FAILURE_RETRY(read(s, &ack, 1)) != 1) { in dump_tombstone() 43 ssize_t n = TEMP_FAILURE_RETRY(read(s, pathbuf, pathlen - 1)); in dump_tombstone() 52 TEMP_FAILURE_RETRY(close(s)); in dump_tombstone() 57 int s = socket_local_client(DEBUGGER_SOCKET_NAME, in dump_backtrace_to_file() local 59 if (s < 0) { in dump_backtrace_to_file() 68 if (TEMP_FAILURE_RETRY(write(s, &msg, sizeof(msg))) != sizeof(msg)) { in dump_backtrace_to_file() 72 if (TEMP_FAILURE_RETRY(read(s, &ack, 1)) != 1) { in dump_backtrace_to_file() [all …]
|
D | socket_loopback_server.c | 40 int s, n; in socket_loopback_server() local 47 s = socket(AF_INET, type, 0); in socket_loopback_server() 48 if(s < 0) return -1; in socket_loopback_server() 51 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n)); in socket_loopback_server() 53 if(bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in socket_loopback_server() 54 close(s); in socket_loopback_server() 61 ret = listen(s, LISTEN_BACKLOG); in socket_loopback_server() 64 close(s); in socket_loopback_server() 69 return s; in socket_loopback_server()
|
D | socket_inaddr_any_server.c | 40 int s, n; in socket_inaddr_any_server() local 47 s = socket(AF_INET, type, 0); in socket_inaddr_any_server() 48 if(s < 0) return -1; in socket_inaddr_any_server() 51 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n)); in socket_inaddr_any_server() 53 if(bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in socket_inaddr_any_server() 54 close(s); in socket_inaddr_any_server() 61 ret = listen(s, LISTEN_BACKLOG); in socket_inaddr_any_server() 64 close(s); in socket_inaddr_any_server() 69 return s; in socket_inaddr_any_server()
|
D | socket_loopback_client.c | 41 int s; in socket_loopback_client() local 48 s = socket(AF_INET, type, 0); in socket_loopback_client() 49 if(s < 0) return -1; in socket_loopback_client() 51 if(connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in socket_loopback_client() 52 close(s); in socket_loopback_client() 56 return s; in socket_loopback_client()
|
/system/core/toolbox/ |
D | ifconfig.c | 16 static void die(const char *s) in die() argument 18 fprintf(stderr,"error: %s (%s)\n", s, strerror(errno)); in die() 22 static void setflags(int s, struct ifreq *ifr, int set, int clr) in setflags() argument 24 if(ioctl(s, SIOCGIFFLAGS, ifr) < 0) die("SIOCGIFFLAGS"); in setflags() 26 if(ioctl(s, SIOCSIFFLAGS, ifr) < 0) die("SIOCSIFFLAGS"); in setflags() 36 static void setmtu(int s, struct ifreq *ifr, const char *mtu) in setmtu() argument 40 if(ioctl(s, SIOCSIFMTU, ifr) < 0) die("SIOCSIFMTU"); in setmtu() 42 static void setdstaddr(int s, struct ifreq *ifr, const char *addr) in setdstaddr() argument 45 if(ioctl(s, SIOCSIFDSTADDR, ifr) < 0) die("SIOCSIFDSTADDR"); in setdstaddr() 48 static void setnetmask(int s, struct ifreq *ifr, const char *addr) in setnetmask() argument [all …]
|
D | vmstat.c | 64 static void read_state(struct state *s); 65 static int read_meminfo(struct state *s); 66 static int read_stat(struct state *s); 67 static int read_vmstat(struct state *s); 73 struct state s[2]; in vmstat_main() local 121 read_state(&s[1 - toggle]); in vmstat_main() 124 read_state(&s[toggle]); in vmstat_main() 130 print_line(&s[1 - toggle], &s[toggle]); in vmstat_main() 137 static void read_state(struct state *s) { in read_state() argument 140 error = read_meminfo(s); in read_state() [all …]
|
D | ls.c | 103 struct stat s; in show_total_size() local 118 if (lstat(tmp, &s) < 0) { in show_total_size() 124 sum += s.st_blocks / 2; in show_total_size() 134 struct stat s; in listfile_size() local 136 if (lstat(path, &s) < 0) { in listfile_size() 143 printf("%lld ", s.st_blocks / 2); in listfile_size() 147 char filetype = mode2kind(s.st_mode); in listfile_size() 168 struct stat s; in listfile_long() local 183 if(lstat(path, &s) < 0) { in listfile_long() 187 mode2str(s.st_mode, mode); in listfile_long() [all …]
|
D | df.c | 24 static void df(char *s, int always) { in df() argument 27 if (statfs(s, &st) < 0) { in df() 28 fprintf(stderr, "%s: %s\n", s, strerror(errno)); in df() 33 printf("%-20s ", s); in df() 46 char s[2000]; in df_main() local 49 while (fgets(s, 2000, f)) { in df_main() 50 char *c, *e = s; in df_main() 52 for (c = s; *c; c++) { in df_main()
|
/system/core/libpixelflinger/ |
D | buffer.cpp | 26 static void read_pixel(const surface_t* s, context_t* c, 28 static void write_pixel(const surface_t* s, context_t* c, 30 static void readRGB565(const surface_t* s, context_t* c, 32 static void readABGR8888(const surface_t* s, context_t* c, 35 static uint32_t logic_op(int op, uint32_t s, uint32_t d); 73 static void pick_read_write(surface_t* s) in pick_read_write() argument 76 switch (s->format) { in pick_read_write() 77 case GGL_PIXEL_FORMAT_RGBA_8888: s->read = readABGR8888; break; in pick_read_write() 78 case GGL_PIXEL_FORMAT_RGB_565: s->read = readRGB565; break; in pick_read_write() 79 default: s->read = read_pixel; break; in pick_read_write() [all …]
|
/system/core/cpio/ |
D | mkbootfs.c | 56 static void fix_stat(const char *path, struct stat *s) in fix_stat() argument 69 s->st_uid = p->uid; in fix_stat() 70 s->st_gid = p->gid; in fix_stat() 71 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat() 75 s->st_uid = empty_path_config->uid; in fix_stat() 76 s->st_gid = empty_path_config->gid; in fix_stat() 77 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat() 81 fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode); in fix_stat() 85 static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) in _eject() argument 97 fix_stat(out, s); in _eject() [all …]
|
/system/core/libsparse/include/sparse/ |
D | sparse.h | 48 void sparse_file_destroy(struct sparse_file *s); 68 int sparse_file_add_data(struct sparse_file *s, 86 int sparse_file_add_fill(struct sparse_file *s, 109 int sparse_file_add_file(struct sparse_file *s, 136 int sparse_file_add_fd(struct sparse_file *s, 157 int sparse_file_write(struct sparse_file *s, int fd, bool gz, bool sparse, 172 int64_t sparse_file_len(struct sparse_file *s, bool sparse, bool crc); 192 int sparse_file_callback(struct sparse_file *s, bool sparse, bool crc, 211 int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc); 265 void sparse_file_verbose(struct sparse_file *s);
|
/system/core/sh/ |
D | show.c | 76 const char *s; in shtree() local 84 s = "; "; in shtree() 87 s = " && "; in shtree() 90 s = " || "; in shtree() 94 fputs(s, fp); in shtree() 128 const char *s; in shcmd() local 142 case NTO: s = ">"; dftfd = 1; break; in shcmd() 143 case NCLOBBER: s = ">|"; dftfd = 1; break; in shcmd() 144 case NAPPEND: s = ">>"; dftfd = 1; break; in shcmd() 145 case NTOFD: s = ">&"; dftfd = 1; break; in shcmd() [all …]
|
/system/core/init/ |
D | init_parser.c | 79 int lookup_keyword(const char *s) in lookup_keyword() argument 81 switch (*s++) { in lookup_keyword() 83 if (!strcmp(s, "opy")) return K_copy; in lookup_keyword() 84 if (!strcmp(s, "apability")) return K_capability; in lookup_keyword() 85 if (!strcmp(s, "hdir")) return K_chdir; in lookup_keyword() 86 if (!strcmp(s, "hroot")) return K_chroot; in lookup_keyword() 87 if (!strcmp(s, "lass")) return K_class; in lookup_keyword() 88 if (!strcmp(s, "lass_start")) return K_class_start; in lookup_keyword() 89 if (!strcmp(s, "lass_stop")) return K_class_stop; in lookup_keyword() 90 if (!strcmp(s, "lass_reset")) return K_class_reset; in lookup_keyword() [all …]
|
/system/extras/tests/sdcard/ |
D | sysutil.cpp | 103 ssize_t s; in readStringFromFile() local 105 s = read(fd, end, size); in readStringFromFile() 107 if (s < 0) in readStringFromFile() 115 else if (0 == s) in readStringFromFile() 121 end += s; in readStringFromFile() 122 size -= s; in readStringFromFile() 167 ssize_t s = write(fd, start, size); in writeStringToFile() local 169 if (s < 0) in writeStringToFile() 179 start += s; in writeStringToFile() 180 size -= s; in writeStringToFile() [all …]
|
/system/extras/tests/bionic/libc/common/ |
D | test_pthread_rwlock.c | 258 Test3State *s = arg; in do_rwlock_test_rd3_t1() local 262 TZERO(pthread_rwlock_tryrdlock(s->rwlock)); in do_rwlock_test_rd3_t1() 263 TZERO(pthread_rwlock_unlock(s->rwlock)); in do_rwlock_test_rd3_t1() 266 TZERO(pthread_rwlock_wrlock(s->rwlock)); in do_rwlock_test_rd3_t1() 270 TTRUE((t1-s->t0) >= s->waitDelay); in do_rwlock_test_rd3_t1() 271 TZERO(pthread_rwlock_unlock(s->rwlock)); in do_rwlock_test_rd3_t1() 277 Test3State *s = arg; in do_rwlock_test_rd3_t2() local 281 int ret = pthread_rwlock_trywrlock(s->rwlock); in do_rwlock_test_rd3_t2() 285 time_sleep(s->spinDelay); in do_rwlock_test_rd3_t2() 290 TTRUE((t1-s->t0) >= s->waitDelay); in do_rwlock_test_rd3_t2() [all …]
|
/system/core/include/cutils/ |
D | abort_socket.h | 77 int asocket_connect(struct asocket *s, const struct sockaddr *addr, 80 int asocket_accept(struct asocket *s, struct sockaddr *addr, 83 int asocket_read(struct asocket *s, void *buf, size_t count, int timeout); 85 int asocket_write(struct asocket *s, const void *buf, size_t count, 93 void asocket_abort(struct asocket *s); 98 void asocket_destroy(struct asocket *s);
|