/system/core/libutils/include/utils/ |
D | BitSet.h | 33 uint32_t value; member 35 inline BitSet32() : value(0UL) { } in BitSet32() 36 explicit inline BitSet32(uint32_t value) : value(value) { } in BitSet32() 42 inline void clear() { clear(value); } in clear() 44 static inline void clear(uint32_t& value) { value = 0UL; } in clear() 47 inline uint32_t count() const { return count(value); } in count() 49 static inline uint32_t count(uint32_t value) { return __builtin_popcountl(value); } in count() 52 inline bool isEmpty() const { return isEmpty(value); } in isEmpty() 54 static inline bool isEmpty(uint32_t value) { return ! value; } in isEmpty() 57 inline bool isFull() const { return isFull(value); } in isFull() [all …]
|
D | TypeHelpers.h | 35 template <typename T> struct trait_trivial_ctor { enum { value = false }; }; enumerator 36 template <typename T> struct trait_trivial_dtor { enum { value = false }; }; enumerator 37 template <typename T> struct trait_trivial_copy { enum { value = false }; }; enumerator 38 template <typename T> struct trait_trivial_move { enum { value = false }; }; enumerator 39 template <typename T> struct trait_pointer { enum { value = false }; }; enumerator 40 template <typename T> struct trait_pointer<T*> { enum { value = true }; }; 46 is_pointer = trait_pointer<TYPE>::value, 48 has_trivial_ctor = is_pointer || trait_trivial_ctor<TYPE>::value, 50 has_trivial_dtor = is_pointer || trait_trivial_dtor<TYPE>::value, 52 has_trivial_copy = is_pointer || trait_trivial_copy<TYPE>::value, [all …]
|
/system/core/libunwindstack/tests/ |
D | DwarfMemoryTest.cpp | 38 void GetEncodedSizeTest(uint8_t value, size_t expected); 85 uint64_t value; in TEST_F() local 90 ASSERT_TRUE(dwarf_mem_->ReadSigned<int8_t>(&value)); in TEST_F() 91 ASSERT_EQ(static_cast<int8_t>(-10), static_cast<int8_t>(value)); in TEST_F() 92 ASSERT_TRUE(dwarf_mem_->ReadSigned<int8_t>(&value)); in TEST_F() 93 ASSERT_EQ(static_cast<int8_t>(200), static_cast<int8_t>(value)); in TEST_F() 99 ASSERT_TRUE(dwarf_mem_->ReadSigned<int16_t>(&value)); in TEST_F() 100 ASSERT_EQ(static_cast<int16_t>(-1000), static_cast<int16_t>(value)); in TEST_F() 101 ASSERT_TRUE(dwarf_mem_->ReadSigned<int16_t>(&value)); in TEST_F() 102 ASSERT_EQ(static_cast<int16_t>(50100), static_cast<int16_t>(value)); in TEST_F() [all …]
|
D | MemoryFake.h | 39 void SetMemoryBlock(uint64_t addr, size_t length, uint8_t value); 41 void SetData8(uint64_t addr, uint8_t value) { in SetData8() argument 42 SetMemory(addr, &value, sizeof(value)); in SetData8() 45 void SetData16(uint64_t addr, uint16_t value) { in SetData16() argument 46 SetMemory(addr, &value, sizeof(value)); in SetData16() 49 void SetData32(uint64_t addr, uint32_t value) { in SetData32() argument 50 SetMemory(addr, &value, sizeof(value)); in SetData32() 53 void SetData64(uint64_t addr, uint64_t value) { in SetData64() argument 54 SetMemory(addr, &value, sizeof(value)); in SetData64()
|
/system/core/fs_mgr/libfs_avb/tests/ |
D | util_test.cpp | 38 uint8_t value; in TEST() local 40 EXPECT_TRUE(NibbleValue('0', &value)); in TEST() 41 EXPECT_EQ(0, value); in TEST() 42 EXPECT_TRUE(NibbleValue('1', &value)); in TEST() 43 EXPECT_EQ(1, value); in TEST() 44 EXPECT_TRUE(NibbleValue('2', &value)); in TEST() 45 EXPECT_EQ(2, value); in TEST() 46 EXPECT_TRUE(NibbleValue('3', &value)); in TEST() 47 EXPECT_EQ(3, value); in TEST() 48 EXPECT_TRUE(NibbleValue('4', &value)); in TEST() [all …]
|
/system/core/libstats/include/ |
D | stats_event_list.h | 30 int android_log_write_char_array(android_log_context ctx, const char* value, size_t len); 88 stats_event_list& operator<<(int32_t value) { 89 int retval = android_log_write_int32(ctx, value); 96 stats_event_list& operator<<(uint32_t value) { 97 int retval = android_log_write_int32(ctx, static_cast<int32_t>(value)); 104 stats_event_list& operator<<(bool value) { 105 int retval = android_log_write_int32(ctx, value ? 1 : 0); 112 stats_event_list& operator<<(int64_t value) { 113 int retval = android_log_write_int64(ctx, value); 120 stats_event_list& operator<<(uint64_t value) { [all …]
|
/system/update_engine/update_manager/ |
D | boxed_value.cc | 46 string BoxedValue::ValuePrinter<string>(const void* value) { in ValuePrinter() argument 47 const string* val = reinterpret_cast<const string*>(value); in ValuePrinter() 52 string BoxedValue::ValuePrinter<int>(const void* value) { in ValuePrinter() argument 53 const int* val = reinterpret_cast<const int*>(value); in ValuePrinter() 62 string BoxedValue::ValuePrinter<unsigned int>(const void* value) { in ValuePrinter() argument 63 const unsigned int* val = reinterpret_cast<const unsigned int*>(value); in ValuePrinter() 72 string BoxedValue::ValuePrinter<int64_t>(const void* value) { in ValuePrinter() argument 73 const int64_t* val = reinterpret_cast<const int64_t*>(value); in ValuePrinter() 82 string BoxedValue::ValuePrinter<uint64_t>(const void* value) { in ValuePrinter() argument 83 const uint64_t* val = reinterpret_cast<const uint64_t*>(value); in ValuePrinter() [all …]
|
/system/chre/apps/chqts/src/shared/ |
D | nano_endian_le_test.cc | 37 uint32_t value; in TEST() local 38 ::memcpy(&value, kLittleEndianRepresentation, sizeof(value)); in TEST() 40 value = nanoapp_testing::littleEndianToHost(value); in TEST() 41 EXPECT_EQ(0, ::memcmp(&value, kLittleEndianRepresentation, sizeof(value))); in TEST() 45 uint32_t value; in TEST() local 46 ::memcpy(&value, kLittleEndianRepresentation, sizeof(value)); in TEST() 48 value = nanoapp_testing::hostToLittleEndian(value); in TEST() 49 EXPECT_EQ(0, ::memcmp(&value, kLittleEndianRepresentation, sizeof(value))); in TEST()
|
D | nano_endian_be_test.cc | 39 uint32_t value; in TEST() local 40 ::memcpy(&value, kLittleEndianRepresentation, sizeof(value)); in TEST() 42 value = nanoapp_testing::littleEndianToHost(value); in TEST() 43 EXPECT_EQ(0, ::memcmp(&value, kBigEndianRepresentation, sizeof(value))); in TEST() 47 uint32_t value; in TEST() local 48 ::memcpy(&value, kBigEndianRepresentation, sizeof(value)); in TEST() 50 value = nanoapp_testing::hostToLittleEndian(value); in TEST() 51 EXPECT_EQ(0, ::memcmp(&value, kLittleEndianRepresentation, sizeof(value))); in TEST()
|
/system/core/liblog/include/log/ |
D | log_event_list.h | 77 int android_log_write_int32(android_log_context ctx, int32_t value); 78 int android_log_write_int64(android_log_context ctx, int64_t value); 79 int android_log_write_string8(android_log_context ctx, const char* value); 80 int android_log_write_string8_len(android_log_context ctx, const char* value, 82 int android_log_write_float32(android_log_context ctx, float value); 154 android_log_event_list& operator<<(int32_t value) { 155 int retval = android_log_write_int32(ctx, value); 160 android_log_event_list& operator<<(uint32_t value) { 161 int retval = android_log_write_int32(ctx, static_cast<int32_t>(value)); 166 android_log_event_list& operator<<(bool value) { [all …]
|
/system/core/init/ |
D | property_type.cpp | 31 bool CheckType(const std::string& type_string, const std::string& value) { in CheckType() argument 33 if (value.empty()) { in CheckType() 47 return value == "true" || value == "false" || value == "1" || value == "0"; in CheckType() 51 return ParseInt(value, &parsed); in CheckType() 55 if (value.empty() || value.front() == '-') { in CheckType() 58 return ParseUint(value, &parsed); in CheckType() 62 return ParseDouble(value.c_str(), &parsed); in CheckType() 65 auto it = value.begin(); in CheckType() 66 while (it != value.end() && isdigit(*it)) { in CheckType() 69 if (it == value.begin() || it == value.end() || (*it != 'g' && *it != 'k' && *it != 'm')) { in CheckType() [all …]
|
/system/core/libunwindstack/ |
D | DwarfMemory.cpp | 38 bool DwarfMemory::ReadSigned(uint64_t* value) { in ReadSigned() argument 43 *value = static_cast<int64_t>(signed_value); in ReadSigned() 47 bool DwarfMemory::ReadULEB128(uint64_t* value) { in ReadULEB128() argument 58 *value = cur_value; in ReadULEB128() 62 bool DwarfMemory::ReadSLEB128(int64_t* value) { in ReadSLEB128() argument 77 *value = static_cast<int64_t>(cur_value); in ReadSLEB128() 105 bool DwarfMemory::AdjustEncodedValue(uint8_t encoding, uint64_t* value) { in AdjustEncodedValue() argument 118 *value += pc_offset_; in AdjustEncodedValue() 125 *value += text_offset_; in AdjustEncodedValue() 132 *value += data_offset_; in AdjustEncodedValue() [all …]
|
/system/update_engine/common/ |
D | prefs_unittest.cc | 51 bool SetValue(const string& key, const string& value) { in SetValue() argument 53 value.data(), in SetValue() 54 value.length()) == static_cast<int>(value.length()); in SetValue() 67 EXPECT_EQ(prefs_dir_.Append(kAllvalidCharsKey).value(), path.value()); in TEST_F() 83 string value; in TEST_F() local 84 EXPECT_TRUE(prefs_.GetString(kKey, &value)); in TEST_F() 85 EXPECT_EQ(test_data, value); in TEST_F() 89 string value; in TEST_F() local 90 EXPECT_FALSE(prefs_.GetString(",bad", &value)); in TEST_F() 94 string value; in TEST_F() local [all …]
|
D | prefs.cc | 32 bool PrefsBase::GetString(const string& key, string* value) const { in GetString() 33 return storage_->GetKey(key, value); in GetString() 36 bool PrefsBase::SetString(const string& key, const string& value) { in SetString() argument 37 TEST_AND_RETURN_FALSE(storage_->SetKey(key, value)); in SetString() 47 bool PrefsBase::GetInt64(const string& key, int64_t* value) const { in GetInt64() 52 TEST_AND_RETURN_FALSE(base::StringToInt64(str_value, value)); in GetInt64() 56 bool PrefsBase::SetInt64(const string& key, const int64_t value) { in SetInt64() argument 57 return SetString(key, base::Int64ToString(value)); in SetInt64() 60 bool PrefsBase::GetBoolean(const string& key, bool* value) const { in GetBoolean() 66 *value = false; in GetBoolean() [all …]
|
/system/bt/packet/base/ |
D | packet_builder.h | 35 bool AddPayloadOctets1(const std::shared_ptr<Packet>& pkt, uint8_t value) { in AddPayloadOctets1() argument 36 return AddPayloadOctets(pkt, 1, value); in AddPayloadOctets1() 38 bool AddPayloadOctets2(const std::shared_ptr<Packet>& pkt, uint16_t value) { in AddPayloadOctets2() argument 39 return AddPayloadOctets(pkt, 2, value); in AddPayloadOctets2() 41 bool AddPayloadOctets3(const std::shared_ptr<Packet>& pkt, uint32_t value) { in AddPayloadOctets3() argument 42 return AddPayloadOctets(pkt, 3, value); in AddPayloadOctets3() 44 bool AddPayloadOctets4(const std::shared_ptr<Packet>& pkt, uint32_t value) { in AddPayloadOctets4() argument 45 return AddPayloadOctets(pkt, 4, value); in AddPayloadOctets4() 47 bool AddPayloadOctets6(const std::shared_ptr<Packet>& pkt, uint64_t value) { in AddPayloadOctets6() argument 48 return AddPayloadOctets(pkt, 6, value); in AddPayloadOctets6() [all …]
|
/system/linkerconfig/modules/tests/ |
D | variables_test.cc | 27 auto value = Variables::GetValue("TEST_KEY"); in TEST() local 28 ASSERT_TRUE(value.has_value()); in TEST() 29 ASSERT_EQ(value.value(), "TEST_VALUE"); in TEST() 39 auto value = Variables::GetValue("debug.linkerconfig.test_prop_key"); in TEST() local 40 ASSERT_TRUE(value.has_value()); in TEST() 41 ASSERT_EQ(value.value(), "TEST_PROP_VALUE"); in TEST() 46 auto value = Variables::GetValue("INVALID_KEY"); in TEST() local 47 ASSERT_FALSE(value.has_value()); in TEST()
|
/system/bt/osi/test/ |
D | properties_test.cc | 28 char value[PROPERTY_VALUE_MAX] = {0}; in TEST_F() local 29 osi_property_get("very.useful.test", value, "very_useful_value"); in TEST_F() 30 ASSERT_STREQ(value, "very_useful_value"); in TEST_F() 34 char value[PROPERTY_VALUE_MAX] = "nothing_interesting"; in TEST_F() local 35 int ret = osi_property_set("very.useful.set.test", value); in TEST_F() 44 int32_t value = 42; in TEST_F() local 45 int32_t rvalue = osi_property_get_int32("very.useful.test", value); in TEST_F() 46 ASSERT_EQ(rvalue, value); in TEST_F() 50 char value[PROPERTY_VALUE_MAX] = "42"; in TEST_F() local 51 int ret = osi_property_set("very.useful.set.test", value); in TEST_F()
|
/system/bt/vendor_libs/test_vendor_lib/packets/hci/ |
D | event_payload_builder.cc | 43 bool EventPayloadBuilder::AddPayloadOctets(size_t octets, uint64_t value) { in AddPayloadOctets() argument 46 uint64_t v = value; in AddPayloadOctets() 69 bool EventPayloadBuilder::AddPayloadOctets1(uint8_t value) { in AddPayloadOctets1() argument 70 return AddPayloadOctets(1, value); in AddPayloadOctets1() 73 bool EventPayloadBuilder::AddPayloadOctets2(uint16_t value) { in AddPayloadOctets2() argument 74 return AddPayloadOctets(2, value); in AddPayloadOctets2() 77 bool EventPayloadBuilder::AddPayloadOctets3(uint32_t value) { in AddPayloadOctets3() argument 78 return AddPayloadOctets(3, value); in AddPayloadOctets3() 81 bool EventPayloadBuilder::AddPayloadOctets4(uint32_t value) { in AddPayloadOctets4() argument 82 return AddPayloadOctets(4, value); in AddPayloadOctets4() [all …]
|
/system/core/libcutils/ |
D | str_parms.cpp | 89 static bool remove_pair(void *key, void *value, void *context) in remove_pair() argument 115 free(value); in remove_pair() 160 char *value; in str_parms_create_str() local 170 value = strdup(eq); in str_parms_create_str() 172 value = strdup(""); in str_parms_create_str() 175 value = strdup(""); in str_parms_create_str() 179 old_val = hashmapPut(str_parms->map, key, value); in str_parms_create_str() 180 RELEASE_OWNERSHIP(value); in str_parms_create_str() 207 const char *value) in str_parms_add_str() argument 223 tmp_val = strdup(value); in str_parms_add_str() [all …]
|
/system/bt/gd/packet/ |
D | raw_builder.cc | 45 bool RawBuilder::AddOctets(size_t octets, uint64_t value) { in AddOctets() argument 48 uint64_t v = value; in AddOctets() 71 bool RawBuilder::AddOctets1(uint8_t value) { in AddOctets1() argument 72 return AddOctets(1, value); in AddOctets1() 75 bool RawBuilder::AddOctets2(uint16_t value) { in AddOctets2() argument 76 return AddOctets(2, value); in AddOctets2() 79 bool RawBuilder::AddOctets3(uint32_t value) { in AddOctets3() argument 80 return AddOctets(3, value); in AddOctets3() 83 bool RawBuilder::AddOctets4(uint32_t value) { in AddOctets4() argument 84 return AddOctets(4, value); in AddOctets4() [all …]
|
/system/bt/vendor_libs/test_vendor_lib/packets/ |
D | raw_builder.cc | 43 bool RawBuilder::AddOctets(size_t octets, uint64_t value) { in AddOctets() argument 46 uint64_t v = value; in AddOctets() 69 bool RawBuilder::AddOctets1(uint8_t value) { in AddOctets1() argument 70 return AddOctets(1, value); in AddOctets1() 73 bool RawBuilder::AddOctets2(uint16_t value) { in AddOctets2() argument 74 return AddOctets(2, value); in AddOctets2() 77 bool RawBuilder::AddOctets3(uint32_t value) { in AddOctets3() argument 78 return AddOctets(3, value); in AddOctets3() 81 bool RawBuilder::AddOctets4(uint32_t value) { in AddOctets4() argument 82 return AddOctets(4, value); in AddOctets4() [all …]
|
/system/bt/embdrv/sbc/decoder/include/ |
D | oi_bitstream.h | 53 INLINE void OI_BITSTREAM_WriteUINT(OI_BITSTREAM* bs, uint16_t value, 78 #define OI_BITSTREAM_READUINT(result, bits, ptr, value, bitPtr) \ argument 84 (result) = (value) << (bitPtr); \ 89 (value) = ((value) << 8) | *(ptr)++; \ 95 #define OI_BITSTREAM_WRITEUINT(ptr, value, bitPtr, datum, bits) \ argument 98 (value) |= (datum) << (bitPtr); \ 102 *(ptr)++ = (uint8_t)((value) >> 24); \ 103 (value) <<= 8; \ 107 #define OI_BITSTREAM_WRITEFLUSH(ptr, value, bitPtr) \ argument 111 *(ptr)++ = (uint8_t)((value) >> 24); \ [all …]
|
/system/testing/gtest_extras/ |
D | Options.cpp | 90 static bool GetNumeric(const char* arg, const char* value, IntType* numeric_value, bool from_env) { in GetNumeric() argument 92 if constexpr (std::is_unsigned<IntType>::value) { in GetNumeric() 93 result = android::base::ParseUint<IntType>(value, numeric_value); in GetNumeric() 95 result = android::base::ParseInt<IntType>(value, numeric_value); in GetNumeric() 99 PrintError(arg, std::string("value overflows (") + value + ")", from_env); in GetNumeric() 101 PrintError(arg, std::string("value is not formatted as a numeric value (") + value + ")", in GetNumeric() 109 bool Options::SetPrintTime(const std::string&, const std::string& value, bool) { in SetPrintTime() argument 110 if (!value.empty() && strtol(value.c_str(), nullptr, 10) == 0) { in SetPrintTime() 116 bool Options::SetNumeric(const std::string& arg, const std::string& value, bool from_env) { in SetNumeric() argument 118 if (!GetNumeric<uint64_t>(arg.c_str(), value.c_str(), numeric, from_env)) { in SetNumeric() [all …]
|
/system/media/audio_utils/tests/ |
D | variadic_tests.cpp | 31 auto value = (expr); \ 32 printf("(%s): %s\n", #expr, std::to_string(value).c_str()); \ 33 if ((expected) == (expected)) { EXPECT_EQ((expected), (value)); } \ 34 EXPECT_EQ((expected) != (expected), (value) != (value)); /* nan check */\ 39 auto value = (expr); \ 40 printf("(%s): %s\n", #expr, std::to_string(value).c_str()); \ 41 TEST_EXPECT_NEAR(ref, value); \ 70 EXPECT_FALSE(android::audio_utils::is_variadic<double>::value); in TEST() 74 EXPECT_TRUE(android::audio_utils::is_variadic<tuple_t>::value); in TEST() 75 EXPECT_TRUE(android::audio_utils::is_tuple<tuple_t>::value); in TEST() [all …]
|
/system/core/libcutils/arch-mips/ |
D | android_memset.c | 36 void android_memset16(uint16_t* dst, uint16_t value, size_t size) in android_memset16() argument 47 *dst++ = value; in android_memset16() 52 uint32_t value32 = (((uint32_t)value) << 16) | ((uint32_t)value); in android_memset16() 55 dst[size-1] = value; /* fill unpaired last elem */ in android_memset16() 63 void android_memset32(uint32_t* dst, uint32_t value, size_t size) in android_memset32() argument 74 *dst++ = value; in android_memset32() 79 uint64_t value64 = (((uint64_t)value) << 32) | ((uint64_t)value); in android_memset32() 97 *dst++ = value; in android_memset32()
|