Home
last modified time | relevance | path

Searched refs:ARRAY_SIZE (Results 1 – 25 of 42) sorted by relevance

12

/system/netd/server/
DNatController.cpp104 for (unsigned int cmdNum = 0; cmdNum < ARRAY_SIZE(defaultCommands); cmdNum++) { in setupIptablesHooks()
105 if (runCmd(ARRAY_SIZE(defaultCommands[cmdNum].cmd), defaultCommands[cmdNum].cmd) && in setupIptablesHooks()
127 for (unsigned int cmdNum = 0; cmdNum < ARRAY_SIZE(defaultCommands); cmdNum++) { in setDefaults()
128 if (runCmd(ARRAY_SIZE(defaultCommands[cmdNum].cmd), defaultCommands[cmdNum].cmd) && in setDefaults()
168 if (runCmd(ARRAY_SIZE(cmd), cmd)) { in enableNat()
194 runCmd(ARRAY_SIZE(cmd1), cmd1); in enableNat()
203 runCmd(ARRAY_SIZE(cmd2), cmd2); in enableNat()
247 if (runCmd(ARRAY_SIZE(cmd2b), cmd2b) && add) { in setTetherCountingRules()
273 if (runCmd(ARRAY_SIZE(cmd3b), cmd3b) && add) { in setTetherCountingRules()
302 if (runCmd(ARRAY_SIZE(cmd1), cmd1) && add) { in setForwardRules()
[all …]
Doem_iptables_hook.cpp44 runIptablesCmd(ARRAY_SIZE(cmd1), cmd1); in oemCleanupHooks()
52 runIptablesCmd(ARRAY_SIZE(cmd2), cmd2); in oemCleanupHooks()
62 runIptablesCmd(ARRAY_SIZE(cmd3), cmd3); in oemCleanupHooks()
DIdletimerController.cpp163 res = runIpxtablesCmd(ARRAY_SIZE(cmd1), cmd1); in setDefaults()
176 res = runIpxtablesCmd(ARRAY_SIZE(cmd2), cmd2); in setDefaults()
222 res = runIpxtablesCmd(ARRAY_SIZE(cmd1), cmd1); in modifyInterfaceIdletimer()
245 res = runIpxtablesCmd(ARRAY_SIZE(cmd2), cmd2); in modifyInterfaceIdletimer()
DNetdConstants.cpp138 ARRAY_SIZE(argv), (char**)argv, &status, false /* ignore_int_quit */, LOG_NONE, in execIptablesRestoreCommand()
139 false /* abbreviated */, NULL /* file_path */, opt, ARRAY_SIZE(opt)); in execIptablesRestoreCommand()
DNetdConstants.h49 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a))) macro
DRouteController.cpp336 for (size_t i = 0; i < ARRAY_SIZE(AF_FAMILIES); ++i) { in modifyIpRule()
338 if (int ret = sendNetlinkRequest(action, flags, iov, ARRAY_SIZE(iov))) { in modifyIpRule()
444 return sendNetlinkRequest(action, flags, iov, ARRAY_SIZE(iov)); in modifyIpRoute()
861 for (size_t i = 0; i < ARRAY_SIZE(IP_VERSIONS); ++i) { in flushRules()
868 if (android_fork_execvp(ARRAY_SIZE(argv), const_cast<char**>(argv), NULL, false, false)) { in flushRules()
924 for (size_t i = 0; i < ARRAY_SIZE(IP_VERSIONS); ++i) { in flushRoutes()
943 err = android_fork_execvp(ARRAY_SIZE(argv), const_cast<char**>(argv), in flushRoutes()
/system/extras/tests/pagingtest/
Dthrashing_test.c33 filesize = num_pages * pagesize / (ARRAY_SIZE(fds) - 1); in thrashing_test()
35 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) { in thrashing_test()
42 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) { in thrashing_test()
51 for (size_t j = 0; j < ARRAY_SIZE(fds); j++) { in thrashing_test()
65 printf("thrashing: %llu MB/s\n", (filesize * ARRAY_SIZE(fds) * test_runs * USEC_PER_SEC) / in thrashing_test()
71 for (size_t i = 0; i < ARRAY_SIZE(bufs) && bufs[i] != NULL; i++) { in thrashing_test()
75 for (size_t i = 0; i < ARRAY_SIZE(fds) && fds[i] >= 0; i++) { in thrashing_test()
Dpagingtest.h8 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a))) macro
/system/core/libcutils/tests/
DPropertiesTest.cpp31 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) macro
88 for (size_t i = 0; i < ARRAY_SIZE(mValue); ++i) { in ResetValue()
180 for (size_t i = 0; i < ARRAY_SIZE(valuesTrue); ++i) { in TEST_F()
190 for (size_t i = 0; i < ARRAY_SIZE(valuesFalse); ++i) { in TEST_F()
203 for (size_t i = 0; i < ARRAY_SIZE(valuesNeither); ++i) { in TEST_F()
252 ASSERT_EQ(ARRAY_SIZE(setValues), ARRAY_SIZE(getValues)); in TEST_F()
254 for (size_t i = 0; i < ARRAY_SIZE(setValues); ++i) { in TEST_F()
299 ASSERT_EQ(ARRAY_SIZE(setValues), ARRAY_SIZE(getValues)); in TEST_F()
301 for (size_t i = 0; i < ARRAY_SIZE(setValues); ++i) { in TEST_F()
/system/core/libmemtrack/
Dmemtrack.c29 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) macro
166 return memtrack_proc_sum(p, types, ARRAY_SIZE(types), 0); in memtrack_proc_graphics_total()
172 return memtrack_proc_sum(p, types, ARRAY_SIZE(types), in memtrack_proc_graphics_pss()
179 return memtrack_proc_sum(p, types, ARRAY_SIZE(types), 0); in memtrack_proc_gl_total()
185 return memtrack_proc_sum(p, types, ARRAY_SIZE(types), in memtrack_proc_gl_pss()
194 return memtrack_proc_sum(p, types, ARRAY_SIZE(types), 0); in memtrack_proc_other_total()
202 return memtrack_proc_sum(p, types, ARRAY_SIZE(types), in memtrack_proc_other_pss()
/system/bt/tools/hci/
Dmain.c73 packet[ARRAY_SIZE(packet) - 1] = 0x03; in set_discoverable()
75 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_discoverable()
120 packet[ARRAY_SIZE(packet) - 1] = 0x01; in set_pcm_loopback()
122 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_pcm_loopback()
147 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_sco_route()
203 for (size_t i = 0; i < ARRAY_SIZE(commands); ++i) in find_command()
212 for (size_t i = 0; i < ARRAY_SIZE(commands); ++i) in usage()
/system/media/alsa_utils/
Dalsa_device_profile.c33 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) macro
226 for (index = 0; index < ARRAY_SIZE(std_sample_rates) && in profile_enum_sample_rates()
227 num_entries < ARRAY_SIZE(profile->sample_rates) - 1; in profile_enum_sample_rates()
240 const int num_slots = ARRAY_SIZE(mask->bits); in profile_enum_sample_formats()
243 const int table_size = ARRAY_SIZE(pcm_format_value_map); in profile_enum_sample_formats()
259 if (num_written == ARRAY_SIZE(profile->formats) - 1) { in profile_enum_sample_formats()
284 for (index = 0; index < ARRAY_SIZE(std_channel_counts) && in profile_enum_channel_counts()
285 num_counts < ARRAY_SIZE(profile->channel_counts) - 1; in profile_enum_channel_counts()
414 size_t buffSize = ARRAY_SIZE(buffer); in profile_get_sample_rate_strs()
447 size_t buffSize = ARRAY_SIZE(buffer); in profile_get_format_strs()
[all …]
Dalsa_format.c24 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) macro
88 int num_slots = ARRAY_SIZE(mask->bits); in get_pcm_format_for_mask()
91 int table_size = ARRAY_SIZE(pcm_format_value_map); in get_pcm_format_for_mask()
Dalsa_logging.c26 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) macro
33 const size_t num_slots = ARRAY_SIZE(mask->bits); in log_pcm_mask()
Dalsa_device_proxy.c32 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) macro
91 if (config->format >= 0 && (size_t)config->format < ARRAY_SIZE(format_byte_size_map)) { in proxy_prepare()
/system/bt/osi/test/
Dlist_test.cpp74 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) in TEST_F()
86 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) in TEST_F()
89 EXPECT_EQ(list_back(list), &x[ARRAY_SIZE(x) - 1]); in TEST_F()
98 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) in TEST_F()
112 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) in TEST_F()
126 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) in TEST_F()
129 int i = ARRAY_SIZE(x) - 1; in TEST_F()
170 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) in TEST_F()
188 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) in TEST_F()
/system/extras/tests/fstest/
Drecovery_test.cpp39 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) macro
225 return android_fork_execvp_ext(ARRAY_SIZE(umount_argv), umount_argv, in unmountCache()
239 return android_fork_execvp_ext(ARRAY_SIZE(mountall_argv), mountall_argv, in mountAll()
/system/vold/
DVoldUtil.h22 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a))) macro
/system/bt/osi/include/
Dosi.h25 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) macro
/system/core/libmemunreachable/
DAllocator.cpp55 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) macro
261 assert(i < ARRAY_SIZE(free_bitmap_)); in Alloc()
269 assert(page / 32 < ARRAY_SIZE(dirty_pages_)); in Alloc()
288 assert(i < ARRAY_SIZE(free_bitmap_)); in Free()
/system/core/init/
Dutil.h26 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) macro
Dueventd.cpp90 for (i = 0; i < ARRAY_SIZE(android_ids); i++) in get_android_id()
/system/extras/puncture_fs/
Dpuncture_fs.c31 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) macro
189 if (android_fork_execvp_ext(ARRAY_SIZE(rm_bin_argv), rm_bin_argv, in puncture_fs()
/system/bt/btif/src/
Dbtif_sock_rfc.c115 for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) { in btsock_rfc_init()
134 for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) { in btsock_rfc_cleanup()
144 for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) in find_free_slot()
153 for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) in find_rfc_slot_by_id()
164 for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) in find_rfc_slot_by_pending_sdp()
174 for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) in is_requesting_sdp()
/system/core/fs_mgr/
Dfs_mgr.c64 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a))) macro
157 ret = android_fork_execvp_ext(ARRAY_SIZE(e2fsck_argv), e2fsck_argv, in check_fs()
174 ret = android_fork_execvp_ext(ARRAY_SIZE(f2fs_fsck_argv), f2fs_fsck_argv, in check_fs()
829 err = android_fork_execvp_ext(ARRAY_SIZE(mkswap_argv), mkswap_argv, in fs_mgr_swapon_all()

12