Home
last modified time | relevance | path

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

12345678910>>...20

/system/core/adb/
Dsockets.cpp61 asocket* s; in find_local_socket() local
65 for (s = local_socket_list.next; s != &local_socket_list; s = s->next) { in find_local_socket()
66 if (s->id != local_id) { in find_local_socket()
69 if (peer_id == 0 || (s->peer && s->peer->id == peer_id)) { in find_local_socket()
70 result = s; in find_local_socket()
78 static void 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()
[all …]
Djdwp_service.cpp371 static void jdwp_control_event(int s, unsigned events, void* user);
376 int s; in jdwp_control_init() local
389 s = socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0); in jdwp_control_init()
390 if (s < 0) { in jdwp_control_init()
397 if (bind(s, reinterpret_cast<sockaddr*>(&addr), addrlen) < 0) { in jdwp_control_init()
399 adb_close(s); in jdwp_control_init()
403 if (listen(s, 4) < 0) { in jdwp_control_init()
405 adb_close(s); in jdwp_control_init()
409 control->listen_socket = s; in jdwp_control_init()
411 control->fde = fdevent_create(s, jdwp_control_event, control); in jdwp_control_init()
[all …]
/system/extras/taskstats/
Dtaskstats.c135 const struct taskstats* s = &stats->stats; in print_task_stats() local
138 printf("%-25s%d\n", "Stats version:", s->version); in print_task_stats()
139 printf("%-25s%d\n", "Exit code:", s->ac_exitcode); in print_task_stats()
140 printf("%-25s0x%x\n", "Flags:", s->ac_flag); in print_task_stats()
141 printf("%-25s%d\n", "Nice value:", s->ac_nice); in print_task_stats()
142 printf("%-25s%s\n", "Command name:", s->ac_comm); in print_task_stats()
143 printf("%-25s%d\n", "Scheduling discipline:", s->ac_sched); in print_task_stats()
144 printf("%-25s%d\n", "UID:", s->ac_uid); in print_task_stats()
145 printf("%-25s%d\n", "GID:", s->ac_gid); in print_task_stats()
146 printf("%-25s%d\n", "PID:", s->ac_pid); in print_task_stats()
[all …]
/system/core/libpixelflinger/codeflinger/
Dload_store.cpp31 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/extras/ioshark/
Dcompile_ioshark.c125 char *s, *s2; in get_tracetype() local
128 s = strchr(buf, ' '); in get_tracetype()
129 if (s == NULL) { in get_tracetype()
135 while (*s == ' ') in get_tracetype()
136 s++; in get_tracetype()
137 if (sscanf(s, "%s", trace_type) != 1) { in get_tracetype()
153 s2 = strchr(s, ' '); in get_tracetype()
172 bcopy(s2, s, strlen(s2) + 1); in get_tracetype()
178 char *s, *s2, save; in get_pathname() local
181 s = strchr(buf, '/'); in get_pathname()
[all …]
/system/core/libsparse/
Dsparse.c32 struct sparse_file *s = calloc(sizeof(struct sparse_file), 1); in sparse_file_new() local
33 if (!s) { in sparse_file_new()
37 s->backed_block_list = backed_block_list_new(block_size); in sparse_file_new()
38 if (!s->backed_block_list) { in sparse_file_new()
39 free(s); in sparse_file_new()
43 s->block_size = block_size; in sparse_file_new()
44 s->len = len; in sparse_file_new()
46 return s; in sparse_file_new()
49 void sparse_file_destroy(struct sparse_file *s) in sparse_file_destroy() argument
51 backed_block_list_destroy(s->backed_block_list); in sparse_file_destroy()
[all …]
Dsparse_read.c56 char *s = ""; in verbose_error() local
79 s = " at "; in verbose_error()
84 sparse_print_verbose("EOF while reading file%s%s\n", s, at); in verbose_error()
88 sparse_print_verbose("Invalid sparse file format%s%s\n", s, at); in verbose_error()
91 s, at); in verbose_error()
93 sparse_print_verbose("Unknown error %d%s%s\n", err, s, at); in verbose_error()
101 static int process_raw_chunk(struct sparse_file *s, unsigned int chunk_size, in process_raw_chunk() argument
107 unsigned int len = blocks * s->block_size; in process_raw_chunk()
109 if (chunk_size % s->block_size != 0) { in process_raw_chunk()
113 if (chunk_size / s->block_size != blocks) { in process_raw_chunk()
[all …]
/system/core/libcutils/
Dsocket_network_client_unix.c32 static int toggle_O_NONBLOCK(int s) { in toggle_O_NONBLOCK() argument
33 int flags = fcntl(s, F_GETFL); in toggle_O_NONBLOCK()
34 if (flags == -1 || fcntl(s, F_SETFL, flags ^ O_NONBLOCK) == -1) { in toggle_O_NONBLOCK()
35 close(s); in toggle_O_NONBLOCK()
38 return s; in toggle_O_NONBLOCK()
65 int s = socket(addr->ai_family, type, addr->ai_protocol); in socket_network_client_timeout() local
66 if (s == -1 || toggle_O_NONBLOCK(s) == -1) return -1; in socket_network_client_timeout()
68 int rc = connect(s, addr->ai_addr, addr->ai_addrlen); in socket_network_client_timeout()
70 result = toggle_O_NONBLOCK(s); in socket_network_client_timeout()
73 close(s); in socket_network_client_timeout()
[all …]
Dsocket_local_server_unix.c55 int socket_local_server_bind(int s, const char *name, int namespaceId) argument
80 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n));
82 if(bind(s, (struct sockaddr *) &addr, alen) < 0) {
86 return s;
100 int s; local
102 s = socket(AF_LOCAL, type, 0);
103 if (s < 0) return -1;
105 err = socket_local_server_bind(s, name, namespace);
108 close(s);
115 ret = listen(s, LISTEN_BACKLOG);
[all …]
Dsocket_inaddr_any_server_unix.c36 int s, n; in socket_inaddr_any_server() local
43 s = socket(AF_INET6, type, 0); in socket_inaddr_any_server()
44 if (s < 0) return -1; in socket_inaddr_any_server()
47 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *) &n, sizeof(n)); in socket_inaddr_any_server()
49 if (bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in socket_inaddr_any_server()
50 close(s); in socket_inaddr_any_server()
57 ret = listen(s, LISTEN_BACKLOG); in socket_inaddr_any_server()
60 close(s); in socket_inaddr_any_server()
65 return s; in socket_inaddr_any_server()
/system/tools/aidl/tests/
Daidl_test_client_primitives.cpp55 bool ConfirmPrimitiveRepeat(const sp<ITestService>& s) { in ConfirmPrimitiveRepeat() argument
63 if (!RepeatPrimitive(s, &ITestService::RepeatBoolean, true) || in ConfirmPrimitiveRepeat()
64 !RepeatPrimitive(s, &ITestService::RepeatByte, int8_t{-128}) || in ConfirmPrimitiveRepeat()
65 !RepeatPrimitive(s, &ITestService::RepeatChar, char16_t{'A'}) || in ConfirmPrimitiveRepeat()
66 !RepeatPrimitive(s, &ITestService::RepeatInt, int32_t{1 << 30}) || in ConfirmPrimitiveRepeat()
67 !RepeatPrimitive(s, &ITestService::RepeatLong, int64_t{1ll << 60}) || in ConfirmPrimitiveRepeat()
68 !RepeatPrimitive(s, &ITestService::RepeatFloat, float{1.0f/3.0f}) || in ConfirmPrimitiveRepeat()
69 !RepeatPrimitive(s, &ITestService::RepeatDouble, double{1.0/3.0}) || in ConfirmPrimitiveRepeat()
70 !RepeatPrimitive(s, &ITestService::RepeatMap, test_map) || in ConfirmPrimitiveRepeat()
72 s, &ITestService::RepeatInt, ITestService::TEST_CONSTANT) || in ConfirmPrimitiveRepeat()
[all …]
/system/core/base/
Dstrings.cpp31 std::vector<std::string> Split(const std::string& s, in Split() argument
40 found = s.find_first_of(delimiters, base); in Split()
41 result.push_back(s.substr(base, found - base)); in Split()
42 if (found == s.npos) break; in Split()
49 std::string Trim(const std::string& s) { in Trim() argument
52 if (s.size() == 0) { in Trim()
57 size_t end_index = s.size() - 1; in Trim()
60 while (start_index < s.size()) { in Trim()
61 if (!isspace(s[start_index])) { in Trim()
69 if (!isspace(s[end_index])) { in Trim()
[all …]
Dfile_test.cpp30 std::string s("hello"); in TEST() local
32 ASSERT_FALSE(android::base::ReadFileToString("/proc/does-not-exist", &s)); in TEST()
34 EXPECT_EQ("", s); // s was cleared. in TEST()
42 std::string s; in TEST() local
43 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
45 EXPECT_EQ("abc", s); in TEST()
58 std::string s; in TEST() local
59 ASSERT_FALSE(android::base::ReadFileToString(link.path, &s)); in TEST()
61 ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true)); in TEST()
62 ASSERT_EQ("foo", s); in TEST()
[all …]
/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/base/include/android-base/
Dparseint.h34 bool ParseUint(const char* s, T* out,
36 int base = (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) ? 16 : 10;
39 unsigned long long int result = strtoull(s, &end, base);
40 if (errno != 0 || s == end || *end != '\0') {
52 bool ParseUint(const std::string& s, T* out,
54 return ParseUint(s.c_str(), out, max);
62 bool ParseInt(const char* s, T* out,
65 int base = (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) ? 16 : 10;
68 long long int result = strtoll(s, &end, base);
69 if (errno != 0 || s == end || *end != '\0') {
[all …]
/system/bt/osi/src/socket_utils/
Dsocket_local_server.cc42 int osi_socket_local_server_bind(int s, const char* name, int namespaceId) { argument
66 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n));
68 if (bind(s, (struct sockaddr*)&addr, alen) < 0) {
72 return s;
82 int s; local
84 s = socket(AF_LOCAL, type, 0);
85 if (s < 0) return -1;
87 err = osi_socket_local_server_bind(s, name, namespaceId);
90 close(s);
97 ret = listen(s, LISTEN_BACKLOG);
[all …]
/system/core/init/
Dutil_test.cpp28 std::string s("hello"); in TEST() local
30 EXPECT_FALSE(read_file("/proc/does-not-exist", &s)); in TEST()
32 EXPECT_EQ("", s); // s was cleared. in TEST()
36 std::string s("hello"); in TEST() local
39 EXPECT_TRUE(write_file(tf.path, s)) << strerror(errno); in TEST()
41 EXPECT_FALSE(read_file(tf.path, &s)) << strerror(errno); in TEST()
42 EXPECT_EQ("", s); // s was cleared. in TEST()
46 std::string s("hello"); in TEST() local
49 EXPECT_TRUE(write_file(tf.path, s.c_str())) << strerror(errno); in TEST()
51 EXPECT_FALSE(read_file(tf.path, &s)) << strerror(errno); in TEST()
[all …]
Dueventd_parser.cpp56 static int lookup_keyword(const char *s) in lookup_keyword() argument
58 switch (*s++) { in lookup_keyword()
60 if (!strcmp(s, "evname")) return K_devname; in lookup_keyword()
61 if (!strcmp(s, "irname")) return K_dirname; in lookup_keyword()
64 if (!strcmp(s, "ubsystem")) return K_subsystem; in lookup_keyword()
87 struct ueventd_subsystem *s; in ueventd_subsystem_find_by_name() local
90 s = node_to_item(node, struct ueventd_subsystem, slist); in ueventd_subsystem_find_by_name()
91 if (!strcmp(s->name, name)) { in ueventd_subsystem_find_by_name()
92 return s; in ueventd_subsystem_find_by_name()
104 ueventd_subsystem* s = ueventd_subsystem_find_by_name(args[1]); in parse_subsystem() local
[all …]
/system/extras/simpleperf/
Dbuild_id.h46 explicit BuildId(const std::string& s) : BuildId() { in BuildId() argument
47 for (size_t i = 0; i < s.size() && i < BUILD_ID_SIZE * 2; i += 2) { in BuildId()
51 if (s[j] >= '0' && s[j] <= '9') { in BuildId()
52 ch |= s[j] - '0'; in BuildId()
53 } else if (s[j] >= 'a' && s[j] <= 'f') { in BuildId()
54 ch |= s[j] - 'a' + 10; in BuildId()
55 } else if (s[j] >= 'A' && s[j] <= 'F') { in BuildId()
56 ch |= s[j] - 'A' + 10; in BuildId()
68 std::string s = "0x"; in ToString() local
70 s += android::base::StringPrintf("%02x", data_[i]); in ToString()
[all …]
Dcmd_stat.cpp98 std::string s = android::base::StringPrintf("%" PRIu64, count); in ReadableCountValue() local
100 return s; in ReadableCountValue()
102 for (size_t i = s.size() - 1, j = 1; i > 0; --i, ++j) { in ReadableCountValue()
104 s.insert(s.begin() + i, ','); in ReadableCountValue()
108 return s; in ReadableCountValue()
133 for (const auto& s : summaries_) { in FindSummary() local
134 if (s.type_name == type_name && s.modifier == modifier) { in FindSummary()
135 return &s; in FindSummary()
148 const CounterSummary& s = summaries_[i]; in AutoGenerateSummaries() local
149 if (s.modifier == "u") { in AutoGenerateSummaries()
[all …]
/system/core/cpio/
Dmkbootfs.c59 static void fix_stat(const char *path, struct stat *s) in fix_stat() argument
73 s->st_uid = p->uid; in fix_stat()
74 s->st_gid = p->gid; in fix_stat()
75 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat()
79 s->st_uid = empty_path_config->uid; in fix_stat()
80 s->st_gid = empty_path_config->gid; in fix_stat()
81 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat()
84 unsigned st_mode = s->st_mode; in fix_stat()
85 int is_dir = S_ISDIR(s->st_mode) || strcmp(path, TRAILER) == 0; in fix_stat()
86 fs_config(path, is_dir, target_out_path, &s->st_uid, &s->st_gid, &st_mode, &capabilities); in fix_stat()
[all …]
/system/tools/aidl/
Doptions.cpp85 const char* s = argv[i]; in Parse() local
86 const size_t len = strlen(s); in Parse()
87 if (s[0] != '-') { in Parse()
91 fprintf(stderr, "unknown option (%d): %s\n", i, s); in Parse()
95 if (s[1] == 'I') { in Parse()
97 options->import_paths_.push_back(s + 2); in Parse()
102 } else if (s[1] == 'd') { in Parse()
104 options->dep_file_name_ = s + 2; in Parse()
109 } else if (strcmp(s, "-a") == 0) { in Parse()
111 } else if (s[1] == 'p') { in Parse()
[all …]
/system/libvintf/
Dparse_string.cpp31 std::vector<std::string> SplitString(const std::string &s, char c) { in SplitString() argument
36 while ((matchPos = s.find(c, startPos)) != std::string::npos) { in SplitString()
37 components.push_back(s.substr(startPos, matchPos - startPos)); in SplitString()
41 if (startPos <= s.length()) { in SplitString()
42 components.push_back(s.substr(startPos)); in SplitString()
61 bool parse(const std::string &s, std::vector<T> *objs) { in parse() argument
62 std::vector<std::string> v = SplitString(s, ','); in parse()
76 bool parseEnum(const std::string &s, E *e, const Array &strings) { in parseEnum() argument
78 if (s == strings.at(i)) { in parseEnum()
87 bool parse(const std::string &s, ENUM *hf) { \
[all …]
/system/core/libsparse/include/sparse/
Dsparse.h52 void sparse_file_destroy(struct sparse_file *s);
72 int sparse_file_add_data(struct sparse_file *s,
90 int sparse_file_add_fill(struct sparse_file *s,
113 int sparse_file_add_file(struct sparse_file *s,
140 int sparse_file_add_fd(struct sparse_file *s,
161 int sparse_file_write(struct sparse_file *s, int fd, bool gz, bool sparse,
176 int64_t sparse_file_len(struct sparse_file *s, bool sparse, bool crc);
183 unsigned int sparse_file_block_size(struct sparse_file *s);
203 int sparse_file_callback(struct sparse_file *s, bool sparse, bool crc,
220 int sparse_file_foreach_chunk(struct sparse_file *s, bool sparse, bool crc,
[all …]
/system/bt/osi/src/
Dcompat.cc66 const char* s = src; in strlcpy() local
72 if ((*d++ = *s++) == '\0') break; in strlcpy()
79 while (*s++) in strlcpy()
83 return (s - src - 1); /* count does not include NUL */ in strlcpy()
97 const char* s = src; in strlcat() local
106 if (n == 0) return (dlen + strlen(s)); in strlcat()
108 while (*s != '\0') { in strlcat()
110 *d++ = *s; in strlcat()
114 s++; in strlcat()
119 return (dlen + (s - src)); /* count does not include NUL */ in strlcat()

12345678910>>...20