Home
last modified time | relevance | path

Searched refs:val (Results 1 - 25 of 34) sorted by relevance

12

/commonlibrary/c_utils/base/src/
H A Dparcel.cpp1325 bool Parcel::WriteVector(const std::vector<T1> &val, bool (Parcel::*Write)(T2)) in WriteVector() argument
1327 if (val.size() > INT_MAX) { in WriteVector()
1331 if (!this->WriteInt32(static_cast<int32_t>(val.size()))) { in WriteVector()
1335 for (const auto &v : val) { in WriteVector()
1341 size_t padSize = this->GetPadSize(val.size() * sizeof(T1)); in WriteVector()
1375 bool Parcel::WriteBoolVector(const std::vector<bool> &val) in WriteBoolVector() argument
1377 return WriteFixedAlignVector<int32_t>(val, &Parcel::WriteBool); in WriteBoolVector()
1380 bool Parcel::WriteInt8Vector(const std::vector<int8_t> &val) in WriteInt8Vector() argument
1382 return WriteVector(val, &Parcel::WriteInt8Unaligned); in WriteInt8Vector()
1385 bool Parcel::WriteInt16Vector(const std::vector<int16_t> &val) in WriteInt16Vector() argument
1390 WriteInt32Vector(const std::vector<int32_t> &val) WriteInt32Vector() argument
1395 WriteInt64Vector(const std::vector<int64_t> &val) WriteInt64Vector() argument
1400 WriteUInt8Vector(const std::vector<uint8_t> &val) WriteUInt8Vector() argument
1405 WriteUInt16Vector(const std::vector<uint16_t> &val) WriteUInt16Vector() argument
1410 WriteUInt32Vector(const std::vector<uint32_t> &val) WriteUInt32Vector() argument
1415 WriteUInt64Vector(const std::vector<uint64_t> &val) WriteUInt64Vector() argument
1420 WriteFloatVector(const std::vector<float> &val) WriteFloatVector() argument
1425 WriteDoubleVector(const std::vector<double> &val) WriteDoubleVector() argument
1430 WriteStringVector(const std::vector<std::string> &val) WriteStringVector() argument
1435 WriteString16Vector(const std::vector<std::u16string> &val) WriteString16Vector() argument
1441 ReadVector(std::vector<T> *val, bool (Parcel::*Read)(T &)) ReadVector() argument
1475 ReadFixedAlignVector(std::vector<T1> *val, bool (Parcel::*SpecialRead)(T2 &)) ReadFixedAlignVector() argument
1511 ReadBoolVector(std::vector<bool> *val) ReadBoolVector() argument
1516 ReadInt8Vector(std::vector<int8_t> *val) ReadInt8Vector() argument
1521 ReadInt16Vector(std::vector<int16_t> *val) ReadInt16Vector() argument
1526 ReadInt32Vector(std::vector<int32_t> *val) ReadInt32Vector() argument
1531 ReadInt64Vector(std::vector<int64_t> *val) ReadInt64Vector() argument
1536 ReadUInt8Vector(std::vector<uint8_t> *val) ReadUInt8Vector() argument
1541 ReadUInt16Vector(std::vector<uint16_t> *val) ReadUInt16Vector() argument
1546 ReadUInt32Vector(std::vector<uint32_t> *val) ReadUInt32Vector() argument
1551 ReadUInt64Vector(std::vector<uint64_t> *val) ReadUInt64Vector() argument
1556 ReadFloatVector(std::vector<float> *val) ReadFloatVector() argument
1561 ReadDoubleVector(std::vector<double> *val) ReadDoubleVector() argument
1566 ReadStringVector(std::vector<std::string> *val) ReadStringVector() argument
1595 ReadString16Vector(std::vector<std::u16string> *val) ReadString16Vector() argument
[all...]
H A Dmapped_file.cpp525 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()
576 ChangeHint(const char* val) ChangeHint() argument
591 ChangeMode(MapMode val) ChangeMode() argument
[all...]
/commonlibrary/c_utils/base/test/fuzztest/timer_fuzzer/
H A Dtimer_fuzzer.cpp39 [](FuzzedDataProvider* dataProvider, Utils::Timer& timer, vector<uint32_t>& val) {
43 val.push_back(timerId);
51 [](FuzzedDataProvider* dataProvider, Utils::Timer& timer, vector<uint32_t>& val) {
52 if (val.size() == 0) {
55 size_t id = dataProvider->ConsumeIntegralInRange<size_t>(0, val.size() - 1);
56 timer.Unregister(val[id]);
57 FUZZ_LOGI("Unregister, timerId = %{public}d", val[id]);
58 for (size_t i = id; i < val.size() - 1; i++) {
59 swap(val[i], val[
[all...]
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
H A Dsleep.rs294 let val = Arc::new(AtomicUsize::new(0)); in ut_new_timer_sleep()
295 let val_cpy = val.clone(); in ut_new_timer_sleep()
303 assert_eq!(val.load(Ordering::Relaxed), 1); in ut_new_timer_sleep()
304 let val_cpy2 = val.clone(); in ut_new_timer_sleep()
305 let val_cpy3 = val.clone(); in ut_new_timer_sleep()
306 let val_cpy4 = val.clone(); in ut_new_timer_sleep()
322 assert_eq!(val.load(Ordering::Relaxed), 4); in ut_new_timer_sleep()
328 /// 1. Call sleep with a duration of zero, check if the val is successfully
330 /// 2. Call sleep with a past instant, check if the val is successfully
334 let mut val in ut_timer_sleep_zero() variables
336 let mut val = block_on(async move { ut_timer_sleep_zero() variables
[all...]
/commonlibrary/c_utils/base/include/
H A Dparcel.h719 * @param val Indicates the reference to the vector.
725 bool WriteVector(const std::vector<T1> &val, bool (Parcel::*Write)(T2));
728 bool WriteBoolVector(const std::vector<bool> &val);
729 bool WriteInt8Vector(const std::vector<int8_t> &val);
730 bool WriteInt16Vector(const std::vector<int16_t> &val);
731 bool WriteInt32Vector(const std::vector<int32_t> &val);
732 bool WriteInt64Vector(const std::vector<int64_t> &val);
733 bool WriteUInt8Vector(const std::vector<uint8_t> &val);
734 bool WriteUInt16Vector(const std::vector<uint16_t> &val);
735 bool WriteUInt32Vector(const std::vector<uint32_t> &val);
[all...]
/commonlibrary/rust/ylong_runtime/ylong_io/src/
H A Dtoken.rs20 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/memory_utils/libpurgeablemem/cpp/src/
H A Dpurgeable_mem.cpp33 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument
35 if (val + align < val || val + align < align) { in RoundUp()
37 return val; in RoundUp()
40 return val; in RoundUp()
42 return ((val + align - 1) / align) * align; in RoundUp()
H A Dpurgeable_ashmem.cpp33 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument
35 if (val + align < val || val + align < align) { in RoundUp()
37 return val; in RoundUp()
40 return val; in RoundUp()
42 return ((val + align - 1) / align) * align; in RoundUp()
H A Dpurgeable_mem_base.cpp34 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument
36 if (val + align < val || val + align < align) { in RoundUp()
38 return val; in RoundUp()
41 return val; in RoundUp()
43 return ((val + align - 1) / align) * align; in RoundUp()
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/util/
H A Dbit.rs161 pub fn from_usize(val: usize) -> Self { in from_usize()
162 Bit(val) in from_usize()
173 /// let val = bits.as_usize();
174 /// assert_eq!(val, 0);
186 /// When Mask binary length >= val binary length (excluding leading zeros)
194 /// // val's length 16(dividing the leading 0)
195 /// let val = 0x1234usize;
196 /// bits.set_by_mask(MASK, val);
199 /// When Mask binary length < val binary length (excluding leading zeros),
200 /// val i
[all...]
H A Dslots.rs32 fn new(val: T, prev: usize, next: usize) -> Entry<T> { in new()
34 data: Some(val), in new()
84 pub fn push_back(&mut self, val: T) -> usize { in push_back()
94 self.entries.push(Entry::new(val, tail, NULL)); in push_back()
101 self.entries[key].data = Some(val); in push_back()
136 let val = entry.data.take(); in pop_front()
148 return val; in pop_front()
168 let val = entry.data.take().ok_or(SlotsError)?; in remove()
197 Ok(val) in remove()
249 Some(ref val) in index()
[all...]
H A Dlinked_list.rs94 pub(crate) fn push_front(&mut self, val: NonNull<L>) {
97 L::node(val).as_mut().next = head.next;
98 L::node(val).as_mut().prev = Some(self.head);
100 let node = Some(val);
184 val: usize,
189 fn new(val: usize) -> Entry { in new()
191 val, in new()
207 unsafe { ptr.as_ref().val } in get_val()
341 if x.val == 2 { in ut_link_list_for_each_mut()
342 value = x.val; in ut_link_list_for_each_mut()
[all...]
H A Dslab.rs188 if let Some((addr, val)) = Page::allocate(page) { in allocate()
189 return Some((addr, val)); in allocate()
676 let (addr, val) = alloc.allocate().unwrap(); in ut_slab_insert_many()
677 val.id.store(i, SeqCst); in ut_slab_insert_many()
678 entries.push((addr, val)); in ut_slab_insert_many()
689 let (addr, val) = alloc.allocate().unwrap(); in ut_slab_insert_many()
690 val.id.store(10_000 - i, SeqCst); in ut_slab_insert_many()
691 entries.push((addr, val)); in ut_slab_insert_many()
714 let (addr, val) = alloc.allocate().unwrap(); in ut_slab_insert_drop_reverse()
715 val in ut_slab_insert_drop_reverse()
[all...]
/commonlibrary/rust/ylong_runtime/ylong_signal/src/
H A Dspin_rwlock.rs49 let val = Box::new(data);
50 let val_ptr = Box::into_raw(val);
145 pub(crate) fn store(&mut self, val: T) {
146 let val = Box::new(val);
147 let val_ptr = Box::into_raw(val);
/commonlibrary/memory_utils/libpurgeablemem/common/src/
H A Dux_page_table_c.c108 static inline uint64_t RoundUp(uint64_t val, size_t align) in RoundUp() argument
110 if (val + align < val || val + align < align) { in RoundUp()
112 return val; in RoundUp()
115 return val; in RoundUp()
117 return ((val + align - 1) / align) * align; in RoundUp()
120 static inline uint64_t RoundDown(uint64_t val, size_t align) in RoundDown() argument
123 return val; in RoundDown()
125 return val in RoundDown()
[all...]
/commonlibrary/ets_utils/js_concurrent_module/utils/locks/
H A Dasync_lock_manager.h68 static bool GetLockMode(napi_env env, napi_value val, LockMode &mode);
69 static bool GetLockOptions(napi_env env, napi_value val, LockOptions &options);
H A Dasync_lock_manager.cpp445 bool AsyncLockManager::GetLockMode(napi_env env, napi_value val, LockMode &mode) in GetLockMode() argument
447 uint32_t modeNative = NapiHelper::GetUint32Value(env, val); in GetLockMode()
455 bool AsyncLockManager::GetLockOptions(napi_env env, napi_value val, LockOptions &options) in GetLockOptions() argument
457 napi_value isAvailable = NapiHelper::GetNameProperty(env, val, "isAvailable"); in GetLockOptions()
458 napi_value signal = NapiHelper::GetNameProperty(env, val, "signal"); in GetLockOptions()
459 napi_value timeout = NapiHelper::GetNameProperty(env, val, "timeout"); in GetLockOptions()
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Dyield.rs66 let val = Arc::new(AtomicUsize::new(0)); in sdv_yield_now_single_worker()
70 let val_cpy = val.clone(); in sdv_yield_now_single_worker()
H A Dasync_fs.rs111 for (i, val) in buf.iter_mut().enumerate() { in sdv_async_fs_rw()
112 *val = i as u8; in sdv_async_fs_rw()
145 for (i, val) in buf2.iter_mut().enumerate() { in sdv_async_fs_rw()
146 *val = i as u8; in sdv_async_fs_rw()
/commonlibrary/memory_utils/libpurgeablemem/c/src/
H A Dpurgeable_mem_c.c54 static inline size_t RoundUp(size_t val, size_t align) in RoundUp() argument
56 if (val + align < val || val + align < align) { in RoundUp()
58 return val; in RoundUp()
61 return val; in RoundUp()
63 return ((val + align - 1) / align) * align; in RoundUp()
/commonlibrary/ets_utils/js_api_module/convertxml/test/
H A Dtest_convertxml.cpp32 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()
53 napi_value val = nullptr; in setPropertyForTrim() local
56 napi_get_boolean(env, true, &val); in setPropertyForTrim()
57 napi_set_named_property(env, obj, proVec[i].c_str(), val); in setPropertyForTrim()
63 napi_create_string_utf8(env, str, NAPI_AUTO_LENGTH, &val); in setPropertyForTrim()
64 napi_set_named_property(env, obj, proVec[i].c_str(), val); in setPropertyForTrim()
[all...]
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/
H A Dworker.rs68 let val = ctx.get();
69 if val.is_null() {
72 Some(unsafe { &*(val.cast::<WorkerHandle>()) })
81 let val = ctx.get();
82 if val.is_null() {
85 Some(unsafe { &*(val.cast::<WorkerContext>()) })
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/process/pty_process/
H A Dcommand.rs121 pub fn env<K: AsRef<OsStr>, V: AsRef<OsStr>>(&mut self, key: K, val: V) -> &mut PtyCommand { in env()
122 self.command.env(key, val); in env()
/commonlibrary/rust/ylong_json/src/
H A Dadapter.rs1367 let mut val = 0; in ut_ylong_json_create_bool() variables
1368 ylong_json_get_value_from_bool(bool, &mut val as *mut c_int); in ut_ylong_json_create_bool()
1369 assert_eq!(val, 1); in ut_ylong_json_create_bool()
1374 let mut val = 1; in ut_ylong_json_create_bool() variables
1375 ylong_json_get_value_from_bool(bool, &mut val as *mut c_int); in ut_ylong_json_create_bool()
1376 assert_eq!(val, 0); in ut_ylong_json_create_bool()
1426 let mut val = 0i32; in ut_ylong_json_get_value_from_bool() variables
1428 ylong_json_get_value_from_bool(bool, &mut val as *mut c_int), in ut_ylong_json_get_value_from_bool()
1433 let mut val = 0; in ut_ylong_json_get_value_from_bool() variables
1435 ylong_json_get_value_from_bool(bool, &mut val a in ut_ylong_json_get_value_from_bool()
1442 let mut val = 0; ut_ylong_json_get_value_from_bool() variables
1467 let mut val = 0; ut_ylong_json_set_value_to_bool() variables
[all...]
/commonlibrary/ets_utils/js_api_module/url/
H A Djs_url.cpp355 std::string val = ""; in DealIpv4() local
357 val = str.substr(left, pos - left); in DealIpv4()
358 if (sprintf_s(hexVal, sizeof(hexVal), "%02x", stoi(val)) == -1) { in DealIpv4()
360 return val; in DealIpv4()
366 val = str.substr(left); in DealIpv4()
367 if (sprintf_s(hexVal, sizeof(hexVal), "%02x", stoi(val)) == -1) { in DealIpv4()
369 return val; in DealIpv4()
553 int val = 0; in BinaryConversion() local
558 if (sscanf_s(num.c_str(), "%x", &val) == -1) { in BinaryConversion()
562 return std::to_string(val); in BinaryConversion()
636 int val = stoi(num); SplitNum() local
[all...]

Completed in 21 milliseconds

12