Home
last modified time | relevance | path

Searched refs:usize (Results 1 – 25 of 306) sorted by relevance

12345678910>>...13

/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h3/
H A Doctets.rs50 const len: usize = 1; in into_u8()
66 const len: usize = 2; in into_u16()
82 const len: usize = 4; in into_u32()
98 const len: usize = 8; in into_u64()
157 src_idx: &'a mut usize,
181 src_idx: &'a mut usize,
197 const len: usize = 1; in write_u8()
209 const len: usize = 2; in write_u16()
221 const len: usize = 4; in write_u32()
233 const len: usize = 8; in write_u64()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/
H A Dinteger.rs24 pub(crate) fn index(pre: u8, index: usize, mask: u8) -> Self { in index() argument
29 pub(crate) fn length(length: usize, is_huffman: bool) -> Self { in length() argument
48 index: usize,
59 Ordering::Less => Ok(index as usize), in first_byte()
61 index: index as usize, in first_byte()
73 .and_then(|res| res.checked_mul((byte & 0x7f) as usize)) in next_byte()
88 i: usize,
102 pub(crate) fn new(pre: u8, i: usize, mask: u8) -> Self { in new() argument
112 pub(crate) fn get_index(&self) -> usize { in get_index() argument
124 if self.i < self.mask as usize { in next_byte()
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/task/
H A Dstate.rs20 const RUNNING: usize = 0b0001;
22 const SCHEDULING: usize = 0b0100;
24 const FINISHED: usize = 0b1000;
26 const CANCELED: usize = 0b1_0000;
30 const JOIN_WAKER: usize = 0b100_0000;
34 const RC_SHIFT: usize = RC_MASK.count_zeros() as usize;
44 pub(crate) fn ref_count(state: usize) -> usize { in ref_count() argument
92 Canceled(usize),
93 Failed(usize),
214 pub(crate) fn turn_to_un_set_waker(&self) -> Result<usize, usize> { in turn_to_un_set_waker() argument
[all …]
/ohos5.0/build/rust/tests/test_bindgen_test/test_for_hpp/
H A Dmain.rs41 unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize } in bindgen_test_layout_C()
45 unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize } in bindgen_test_layout_C()
49 unsafe { ::std::ptr::addr_of!((*ptr).arr) as usize - ptr as usize } in bindgen_test_layout_C()
53 unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize } in bindgen_test_layout_C()
58 ::std::ptr::addr_of!((*ptr).other_ptr) as usize - ptr as usize in bindgen_test_layout_C()
78 unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize } in bindgen_test_layout_D()
/ohos5.0/commonlibrary/rust/ylong_json/src/reader/
H A Dmod.rs38 fn index(&self) -> usize; in index() argument
54 fn cached_len(&mut self) -> Option<usize>; in cached_len() argument
78 fn remainder_len(&self) -> usize; in remainder_len() argument
92 fn next_n(&mut self, n: usize) -> Result<Option<&[u8]>, Self::Error>; in next_n()
96 fn peek_n(&mut self, n: usize) -> Result<Option<&[u8]>, Self::Error>; in peek_n()
100 fn discard_n(&mut self, n: usize); in discard_n() argument
106 line: usize,
107 column: usize,
113 pub(crate) fn new(line: usize, column: usize) -> Self { in new() argument
119 pub(crate) fn line(&self) -> usize { in line() argument
[all …]
/ohos5.0/build/rust/tests/test_cxx/src/
H A Dlib.rs22 z: usize,
26 fn r_return_primitive() -> usize; in r_return_primitive()
29 fn r_return_sum(_: usize, _: usize) -> usize; in r_return_sum() argument
40 fn r_return_primitive() -> usize { in r_return_primitive()
48 fn r_return_sum(n1: usize, n2: usize) -> usize { in r_return_sum() argument
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/metrics/
H A Druntime.rs34 pub park: Vec<usize>,
36 pub active: Vec<usize>,
40 const ACTIVE_STATE: usize = 3;
56 pub fn workers_num(&self) -> usize { in workers_num() argument
79 pub fn park_workers_num(&self) -> Option<usize> { in park_workers_num() argument
104 pub fn active_workers_num(&self) -> Option<usize> { in active_workers_num() argument
129 pub fn park_workers_list(&self) -> Option<Vec<usize>> { in park_workers_list() argument
152 pub fn active_workers_list(&self) -> Option<Vec<usize>> { in active_workers_list() argument
213 pub fn global_queue_length(&self) -> usize { in global_queue_length() argument
259 pub fn worker_task_len(&self, index: usize) -> Option<usize> { in worker_task_len() argument
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/
H A Dsleeper.rs19 idle_list: Mutex<Vec<usize>>,
20 num_workers: usize,
25 pub fn new(num_workers: usize) -> Self { in new()
34 pub fn is_parked(&self, worker_index: &usize) -> bool { in is_parked()
39 pub fn pop_worker_by_id(&self, worker_index: &usize) { in pop_worker_by_id() argument
73 pub fn push_worker(&self, worker_index: usize) -> bool { in push_worker()
103 const ACTIVE_WORKER_SHIFT: usize = 16;
104 const SEARCHING_MASK: usize = (1 << ACTIVE_WORKER_SHIFT) - 1;
105 const ACTIVE_MASK: usize = !SEARCHING_MASK;
111 fn new(active_num: usize) -> Self { in new()
[all …]
/ohos5.0/base/sensors/sensor/rust/utils/socket_ipc_rust_ffi/src/
H A Dstream_buffer.rs33 const MAX_STREAM_BUF_SIZE: usize = 256;
63 r_count: usize,
64 w_count: usize,
65 r_pos: usize,
66 w_pos: usize,
123 let pos: usize = self.r_pos + n; in seek_read_pos()
133 fn unread_size(&self) -> usize { in unread_size() argument
340 fn r_count(&self) -> usize { in r_count() argument
343 fn w_count(&self) -> usize { in w_count() argument
346 fn w_pos(&self) -> usize { in w_pos() argument
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Dsingleton_runtime.rs18 const SPAWN_NUM: usize = 100;
19 const THREAD_NUM: usize = 10;
21 async fn test_future(num: usize) -> usize { in test_future() argument
25 async fn test_multi_future_in_async(i: usize, j: usize) -> (usize, usize) { in test_multi_future_in_async() argument
32 async fn test_async_in_async(i: usize, j: usize) -> (usize, usize) { in test_async_in_async() argument
H A Dspawn.rs14 async fn test_future(num: usize) -> usize { in test_future() argument
18 async fn test_multi_future_in_async(i: usize, j: usize) -> (usize, usize) { in test_multi_future_in_async() argument
25 async fn test_async_in_async(i: usize, j: usize) -> (usize, usize) { in test_async_in_async() argument
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h1/request/
H A Dencoder.rs162 type TokenResult<T> = Result<TokenStatus<usize, T>, HttpError>;
418 src_idx: usize,
438 src_idx: usize,
471 src_idx: usize,
494 name_idx: usize,
495 colon_idx: usize,
496 value_idx: usize,
614 src_idx: usize,
630 src_idx: usize,
647 src_idx: &'a mut usize,
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/util/
H A Dslots.rs22 const NULL: usize = usize::MAX;
27 prev: usize,
28 next: usize,
32 fn new(val: T, prev: usize, next: usize) -> Entry<T> { in new() argument
44 len: usize,
45 head: usize,
52 pub len: usize,
53 head: usize,
54 tail: usize,
55 next: usize,
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/io/
H A Dread_buf.rs32 filled: usize,
33 initialized: usize,
51 filled: usize, in create() argument
52 initialized: usize, in create() argument
73 pub fn capacity(&self) -> usize { in capacity() argument
79 pub fn filled_len(&self) -> usize { in filled_len() argument
85 pub fn initialized_len(&self) -> usize { in initialized_len() argument
138 pub fn remaining(&self) -> usize { in remaining() argument
185 pub fn set_filled(&mut self, n: usize) { in set_filled() argument
204 pub fn advance(&mut self, n: usize) { in advance() argument
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/fs/
H A Dfile_buf.rs21 idx: usize,
26 pub(crate) fn with_capacity(n: usize) -> FileBuf { in with_capacity()
33 pub(crate) fn remaining(&self) -> usize { in remaining() argument
37 pub(crate) fn append_to(&mut self, buf: &mut ReadBuf<'_>) -> usize { in append_to() argument
52 pub(crate) fn append(&mut self, other: &[u8], buf_size_limit: usize) -> usize { in append() argument
60 pub(crate) fn reserve(&mut self, size: usize, buf_size_limit: usize) { in reserve() argument
67 pub(crate) fn read<R: Read>(&mut self, io: &mut R) -> io::Result<usize> { in read() argument
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/format/
H A Ddecoder.rs162 (usize, EncoderInstruction),
170 (usize, Representation),
178 (usize, EncoderInstPrefixBit, MidBit, usize),
184 (usize, ReprPrefixBit, MidBit, usize),
191 (usize, Vec<u8>),
434 ) -> DecResult<(usize, $prefix_type, MidBit, usize), $inner_type> {
497 ) -> DecResult<(usize, $prefix_type, MidBit, usize), $inner_type> {
574 length: usize,
688 read: usize,
689 length: usize,
[all …]
H A Dencoder.rs33 draining_index: usize,
35 insert_length: &'a mut usize,
50 draining_index: usize, in new() argument
52 insert_length: &'a mut usize, in new() argument
84 required_insert_count: &mut usize, in encode() argument
85 ) -> (usize, usize) { in encode() argument
373 fn new(index: usize) -> Self { in new()
425 fn new(index: usize) -> Self { in new()
480 index: usize, in new() argument
778 (DecoderInstPrefixBit, usize),
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
H A Dwheel.rs26 const SLOTS_NUM: usize = 64;
29 const LEVELS_NUM: usize = 6;
40 level: usize,
81 pub(crate) fn level(&self) -> usize { in level() argument
142 level: usize,
143 slot: usize,
307 level: usize,
318 pub(crate) fn new(level: usize) -> Self { in new()
387 fn calculate_deadline(slot: usize, level: usize, now: u64) -> u64 { in calculate_deadline() argument
413 Some(slot as usize) in next_occupied_slot()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
H A Dbase64.rs20 output.push(BASE64_TABLE[((chunk[0] >> 2) & 0x3f) as usize]); in encode()
22 output.push(BASE64_TABLE[(((chunk[0] & 0x3) << 4) | ((chunk[1] >> 4) & 0xf)) as usize]); in encode()
23 output.push(BASE64_TABLE[(((chunk[1] & 0xf) << 2) | ((chunk[2] >> 6) & 0x3)) as usize]); in encode()
24 output.push(BASE64_TABLE[(chunk[2] & 0x3f) as usize]); in encode()
26 output.push(BASE64_TABLE[(((chunk[0] & 0x3) << 4) | ((chunk[1] >> 4) & 0xf)) as usize]); in encode()
27 output.push(BASE64_TABLE[((chunk[1] & 0xf) << 2) as usize]); in encode()
30 output.push(BASE64_TABLE[((chunk[0] & 0x3) << 4) as usize]); in encode()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/
H A Dinteger.rs47 index: usize,
55 pub(crate) fn first_byte(byte: u8, mask: u8) -> Result<usize, Self> { in first_byte() argument
58 Ordering::Less => Ok(index as usize), in first_byte()
60 index: index as usize, in first_byte()
69 pub(crate) fn next_byte(&mut self, byte: u8) -> Result<Option<usize>, H2Error> { in next_byte() argument
72 .and_then(|res| res.checked_mul((byte & 0x7f) as usize)) in next_byte()
98 i: usize,
113 pub(crate) fn new(i: usize, mask: u8, pre: u8) -> Self { in new() argument
127 if self.i < self.mask as usize { in next_byte()
131 self.i -= self.mask as usize; in next_byte()
/ohos5.0/foundation/communication/ipc/interfaces/innerkits/rust/src/parcel/
H A Dmsg.rs33 const STRING_16_SIZE: usize = 12;
373 pub fn size(&self) -> usize { in size() argument
388 pub fn writable(&self) -> usize { in writable() argument
402 pub fn readable(&self) -> usize { in readable() argument
413 pub fn offset(&self) -> usize { in offset() argument
428 pub fn capacity(&self) -> usize { in capacity() argument
441 pub fn max_capacity(&self) -> usize { in max_capacity() argument
473 pub fn read_position(&mut self) -> usize { in read_position() argument
603 pub fn skip_read(&mut self, size: usize) { in skip_read() argument
697 fn get_pad_size(size: usize) -> usize { in get_pad_size() argument
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/iter/
H A Dcore.rs43 const MIN_SPLIT_LEN: usize = 1; in core()
57 const MIN_SPLIT_LEN: usize = 1; in core()
58 let split_time = get_cpu_num() as usize; in core()
77 min_split_len: usize, in recur() argument
78 mut split_time: usize, in recur() argument
129 min_split_len: usize, in spawn_task() argument
130 split_time: usize, in spawn_task() argument
154 min_split_len: usize, in recur_ffrt() argument
155 mut split_time: usize, in recur_ffrt() argument
191 min_split_len: usize, in spawn_task_ffrt() argument
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/
H A Dsemaphore_inner.rs26 const MAX_PERMITS: usize = usize::MAX >> 1;
28 const PERMIT_SHIFT: usize = 1;
30 const CLOSED: usize = 1;
39 waker_index: Option<usize>,
67 pub(crate) fn new(permits: usize) -> Result<SemaphoreInner, SemaphoreError> { in new()
77 pub(crate) fn current_permits(&self) -> usize { in current_permits() argument
101 pub(crate) fn release_multi(&self, mut permits: usize) { in release_multi() argument
160 curr: &mut usize, in update_permit() argument
161 permit_num: usize, in update_permit() argument
182 waker_index: &mut Option<usize>, in poll_acquire() argument
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime_macros/src/
H A Dselect.rs26 len: usize,
29 except_index: usize,
44 fn parse_ident(ident: &Ident, idx: &mut usize, flags: &mut Flags) -> bool { in parse_ident() argument
69 idx: &mut usize, in parse_group() argument
90 fn parse_token(buf: &[TokenTree], idx: &mut usize, flags: &mut Flags, builder: &mut ParserBuilder) { in parse_token() argument
131 fn group_num(inner: TokenStream) -> usize { in group_num() argument
141 pub(crate) len: usize,
147 pub(crate) except_index: usize,
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/task_helpers/
H A Dmod.rs29 pub const TASK_NUM: usize = 10;
32 const BUFFER_SIZE: usize = 4096;
38 pub const KB: usize = 1024;
42 pub const YIELD_NUM: usize = 1_000;
52 pub fn ylong_runtime_set_threads(threads_count: usize) -> Runtime { in ylong_runtime_set_threads()
72 pub fn tokio_runtime_set_threads(threads_count: usize) -> tokio::runtime::Runtime { in tokio_runtime_set_threads()
91 pub fn fibbo(upper: usize) -> u64 { in fibbo()
130 pub fn get_writer_buffer(size: usize) -> Vec<u8> { in get_writer_buffer()
138 pub fn get_file_dir(size: usize) -> PathBuf { in get_file_dir()

12345678910>>...13