/commonlibrary/c_utils/base/src/ |
D | parcel.cpp | 1144 bool Parcel::WriteVector(const std::vector<T1> &val, bool (Parcel::*Write)(T2)) in WriteVector() argument 1146 if (val.size() > INT_MAX) { in WriteVector() 1150 if (!this->WriteInt32(static_cast<int32_t>(val.size()))) { in WriteVector() 1154 for (const auto &v : val) { in WriteVector() 1160 size_t padSize = this->GetPadSize(val.size() * sizeof(T1)); in WriteVector() 1165 bool Parcel::WriteBoolVector(const std::vector<bool> &val) in WriteBoolVector() argument 1167 return WriteVector(val, &Parcel::WriteBool); in WriteBoolVector() 1170 bool Parcel::WriteInt8Vector(const std::vector<int8_t> &val) in WriteInt8Vector() argument 1172 return WriteVector(val, &Parcel::WriteInt8Unaligned); in WriteInt8Vector() 1175 bool Parcel::WriteInt16Vector(const std::vector<int16_t> &val) in WriteInt16Vector() argument [all …]
|
D | mapped_file.cpp | 525 bool MappedFile::ChangeOffset(off_t val) in ChangeOffset() argument 527 if (offset_ != val) { in ChangeOffset() 529 offset_ = val; in ChangeOffset() 540 bool MappedFile::ChangeSize(off_t val) in ChangeSize() argument 542 if ((val > 0 || val == DEFAULT_LENGTH) && size_ != val) { in ChangeSize() 544 size_ = val; in ChangeSize() 555 bool MappedFile::ChangePath(const std::string& val) in ChangePath() argument 557 if (path_ != val) { in ChangePath() 564 path_ = val; in ChangePath() 576 bool MappedFile::ChangeHint(const char* val) in ChangeHint() argument [all …]
|
/commonlibrary/c_utils/base/include/ |
D | parcel.h | 717 bool WriteVector(const std::vector<T1> &val, bool (Parcel::*Write)(T2)); 718 bool WriteBoolVector(const std::vector<bool> &val); 719 bool WriteInt8Vector(const std::vector<int8_t> &val); 720 bool WriteInt16Vector(const std::vector<int16_t> &val); 721 bool WriteInt32Vector(const std::vector<int32_t> &val); 722 bool WriteInt64Vector(const std::vector<int64_t> &val); 723 bool WriteUInt8Vector(const std::vector<uint8_t> &val); 724 bool WriteUInt16Vector(const std::vector<uint16_t> &val); 725 bool WriteUInt32Vector(const std::vector<uint32_t> &val); 726 bool WriteUInt64Vector(const std::vector<uint64_t> &val); [all …]
|
/commonlibrary/c_utils/docs/zh-cn/ |
D | c-utils-guide-parcel.md | 47 | bool | **ReadBoolVector**(std::vector< bool >* val) | 52 | bool | **ReadDoubleVector**(std::vector< double >* val) | 55 | bool | **ReadFloatVector**(std::vector< float >* val) | 59 | bool | **ReadInt16Vector**(std::vector< int16_t >* val) | 62 | bool | **ReadInt32Vector**(std::vector< int32_t >* val) | 65 | bool | **ReadInt64Vector**(std::vector< int64_t >* val) | 69 | bool | **ReadInt8Vector**(std::vector< int8_t >* val) | 77 | bool | **ReadString16Vector**(std::vector< std::u16string >* val) | 80 | bool | **ReadStringVector**(std::vector< std::string >* val) | 85 | bool | **ReadUInt16Vector**(std::vector< uint16_t >* val) | [all …]
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/util/ |
D | bit.rs | 161 pub fn from_usize(val: usize) -> Self { in from_usize() 162 Bit(val) in from_usize() 214 pub fn set_by_mask(&mut self, mask: Mask, val: usize) { in set_by_mask() 215 self.0 = (self.0 & !mask.mask) | ((val << mask.shift) & mask.mask); in set_by_mask() 247 pub fn set(&mut self, val: usize) { in set() 248 self.0 = val; in set() 743 let val = 0x0usize; in ut_bit_set_by_mask_bit32() localVariable 744 let mut bit = Bit::from_usize(val); in ut_bit_set_by_mask_bit32() 776 let val = 0xffff_ffff; in ut_bit_set_by_mask_bit32() localVariable 777 let mut bit = Bit::from_usize(val); in ut_bit_set_by_mask_bit32() [all …]
|
D | slots.rs | 33 fn new(val: T, prev: usize, next: usize) -> Entry<T> { in new() 35 data: Some(val), in new() 150 pub fn push_back(&mut self, val: T) -> usize { in push_back() 160 self.entries.push(Entry::new(val, tail, NULL)); in push_back() 167 self.entries[key].data = Some(val); in push_back() 202 let val = entry.data.take(); in pop_front() localVariable 214 return val; in pop_front() 234 if let Some(val) = entry.data.take() { in remove() 263 return Ok(val); in remove() 286 Some(val) => Some(val), in get() [all …]
|
D | linked_list.rs | 92 pub(crate) fn push_front(&mut self, val: NonNull<L>) { in push_front() 95 L::node(val).as_mut().next = head.next; in push_front() 96 L::node(val).as_mut().prev = Some(self.head); in push_front() 98 let node = Some(val); in push_front() 176 val: usize, field 181 fn new(val: usize) -> Entry { in new() 183 val, in new() 199 unsafe { ptr.as_ref().val } in get_val() 335 entry.val += 1; in ut_link_list_for_each_mut()
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/ |
D | token.rs | 20 pub fn from_usize(val: usize) -> Self { in from_usize() 21 Token(val) in from_usize() 26 fn from(val: Token) -> usize { in from() 27 val.0 in from()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/ |
D | slab.rs | 110 let (addr, val) = alloc.allocate().unwrap(); in sdv_slab_insert_many() 111 val.id.store(i, SeqCst); in sdv_slab_insert_many() 112 entries.push((addr, val)); in sdv_slab_insert_many() 123 let (addr, val) = alloc.allocate().unwrap(); in sdv_slab_insert_many() 124 val.id.store(10_000 - i, SeqCst); in sdv_slab_insert_many() 125 entries.push((addr, val)); in sdv_slab_insert_many() 148 let (addr, val) = alloc.allocate().unwrap(); in sdv_slab_insert_drop_reverse() 149 val.id.store(i, SeqCst); in sdv_slab_insert_drop_reverse() 150 entries.push((addr, val)); in sdv_slab_insert_drop_reverse()
|
D | async_fs.rs | 108 for (i, val) in buf.iter_mut().enumerate() { in sdv_async_fs_rw() 109 *val = i as u8; in sdv_async_fs_rw() 142 for (i, val) in buf2.iter_mut().enumerate() { in sdv_async_fs_rw() 143 *val = i as u8; in sdv_async_fs_rw()
|
D | join_set.rs | 174 let val = value.load(Relaxed); in sdv_join_set_join_all() localVariable 175 assert_eq!(val, 1000); in sdv_join_set_join_all()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/ |
D | worker.rs | 56 let val = ctx.get(); in get_current_handle() localVariable 57 if val.is_null() { in get_current_handle() 60 Some(unsafe { &*(val as *const _ as *const WorkerHandle) }) in get_current_handle() 69 let val = ctx.get(); in get_current_ctx() localVariable 70 if val.is_null() { in get_current_ctx() 73 Some(unsafe { &*(val as *const _ as *const WorkerContext) }) in get_current_ctx()
|
/commonlibrary/ets_utils/js_api_module/buffer/src/ |
D | js_buffer.ts | 857 …const val = (this[offset] << 24) + this.calculationBE(offset + 1, threeBytes); // 24 : the first v… constant 858 return (BigInt(val) << 32n) + // 32 means offset 32-bits left 897 …const val = this.calculationLE(offset + fourBytes, threeBytes) + (this[offset + sevenBytes] << 24)… constant 898 …return (BigInt(val) << 32n) + BigInt(this.calculationLE(offset, fourBytes)); // 32 means offset 32… 969 const val = this[offset]; constant 971 return val | (val & TWO_POW_SEVEN) * 0x1fffffe; // 0x1fffffe mean the decimal value is 33554430" 994 const val = this.calculationBE(offset, twoBytes); constant 995 return val | (val & TWO_POW_FIFTEEN) * 0x1fffe; // 0x1fffe mean the decimal value is 131070" 1018 const val = this[offset] + this[offset + 1] * Math.pow(twoBytes, eightBytes); constant 1019 return val | (val & TWO_POW_FIFTEEN) * 0x1fffe; // 0x1fffe mean the decimal value is 131070" [all …]
|
/commonlibrary/memory_utils/libpurgeablemem/cpp/src/ |
D | purgeable_mem.cpp | 33 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument 36 return val; in RoundUp() 38 return ((val + align - 1) / align) * align; in RoundUp()
|
D | purgeable_ashmem.cpp | 33 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument 36 return val; in RoundUp() 38 return ((val + align - 1) / align) * align; in RoundUp()
|
D | purgeable_mem_base.cpp | 34 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument 37 return val; in RoundUp() 39 return ((val + align - 1) / align) * align; in RoundUp()
|
/commonlibrary/memory_utils/libpurgeablemem/common/src/ |
D | ux_page_table_c.c | 93 static inline uint64_t RoundUp(uint64_t val, size_t align) in RoundUp() argument 96 return val; in RoundUp() 98 return ((val + align - 1) / align) * align; in RoundUp() 101 static inline uint64_t RoundDown_(uint64_t val, size_t align) in RoundDown_() argument 104 return val; in RoundDown_() 106 return val & (~(align - 1)); in RoundDown_()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/ |
D | array.rs | 172 Ok(val) => return Ready(Ok(val)), in poll_recv() 180 Ok(val) => Ready(Ok(val)), in poll_recv()
|
D | queue.rs | 205 Ok(val) => return Ready(Ok(val)), in poll_recv() 213 Ok(val) => Ready(Ok(val)), in poll_recv()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/ |
D | oneshot.rs | 432 Some(val) => { in take_value_sent() 434 Ok(val) in take_value_sent()
|
/commonlibrary/ets_utils/js_concurrent_module/taskpool/ |
D | worker.cpp | 323 napi_value val; in PerformTask() local 325 napi_get_element(env, args, i, &val); in PerformTask() 326 argsArray[i] = val; in PerformTask()
|
/commonlibrary/memory_utils/libpurgeablemem/c/src/ |
D | purgeable_mem_c.c | 50 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument 53 return val; in RoundUp() 55 return ((val + align - 1) / align) * align; in RoundUp()
|
/commonlibrary/ets_utils/js_api_module/xml/test/ |
D | test_xml.cpp | 1626 napi_value val = nullptr; variable 1627 napi_create_string_utf8(env, name.c_str(), name.size(), &val); 1629 napi_call_function(env, instance, testFunc, 1, &val, &funcResultValue); 1645 napi_create_string_utf8(env, name.c_str(), name.size(), &val); 1647 napi_call_function(env, instance, testFunc, 1, &val, &funcResultValue); 1651 napi_create_string_utf8(env, name.c_str(), name.size(), &val); 1653 napi_call_function(env, instance, testFunc, 1, &val, &funcResultValue); 1657 napi_create_string_utf8(env, name.c_str(), name.size(), &val); 1659 napi_call_function(env, instance, testFunc, 1, &val, &funcResultValue); 1663 napi_create_string_utf8(env, name.c_str(), name.size(), &val); [all …]
|
/commonlibrary/ets_utils/js_api_module/url/ |
D | js_url.cpp | 351 std::string val = ""; in DealIpv4() local 353 val = str.substr(left, pos - left); in DealIpv4() 354 if (sprintf_s(hexVal, sizeof(hexVal), "%02x", stoi(val)) == -1) { in DealIpv4() 356 return val; in DealIpv4() 362 val = str.substr(left); in DealIpv4() 363 if (sprintf_s(hexVal, sizeof(hexVal), "%02x", stoi(val)) == -1) { in DealIpv4() 365 return val; in DealIpv4() 542 int val = 0; in BinaryConversion() local 544 if (sscanf_s(num.c_str(), "%x", &val) == -1) { in BinaryConversion() 548 return std::to_string(val); in BinaryConversion() [all …]
|
/commonlibrary/ets_utils/js_api_module/convertxml/test/ |
D | test_convertxml.cpp | 32 napi_value val = nullptr; in setProperty() local 35 napi_get_boolean(env, false, &val); in setProperty() 36 napi_set_named_property(env, obj, proVec[i].c_str(), val); in setProperty() 39 napi_create_string_utf8(env, proVec[i + 1].c_str(), proVec[i + 1].size(), &val); in setProperty() 40 napi_set_named_property(env, obj, proVec[i].c_str(), val); in setProperty()
|