Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 189) sorted by relevance

12345678

/system/core/adb/
Dsockets.c31 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 && !result; s = s->next) { in find_local_socket()
69 if(s->id == id) result = s; in find_local_socket()
77 insert_local_socket(asocket* s, asocket* list) in insert_local_socket() argument
79 s->next = list; in insert_local_socket()
80 s->prev = s->next->prev; in insert_local_socket()
81 s->prev->next = s; in insert_local_socket()
82 s->next->prev = s; in insert_local_socket()
86 void install_local_socket(asocket *s) in install_local_socket() argument
[all …]
Djdwp_service.c419 jdwp_control_event(int s, unsigned events, void* user);
429 int s; in jdwp_control_init() local
443 s = socket( AF_UNIX, SOCK_STREAM, 0 ); in jdwp_control_init()
444 if (s < 0) { in jdwp_control_init()
452 if (bind(s, (struct sockaddr*)&addr, addrlen) < 0) { in jdwp_control_init()
455 adb_close(s); in jdwp_control_init()
459 if ( listen(s, 4) < 0 ) { in jdwp_control_init()
462 adb_close(s); in jdwp_control_init()
466 control->listen_socket = s; in jdwp_control_init()
468 control->fde = fdevent_create(s, jdwp_control_event, control); in jdwp_control_init()
[all …]
Dfile_sync_service.c56 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 …]
/system/core/libpixelflinger/codeflinger/
Dload_store.cpp28 void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags) in store() argument
34 if (inc) STR(AL, s.reg, addr.reg, immed12_post(4)); in store()
35 else STR(AL, s.reg, addr.reg); in store()
40 STRB(AL, s.reg, addr.reg, immed12_pre(0)); in store()
41 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 8)); in store()
42 STRB(AL, s.reg, addr.reg, immed12_pre(1)); in store()
43 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 8)); in store()
44 STRB(AL, s.reg, addr.reg, immed12_pre(2)); in store()
45 if (!(s.flags & CORRUPTIBLE)) { in store()
46 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 16)); in store()
[all …]
/system/core/libcutils/
Dabort_socket.c29 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 …]
Dsocket_local_server.c53 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 …]
Dsocket_loopback_server.c40 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()
Dsocket_inaddr_any_server.c40 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()
Dsocket_loopback_client.c41 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/libpixelflinger/
Dbuffer.cpp26 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/toolbox/
Difconfig.c16 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 …]
Dvmstat.c64 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 …]
Dls.c93 struct stat s; in show_total_size() local
108 if (lstat(tmp, &s) < 0) { in show_total_size()
114 sum += s.st_blocks / 2; in show_total_size()
124 struct stat s; in listfile_size() local
126 if (lstat(path, &s) < 0) { in listfile_size()
132 printf("%lld %s\n", s.st_blocks / 2, filename); in listfile_size()
138 struct stat s; in listfile_long() local
153 if(lstat(path, &s) < 0) { in listfile_long()
157 mode2str(s.st_mode, mode); in listfile_long()
158 user2str(s.st_uid, user); in listfile_long()
[all …]
Dchmod.c21 const char* s = argv[1]; in chmod_main() local
22 while (*s) { in chmod_main()
23 if (*s >= '0' && *s <= '7') { in chmod_main()
24 mode = (mode<<3) | (*s-'0'); in chmod_main()
30 s++; in chmod_main()
Ddf.c24 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()
Dmount.c60 static void add_extra_option(struct extra_opts *extra, char *s) in add_extra_option() argument
62 int len = strlen(s); in add_extra_option()
84 strcpy(extra->end, s); in add_extra_option()
92 char *s; in parse_mount_options() local
95 while ((s = strsep(&arg, ",")) != NULL) { in parse_mount_options()
96 char *opt = s; in parse_mount_options()
98 int res, no = s[0] == 'n' && s[1] == 'o'; in parse_mount_options()
101 s += 2; in parse_mount_options()
103 if (strcmp(s, "loop") == 0) { in parse_mount_options()
108 res = strcmp(s, options[i].str); in parse_mount_options()
[all …]
/system/media/opensles/tools/permute/
Dpermute.c79 static unsigned split(State *s, unsigned frameStart, unsigned frameLength, unsigned segmentBudget) in split() argument
84 if ((frameLength <= s->mMinSegmentLengthFrames*2) || (segmentBudget <= 1)) { in split()
85 assert(s->mSegmentCount < s->mSegmentMax); in split()
86 Segment *seg = &s->mSegmentArray[s->mSegmentCount++]; in split()
93 unsigned slop = frameLength - s->mMinSegmentLengthFrames*2; in split()
99 unsigned leftLength = s->mMinSegmentLengthFrames + cut; in split()
101 unsigned rightLength = s->mMinSegmentLengthFrames + (slop - cut); in split()
107 used = split(s, leftStart, leftLength, segmentBudget / 2); in split()
108 used += split(s, rightStart, rightLength, segmentBudget - used); in split()
110 used = split(s, rightStart, rightLength, segmentBudget / 2); in split()
[all …]
/system/core/cpio/
Dmkbootfs.c40 static void fix_stat(const char *path, struct stat *s) in fix_stat() argument
42 fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode); in fix_stat()
45 static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) in _eject() argument
57 fix_stat(out, s); in _eject()
64 s->st_mode, in _eject()
97 struct stat s; in _eject_trailer() local
98 memset(&s, 0, sizeof(s)); in _eject_trailer()
99 _eject(&s, "TRAILER!!!", 10, 0, 0); in _eject_trailer()
186 struct stat s; in _archive() local
193 if(lstat(in, &s)) die("could not stat '%s'\n", in); in _archive()
[all …]
/system/core/libsysutils/src/
DNetlinkEvent.cpp60 char *s = buffer; in decode() local
66 end = s + size; in decode()
67 while (s < end) { in decode()
70 for (p = s; *p != '@'; p++); in decode()
75 if (!strncmp(s, "ACTION=", strlen("ACTION="))) { in decode()
76 char *a = s + strlen("ACTION="); in decode()
83 } else if (!strncmp(s, "SEQNUM=", strlen("SEQNUM="))) in decode()
84 mSeq = atoi(s + strlen("SEQNUM=")); in decode()
85 else if (!strncmp(s, "SUBSYSTEM=", strlen("SUBSYSTEM="))) in decode()
86 mSubsystem = strdup(s + strlen("SUBSYSTEM=")); in decode()
[all …]
/system/core/sh/
Dshow.c76 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/
Dinit_parser.c74 int lookup_keyword(const char *s) in lookup_keyword() argument
76 switch (*s++) { in lookup_keyword()
78 if (!strcmp(s, "opy")) return K_copy; in lookup_keyword()
79 if (!strcmp(s, "apability")) return K_capability; in lookup_keyword()
80 if (!strcmp(s, "hdir")) return K_chdir; in lookup_keyword()
81 if (!strcmp(s, "hroot")) return K_chroot; in lookup_keyword()
82 if (!strcmp(s, "lass")) return K_class; in lookup_keyword()
83 if (!strcmp(s, "lass_start")) return K_class_start; in lookup_keyword()
84 if (!strcmp(s, "lass_stop")) return K_class_stop; in lookup_keyword()
85 if (!strcmp(s, "onsole")) return K_console; in lookup_keyword()
[all …]
/system/extras/tests/sdcard/
Dsysutil.cpp103 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/core/libpixelflinger/tinyutils/
DTypeHelpers.h128 void copy_type(TYPE* d, const TYPE* s, size_t n) {
131 new(d) TYPE(*s);
132 d++, s++;
135 memcpy(d,s,n*sizeof(TYPE));
140 void assign_type(TYPE* d, const TYPE* s, size_t n) {
143 *d++ = *s++;
146 memcpy(d,s,n*sizeof(TYPE));
165 void move_forward_type(TYPE* d, const TYPE* s, size_t n = 1) {
168 s += n;
170 --d, --s;
[all …]
/system/extras/tests/bionic/libc/common/
Dtest_udp.c19 void diep(char *s) in diep() argument
21 perror(s); in diep()
44 int s, i, slen=sizeof(si_other); in main() local
77 if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1) in main()
84 if (bind(s, (struct sockaddr*)&si_me, sizeof(si_me))==-1) in main()
89 if (recvfrom(s, buf, BUFLEN, 0, (struct sockaddr*)&si_other, (socklen_t*)&slen)==-1) in main()
96 close(s); in main()
100 if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1) in main()
113 if (sendto(s, buf, BUFLEN, 0, (struct sockaddr*)&si_other, slen)==-1) in main()
117 close(s); in main()
/system/wlan/ti/wilink_6_1/platforms/os/linux/src/
DosRgstry_parser.c110 char * ltrim(char *s ) in ltrim() argument
112 while( *s == ' ' || *s == '\t' ) s++; in ltrim()
113 return s; in ltrim()
120 char *s, *buf = init_file, *end_buf = init_file + init_file_length; in NdisReadConfiguration() local
140 if( !(s = mem_str(buf, name, end_buf)) ) in NdisReadConfiguration()
143 buf = ltrim(s + strlen(name)); in NdisReadConfiguration()
148 buf = s + 1; /*strlen(name);*/ in NdisReadConfiguration()
156 s = strchr(buf, '\n'); in NdisReadConfiguration()
157 if( !s ) in NdisReadConfiguration()
158 s = buf+strlen(buf); in NdisReadConfiguration()
[all …]

12345678