Home
last modified time | relevance | path

Searched refs:val (Results 1 – 25 of 94) sorted by relevance

1234

/system/bt/osi/test/
Datomic_test.cpp75 int32_t val = atomic_inc_prefix_s32(&data); in TEST() local
77 EXPECT_EQ(1, val); in TEST()
79 val = atomic_inc_prefix_s32(&data); in TEST()
81 EXPECT_EQ(2, val); in TEST()
83 val = atomic_inc_prefix_s32(&data); in TEST()
85 EXPECT_EQ(3, val); in TEST()
87 val = atomic_dec_prefix_s32(&data); in TEST()
88 EXPECT_EQ(2, val); in TEST()
90 val = atomic_dec_prefix_s32(&data); in TEST()
91 EXPECT_EQ(1, val); in TEST()
[all …]
Dhash_map_test.cpp76 char *val = (char *)hash_map_get(hash_map, data[i].key); in TEST_F() local
77 EXPECT_STREQ(data[i].data, val); in TEST_F()
108 char *val = (char *)hash_map_get(hash_map, data[i].key); in TEST_F() local
109 EXPECT_STREQ(data[data_sz - 1].data, val); in TEST_F()
144 char *val = (char *)hash_map_get(hash_map, data[i].key); in TEST_F() local
145 EXPECT_TRUE(val != NULL); in TEST_F()
146 EXPECT_STREQ(data[i].data, val); in TEST_F()
/system/bt/btcore/test/
Dcounter_test.cpp33 uint64_t val; member
37 static bool counter_iter(const char *name, counter_data_t val, void *context) { in counter_iter() argument
40 mycounter->val = val; in counter_iter()
47 static bool find_val(const char *name, uint64_t *val) { in find_val() argument
50 mycounter.val = 0; in find_val()
54 *val = mycounter.val; in find_val()
72 uint64_t val; in TEST_F() local
74 EXPECT_FALSE(find_val("one.two.three", &val)); in TEST_F()
78 uint64_t val; in TEST_F() local
82 EXPECT_TRUE(find_val("one.two.three", &val)); in TEST_F()
[all …]
Dproperty_test.cpp33 EXPECT_EQ(addr0.address[0], ((uint8_t*)property->val)[0]); in TEST_F()
34 EXPECT_EQ(addr0.address[1], ((uint8_t*)property->val)[1]); in TEST_F()
35 EXPECT_EQ(addr0.address[2], ((uint8_t*)property->val)[2]); in TEST_F()
36 EXPECT_EQ(addr0.address[3], ((uint8_t*)property->val)[3]); in TEST_F()
37 EXPECT_EQ(addr0.address[4], ((uint8_t*)property->val)[4]); in TEST_F()
38 EXPECT_EQ(addr0.address[5], ((uint8_t*)property->val)[5]); in TEST_F()
52 EXPECT_EQ(dc0._[0], ((uint8_t*)property->val)[0]); in TEST_F()
53 EXPECT_EQ(dc0._[1], ((uint8_t*)property->val)[1]); in TEST_F()
54 EXPECT_EQ(dc0._[2], ((uint8_t*)property->val)[2]); in TEST_F()
69 EXPECT_EQ((int)dt0, *(int*)property->val); in TEST_F()
[all …]
/system/extras/tests/sdcard/
Dtestcase.h61 void setNproc(size_t val) { mNproc = val; } in setNproc() argument
64 void setDataSize(size_t val) { mDataSize = val; } in setDataSize() argument
67 void setChunkSize(size_t val) { mChunkSize = val; } in setChunkSize() argument
70 void setTreeDepth(size_t val) { mTreeDepth = val; } in setTreeDepth() argument
73 void setNewFairSleepers(bool val) { in setNewFairSleepers() argument
74 mNewFairSleepers = val; in setNewFairSleepers()
75 android::setNewFairSleepers(val); in setNewFairSleepers()
79 void setNormalizedSleepers(bool val) { in setNormalizedSleepers() argument
80 mNormalizedSleepers = val; in setNormalizedSleepers()
81 android::setNormalizedSleepers(val); in setNormalizedSleepers()
/system/bt/btcore/src/
Dproperty.c27 static bt_property_t *property_new_(void *val, size_t len, bt_property_type_t type);
38 clone[i].val = osi_calloc(clone[i].len); in property_copy_array()
39 memcpy(clone[i].val, properties[i].val, clone[i].len); in property_copy_array()
72 …return strlen((const char *)longer->val) == (size_t)shorter->len && !memcmp(longer->val, shorter-> in property_equals()
75 return p1->len == p2->len && !memcmp(p1->val, p2->val, p1->len); in property_equals()
123 osi_free(properties[i].val); in property_free_array()
172 return (const bt_bdaddr_t *)property->val; in property_as_addr()
177 return (const bt_device_class_t *)property->val; in property_as_device_class()
182 return *(const bt_device_type_t *)property->val; in property_as_device_type()
187 return *(const uint32_t *)property->val; in property_as_discovery_timeout()
[all …]
Dcounter.c42 atomic_s64_t val; member
47 counter_t *val; member
154 void counter_set(const char *name, counter_data_t val) { in counter_set() argument
158 atomic_store_s64(&counter->val, val); in counter_set()
161 void counter_add(const char *name, counter_data_t val) { in counter_add() argument
165 if (val == 1) in counter_add()
166 atomic_inc_prefix_s64(&counter->val); in counter_add()
168 atomic_add_s64(&counter->val, val); in counter_add()
188 atomic_store_s64(&counter->val, initial_val); in counter_new_()
203 counter_free_(hash_element->val); in hash_element_free_()
[all …]
/system/keymaster/include/keymaster/
Dauthorization_set.h178 bool Contains(TypedEnumTag<KM_ENUM_REP, Tag, T> tag, T val) const { in Contains() argument
179 return ContainsEnumValue(tag, val); in Contains()
186 bool Contains(TypedEnumTag<KM_ENUM, Tag, T> tag, T val) const { in Contains() argument
187 return ContainsEnumValue(tag, val); in Contains()
195 inline bool GetTagValue(TypedTag<KM_UINT, T> tag, uint32_t* val) const { in GetTagValue() argument
196 return GetTagValueInt(tag, val); in GetTagValue()
205 bool GetTagValue(TypedTag<KM_UINT_REP, Tag> tag, size_t instance, uint32_t* val) const { in GetTagValue() argument
206 return GetTagValueIntRep(tag, instance, val); in GetTagValue()
214 inline bool GetTagValue(TypedTag<KM_ULONG, T> tag, uint64_t* val) const { in GetTagValue() argument
215 return GetTagValueLong(tag, val); in GetTagValue()
[all …]
/system/core/toolbox/upstream-netbsd/lib/libc/stdlib/
Dstrsuftoll.c116 strsuftoll(const char *desc, const char *val, in __weak_alias()
122 result = strsuftollx(desc, val, min, max, errbuf, sizeof(errbuf)); in __weak_alias()
134 __strsuftollx(const char *desc, const char *val, in __strsuftollx() argument
141 _DIAGASSERT(val != NULL); in __strsuftollx()
149 while (isspace((unsigned char)*val)) /* Skip leading space */ in __strsuftollx()
150 val++; in __strsuftollx()
153 num = strtoll(val, &expr, 10); in __strsuftollx()
157 if (expr == val) /* No digits */ in __strsuftollx()
224 snprintf(ebuf, ebuflen, "%s `%s': illegal number", desc, val); in __strsuftollx()
244 strsuftollx(const char *desc, const char *val, in strsuftollx() argument
[all …]
/system/extras/tests/lib/testUtil/
DtestUtil.c47 double ts2double(const struct timespec *val) in ts2double() argument
51 rv = val->tv_sec; in ts2double()
52 rv += (double) val->tv_nsec / nSecsPerSec; in ts2double()
58 double tv2double(const struct timeval *val) in tv2double() argument
62 rv = val->tv_sec; in tv2double()
63 rv += (double) val->tv_usec / uSecsPerSec; in tv2double()
184 uint32_t val; in testRand() local
188 val = lrand48(); in testRand()
192 val ^= lrand48() << 1; in testRand()
194 return val; in testRand()
[all …]
/system/keymaster/
Dauthorization_set_test.cpp251 uint32_t val; in read_uint32() local
252 memcpy(&val, buf, sizeof(val)); in read_uint32()
253 return val; in read_uint32()
257 uint32_t val; in add_to_uint32() local
258 memcpy(&val, buf, sizeof(val)); in add_to_uint32()
259 val += delta; in add_to_uint32()
260 memcpy(buf, &val, sizeof(val)); in add_to_uint32()
429 uint32_t val; in TEST() local
430 EXPECT_TRUE(set.GetTagValue(TAG_USER_ID, &val)); in TEST()
431 EXPECT_EQ(7U, val); in TEST()
[all …]
DList.h50 explicit _Node(const T& val) : mVal(val) {} in _Node() argument
56 inline void setVal(const T& val) { mVal = val; } in setVal() argument
207 void push_front(const T& val) { insert(begin(), val); } in push_front() argument
208 void push_back(const T& val) { insert(end(), val); } in push_back() argument
211 iterator insert(iterator posn, const T& val) in insert() argument
213 _Node* newNode = new _Node(val); // alloc & copy-construct in insert()
/system/core/mkbootimg/
Dmkbootimg.c142 char *val = argv[1]; in main() local
146 bootimg = val; in main()
148 kernel_fn = val; in main()
150 ramdisk_fn = val; in main()
152 second_fn = val; in main()
154 cmdline = val; in main()
156 base = strtoul(val, 0, 16); in main()
158 kernel_offset = strtoul(val, 0, 16); in main()
160 ramdisk_offset = strtoul(val, 0, 16); in main()
162 second_offset = strtoul(val, 0, 16); in main()
[all …]
/system/bt/btif/src/
Dbtif_core.c322 char val[PROPERTY_VALUE_MAX] = {0}; in btif_fetch_property() local
324 if (property_get(key, val, NULL)) { in btif_fetch_property()
325 if (string_to_bdaddr(val, addr)) { in btif_fetch_property()
326 BTIF_TRACE_DEBUG("%s: Got BDA %s", __func__, val); in btif_fetch_property()
336 char val[PROPERTY_VALUE_MAX] = {0}; in btif_fetch_local_bdaddr() local
342 if (property_get(PROPERTY_BT_BDADDR_PATH, val, NULL)) in btif_fetch_local_bdaddr()
346 BTIF_TRACE_DEBUG("%s, local bdaddr is stored in %s", __func__, val); in btif_fetch_local_bdaddr()
348 if ((addr_fd = TEMP_FAILURE_RETRY(open(val, O_RDONLY))) != -1) in btif_fetch_local_bdaddr()
350 memset(val, 0, sizeof(val)); in btif_fetch_local_bdaddr()
351 TEMP_FAILURE_RETRY(read(addr_fd, val, FACTORY_BT_BDADDR_STORAGE_LEN)); in btif_fetch_local_bdaddr()
[all …]
/system/core/libcutils/tests/
DPropertiesTest.cpp182 bool val = property_get_bool(PROPERTY_TEST_KEY, /*default_value*/false); in TEST_F() local
183 EXPECT_TRUE(val) << "Property should've been TRUE for value: '" << valuesTrue[i] << "'"; in TEST_F()
192 bool val = property_get_bool(PROPERTY_TEST_KEY, /*default_value*/true); in TEST_F() local
193 … EXPECT_FALSE(val) << "Property shoud've been FALSE For string value: '" << valuesFalse[i] << "'"; in TEST_F()
207 bool val = property_get_bool(PROPERTY_TEST_KEY, /*default_value*/true); in TEST_F() local
208 …EXPECT_TRUE(val) << "Property should've been NEITHER (true) for string value: '" << valuesNeither[… in TEST_F()
210 val = property_get_bool(PROPERTY_TEST_KEY, /*default_value*/false); in TEST_F()
211 …EXPECT_FALSE(val) << "Property should've been NEITHER (false) for string value: '" << valuesNeithe… in TEST_F()
257 int64_t val = property_get_int64(PROPERTY_TEST_KEY, DEFAULT_VALUE); in TEST_F() local
258 …EXPECT_PRED_FORMAT2(AssertEqualHex, getValues[i], val) << "Property was set to '" << setValues[i] … in TEST_F()
[all …]
/system/core/liblog/
Dlog_event_write.c26 static inline void copy4LE(uint8_t *buf, size_t pos, int val) in copy4LE() argument
28 buf[pos] = val & 0xFF; in copy4LE()
29 buf[pos+1] = (val >> 8) & 0xFF; in copy4LE()
30 buf[pos+2] = (val >> 16) & 0xFF; in copy4LE()
31 buf[pos+3] = (val >> 24) & 0xFF; in copy4LE()
/system/bt/bta/ag/
Dbta_ag_cmd.c842 tBTA_AG_VAL val; in bta_ag_at_hsp_cback() local
850 val.hdr.handle = bta_ag_scb_to_idx(p_scb); in bta_ag_at_hsp_cback()
851 val.hdr.app_id = p_scb->app_id; in bta_ag_at_hsp_cback()
852 val.num = (UINT16) int_arg; in bta_ag_at_hsp_cback()
853 BCM_STRNCPY_S(val.str, sizeof(val.str), p_arg, BTA_AG_AT_MAX_LEN); in bta_ag_at_hsp_cback()
854 val.str[BTA_AG_AT_MAX_LEN] = 0; in bta_ag_at_hsp_cback()
857 (*bta_ag_cb.p_cback)(bta_ag_hsp_cb_evt[cmd], (tBTA_AG *) &val); in bta_ag_at_hsp_cback()
873 tBTA_AG_VAL val; in bta_ag_at_hfp_cback() local
891 val.hdr.handle = bta_ag_scb_to_idx(p_scb); in bta_ag_at_hfp_cback()
892 val.hdr.app_id = p_scb->app_id; in bta_ag_at_hfp_cback()
[all …]
/system/bt/btcore/include/
Dcounter.h29 typedef bool (*counter_iter_cb)(const char *name, counter_data_t val, void *context);
32 void counter_set(const char *name, counter_data_t val);
33 void counter_add(const char *name, counter_data_t val);
/system/bt/osi/include/
Datomic.h56 static inline void atomic_store_##name(volatile atomic_##name##_t *atomic, type val) { \
57 __atomic_store_##sz(&atomic->_val, val, __ATOMIC_SEQ_CST); \
91 static inline type atomic_add_##name(volatile atomic_##name##_t *atomic, type val) { \
92 return __atomic_add_fetch_##sz(atomic, val, __ATOMIC_SEQ_CST); \
97 static inline type atomic_sub_##name(volatile atomic_##name##_t *atomic, type val) { \
98 return __atomic_sub_fetch_##sz(atomic, val, __ATOMIC_SEQ_CST); \
/system/core/libutils/
DLinearTransform.cpp30 uint64_t val, in scale_u64_to_u64() argument
55 tmp2 = (val >> 32) * N; in scale_u64_to_u64()
56 tmp1 = (val & UINT32_MAX) * N; in scale_u64_to_u64()
113 int64_t val, in linear_transform_s64_to_s64() argument
129 if (val < basis1) { in linear_transform_s64_to_s64()
131 abs_val = basis1 - val; in linear_transform_s64_to_s64()
134 abs_val = val - basis1; in linear_transform_s64_to_s64()
/system/vold/
DUtils.cpp379 int val = 0; in HexToStr() local
382 case 'f': case 'F': val = 15; break; in HexToStr()
383 case 'e': case 'E': val = 14; break; in HexToStr()
384 case 'd': case 'D': val = 13; break; in HexToStr()
385 case 'c': case 'C': val = 12; break; in HexToStr()
386 case 'b': case 'B': val = 11; break; in HexToStr()
387 case 'a': case 'A': val = 10; break; in HexToStr()
388 case '9': val = 9; break; in HexToStr()
389 case '8': val = 8; break; in HexToStr()
390 case '7': val = 7; break; in HexToStr()
[all …]
/system/core/include/sysutils/
DList.h51 explicit _Node(const T& val) : mVal(val) {} in _Node() argument
57 inline void setVal(const T& val) { mVal = val; } in setVal() argument
208 void push_front(const T& val) { insert(begin(), val); } in push_front() argument
209 void push_back(const T& val) { insert(end(), val); } in push_back() argument
212 iterator insert(iterator posn, const T& val) in insert() argument
214 _Node* newNode = new _Node(val); // alloc & copy-construct in insert()
/system/netd/server/
DList.h51 explicit _Node(const T& val) : mVal(val) {} in _Node() argument
57 inline void setVal(const T& val) { mVal = val; } in setVal() argument
208 void push_front(const T& val) { insert(begin(), val); } in push_front() argument
209 void push_back(const T& val) { insert(end(), val); } in push_back() argument
212 iterator insert(iterator posn, const T& val) in insert() argument
214 _Node* newNode = new _Node(val); // alloc & copy-construct in insert()
/system/core/include/utils/
DList.h50 explicit _Node(const T& val) : mVal(val) {} in _Node() argument
56 inline void setVal(const T& val) { mVal = val; } in setVal() argument
207 void push_front(const T& val) { insert(begin(), val); } in push_front() argument
208 void push_back(const T& val) { insert(end(), val); } in push_back() argument
211 iterator insert(iterator posn, const T& val) in insert() argument
213 _Node* newNode = new _Node(val); // alloc & copy-construct in insert()
/system/core/include/cutils/
Dsockets.h53 const char* val = getenv(key); in android_get_control_socket() local
54 if (!val) { in android_get_control_socket()
59 int fd = strtol(val, NULL, 10); in android_get_control_socket()

1234