/ohos5.0/base/msdp/device_status/rust/modules/scheduler/test/src/ |
H A D | lib.rs | 21 use std::sync::{ Arc, Condvar, Mutex }; 162 let handler: Arc<Handler> = Arc::default(); in test_add_epoll_handler() 163 let epoll = Arc::new(EpollHandler::new()); in test_add_epoll_handler() 183 let handler: Arc<Handler> = Arc::default(); in test_post_sync_task() 196 let handler: Arc<Handler> = Arc::default(); in test_post_async_task() 210 let handler: Arc<Handler> = Arc::default(); in test_post_perioric_task() 211 let epoll = Arc::new(EpollHandler::new()); in test_post_perioric_task() 229 let handler: Arc<Handler> = Arc::default(); in test_post_delayed_task() 230 let epoll = Arc::new(EpollHandler::new()); in test_post_delayed_task() 248 let handler: Arc<Handler> = Arc::default(); in test_post_blocking_task()
|
/ohos5.0/base/msdp/device_status/rust/modules/scheduler/sys/src/ |
H A D | scheduler.rs | 27 use std::sync::{ Arc, Mutex }; 68 raw: Arc<dyn IEpollHandler>, 121 epoll: Arc<Epoll>, 122 is_running: Arc<AtomicBool>, 126 fn new(epoll: Arc<Epoll>, is_running: Arc<AtomicBool>) -> Self in new() 370 epoll: Arc<Epoll>, 479 epoll: Arc<Epoll>, 480 epoll_waker: Arc<EpollWaker>, 481 is_running: Arc<AtomicBool>, 489 let epoll: Arc<Epoll> = Arc::default(); in new() [all …]
|
H A D | lib.rs | 44 use std::sync::Arc; 61 scheduler: Arc<Scheduler>, 69 let scheduler = Arc::new(Scheduler::new()); in new() 209 pub fn add_epoll_handler(&self, handler: Arc<dyn IEpollHandler>) in add_epoll_handler() 210 -> FusionResult<Arc<dyn IEpollHandler>> in add_epoll_handler() 217 pub fn remove_epoll_handler(&self, handler: Arc<dyn IEpollHandler>) in remove_epoll_handler() 218 -> FusionResult<Arc<dyn IEpollHandler>> in remove_epoll_handler()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/ |
H A D | current_thread.rs | 22 use std::sync::{Arc, Condvar, Mutex}; 42 pub(crate) driver: Arc<Mutex<Driver>>, 43 pub(crate) handle: Arc<Handle>, 83 driver: Arc<Mutex<Driver>>, 84 handle: Arc<Handle>, 88 fn new(driver: Arc<Mutex<Driver>>, handle: Arc<Handle>) -> Parker { in new() 203 fn waker(parker: Arc<Parker>) -> Waker { in waker() 322 use std::sync::Arc; 427 let notify1 = Arc::new(Parker::new()); in ut_current_thread_run_queue() 435 let notify2 = Arc::new(Parker::new()); in ut_current_thread_run_queue() [all …]
|
H A D | block_on.rs | 17 use std::sync::{Arc, Condvar, Mutex}; 24 let thread = unsafe { Arc::from_raw(ptr.cast::<Parker>()) }; in clone() 29 let data = Arc::into_raw(thread).cast::<()>(); in clone() 34 let thread = unsafe { Arc::from_raw(ptr.cast::<Parker>()) }; in wake() 39 let thread = unsafe { Arc::from_raw(ptr.cast::<Parker>()) }; in wake_by_ref() 45 unsafe { mem::drop(Arc::from_raw(ptr.cast::<Parker>())) }; in drop() 49 inner: Arc<Parker>, 54 inner: Arc::new(Parker { in new() 66 let data = Arc::into_raw(self.inner.clone()).cast::<()>(); in waker()
|
H A D | queue.rs | 20 use std::sync::{Arc, Mutex}; 556 use std::sync::Arc; 657 let exe_scheduler = Arc::downgrade(&Arc::new(MultiThreadScheduler::new(1, arc_handle))); in ut_inner_buffer_is_empty() 693 Arc::downgrade(&Arc::new(MultiThreadScheduler::new(1, arc_handle.clone()))); in ut_inner_buffer_len() 707 Arc::downgrade(&Arc::new(MultiThreadScheduler::new(1, arc_handle.clone()))); in ut_inner_buffer_len() 745 Arc::downgrade(&Arc::new(MultiThreadScheduler::new(2, arc_handle.clone()))); in ut_inner_buffer_push_back() 757 Arc::downgrade(&Arc::new(MultiThreadScheduler::new(2, arc_handle.clone()))); in ut_inner_buffer_push_back() 778 Arc::downgrade(&Arc::new(MultiThreadScheduler::new(2, arc_handle.clone()))); in ut_inner_buffer_push_back() 790 Arc::downgrade(&Arc::new(MultiThreadScheduler::new(2, arc_handle.clone()))); in ut_inner_buffer_push_back() 837 Arc::downgrade(&Arc::new(MultiThreadScheduler::new(2, arc_handle.clone()))); in ut_inner_buffer_pop_front() [all …]
|
H A D | parker.rs | 16 use std::sync::{Arc, Condvar, Mutex}; 24 inner: Arc<Inner>, 31 driver: Arc<Mutex<Driver>>, 40 pub(crate) fn new(driver: Arc<Mutex<Driver>>) -> Parker { in new() 42 inner: Arc::new(Inner { in new() 55 pub(crate) fn unpark(&self, handle: Arc<Handle>) { in unpark() 59 pub(crate) fn get_driver(&self) -> &Arc<Mutex<Driver>> { in get_driver() 165 fn unpark(&self, handle: Arc<Handle>) { in unpark() 177 pub(crate) fn get_driver(&self) -> &Arc<Mutex<Driver>> { in get_driver()
|
H A D | async_pool.rs | 18 use std::sync::{Arc, Condvar, Mutex, RwLock}; 53 pub(crate) handle: Arc<Handle>, 356 pub(crate) inner: Arc<Inner>, 385 workers: Mutex<Vec<Arc<Worker>>>, 392 fn async_thread_proc(inner: Arc<Inner>, worker: Arc<Worker>, handle: Arc<Handle>) { in async_thread_proc() 418 inner: Arc::new(Inner { in new() 441 workers.push(Arc::new(Worker { in create_async_thread_pool() 614 use std::sync::{Arc, Mutex}; 715 let exe_scheduler = Arc::downgrade(&Arc::new(MultiThreadScheduler::new(1, arc_handle))); in ut_executor_mng_info_enqueue() 883 let exe_scheduler = Arc::downgrade(&Arc::new(MultiThreadScheduler::new(1, arc_handle))); in ut_executor_mng_info_wake_up_if_one_task_left() [all …]
|
H A D | driver.rs | 14 use std::sync::{Arc, Mutex}; 45 time: Arc<TimeDriver>, 49 pub(crate) fn initialize() -> (Arc<Handle>, Arc<Mutex<Driver>>) { in initialize() 70 (Arc::new(handle), Arc::new(Mutex::new(driver))) in initialize()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/ |
H A D | selector.rs | 23 use std::sync::{Arc, Mutex}; 47 inner: Arc<SelectorInner>, 53 inner: Arc::new(inner), in new() 70 pub(crate) fn clone_cp(&self) -> Arc<CompletionPort> { in clone_cp() 78 completion_port: Arc<CompletionPort>, 80 update_queue: Mutex<VecDeque<Pin<Arc<Mutex<SockState>>>>>, 91 let arc_cp = Arc::new(cp); in new() 92 let cp_afd = Arc::clone(&arc_cp); in new() 206 this: &Arc<Self>, in register() 235 state: Pin<Arc<Mutex<SockState>>>, in reregister() [all …]
|
H A D | afd.rs | 20 use std::sync::{Arc, Mutex}; 191 cp: Arc<CompletionPort>, 192 afd_group: Mutex<Vec<Arc<Afd>>>, 200 pub(crate) fn new(cp: Arc<CompletionPort>) -> AfdGroup { in new() 208 pub(crate) fn acquire(&self) -> io::Result<Arc<Afd>> { in acquire() 214 || Arc::strong_count(afd_group.last().unwrap()) > POLL_GROUP__MAX_GROUP_SIZE in acquire() 216 let arc = Arc::new(Afd::new(&self.cp)?); in acquire() 232 afd_group.retain(|g| Arc::strong_count(g) > 1); in release_unused_afd()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/ |
H A D | mod.rs | 33 use std::sync::Arc; 50 let channel = Arc::new(Channel::new(chan)); in channel() 55 inner: Arc<Channel<C>>, 68 fn new(channel: Arc<Channel<C>>) -> Tx<C> { in new() 73 Arc::ptr_eq(&self.inner, &other.inner) in is_same() 92 inner: Arc<Channel<C>>, 96 fn new(channel: Arc<Channel<C>>) -> Rx<C> { in new()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/task/ |
H A D | join_set.rs | 21 use std::sync::{Arc, Mutex}; 52 list: Arc<Mutex<JoinList<R>>>, 62 wait_list: HashSet<Arc<JoinEntry<R>>>, 64 done_list: LinkedList<Arc<JoinEntry<R>>>, 85 list: Arc<Mutex<JoinList<R>>>, 120 fn wake_by_ref(entry: &Arc<JoinEntry<R>>) { in wake_by_ref() 174 let entry = Arc::new(JoinEntry { in spawn_inner() 458 let data = Arc::into_raw(cpy).cast::<()>(); in entry_into_waker() 464 let entry = Arc::from_raw(data.cast::<JoinEntry<R>>()); in clone_entry() 467 let data = Arc::into_raw(entry).cast::<()>(); in clone_entry() [all …]
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/ |
H A D | sync.rs | 20 use std::sync::{Arc, Mutex}; 179 let mutex1 = Arc::new(YlongMutex::new(0)); in sdv_concurrency_with_mutex4() 240 let mutex = Arc::new(Mutex::new(0)); in sdv_rwlock_multi_threads() 279 let rwlock = Arc::new(RwLock::new(5)); in sdv_rwlock_with_read1() 310 let rwlock = Arc::new(RwLock::new(5)); in sdv_rwlock_with_read2() 335 let rwlock = Arc::new(RwLock::new(5)); in sdv_rwlock_read_and_write() 376 let rwlock = Arc::new(RwLock::new(5)); in sdv_rwlock_with_write1() 412 let rwlock = Arc::new(RwLock::new(5)); in sdv_rwlock_with_write2() 439 let waiter = Arc::new(Waiter::new()); in sdv_waiter_with_wake_one() 469 let waiter = Arc::new(Waiter::new()); in sdv_waiter_with_wake_all() [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/triangle/ |
H A D | render_triangle.h | 59 const Arc& GetOutArc1() in GetOutArc1() 64 const Arc& GetOutArc2() in GetOutArc2() 69 const Arc& GetOutArc3() in GetOutArc3() 89 Arc outArc1_; 91 Arc outArc2_; 93 Arc outArc3_;
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/ |
H A D | pool.rs | 15 use std::sync::{Arc, Mutex}; 33 connector: Arc<C>, 41 connector: Arc::new(connector), in new() 60 list: Arc<Mutex<Vec<ConnDispatcher<S>>>>, 62 h2_conn: Arc<crate::runtime::AsyncMutex<Vec<ConnDispatcher<S>>>>, 68 list: Arc::new(Mutex::new(Vec::new())), in new() 71 h2_conn: Arc::new(crate::runtime::AsyncMutex::new(Vec::with_capacity(1))), in new() 91 connector: Arc<C>, in conn() 114 async fn conn_h1<C>(&self, connector: Arc<C>, url: &Uri) -> Result<Conn<S>, HttpClientError> in conn_h1() 128 connector: Arc<C>, in conn_h2() [all …]
|
/ohos5.0/base/request/request/services/src/task/ |
H A D | upload.rs | 18 use std::sync::Arc; 141 task: Arc<RequestTask>, in build_stream_request() 143 abort_flag: Arc<AtomicBool>, in build_stream_request() 176 task: Arc<RequestTask>, in build_multipart_request() 178 abort_flag: Arc<AtomicBool>, in build_multipart_request() 220 task: &Arc<RequestTask>, in build_request_common() 275 pub(crate) async fn upload(task: Arc<RequestTask>, abort_flag: Arc<AtomicBool>) { in upload() 304 task: Arc<RequestTask>, in upload_inner() 356 task: Arc<RequestTask>, in upload_one_file() 362 F: Fn(Arc<RequestTask>, usize, Arc<AtomicBool>) -> Option<Request>, in upload_one_file() [all …]
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/ |
H A D | ylong_tokio_rwlock.rs | 31 use std::sync::Arc; 52 let lock = Arc::new(RwLock::new(())); in tokio_rwlock_read() 77 let lock = Arc::new(YlongRwlock::new(())); in ylong_rwlock_read() 101 let lock = Arc::new(RwLock::new(())); in tokio_rwlock_write() 126 let lock = Arc::new(YlongRwlock::new(())); in ylong_rwlock_write() 151 let lock = Arc::new(RwLock::new(())); in tokio_rwlock_write_read() 183 let lock = Arc::new(YlongRwlock::new(())); in ylong_rwlock_write_read()
|
/ohos5.0/base/security/asset/services/core_service/src/ |
H A D | unload_handler.rs | 19 use std::sync::{Arc, Mutex}; 36 pub(crate) fn get_instance() -> Arc<Mutex<UnloadHandler>> { in get_instance() 37 static mut INSTANCE: Option<Arc<Mutex<UnloadHandler>>> = None; in get_instance() 38 … unsafe { INSTANCE.get_or_insert_with(|| Arc::new(Mutex::new(UnloadHandler::new()))).clone() } in get_instance()
|
/ohos5.0/base/security/asset/services/common/src/ |
H A D | counter.rs | 19 use std::sync::{Arc, Mutex}; 32 pub fn get_instance() -> Arc<Mutex<Counter>> { in get_instance() 33 static mut INSTANCE: Option<Arc<Mutex<Counter>>> = None; in get_instance() 34 unsafe { INSTANCE.get_or_insert_with(|| Arc::new(Mutex::new(Counter::new()))).clone() } in get_instance()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/process/pty_process/ |
H A D | pty.rs | 19 use std::sync::Arc; 121 let arc = Arc::new(self); in into_split() 122 let read = SplitReadPty(Arc::clone(&arc)); in into_split() 123 let write = SplitWritePty(Arc::clone(&arc)); in into_split() 145 if Arc::ptr_eq(&read_pty, &write_pty) { in unsplit() 148 Ok(Arc::try_unwrap(read_pty) in unsplit() 285 pub struct SplitReadPty(Arc<Pty>); 299 pub struct SplitWritePty(Arc<Pty>);
|
/ohos5.0/base/request/request/services/src/manage/scheduler/queue/ |
H A D | mod.rs | 18 use std::sync::Arc; 43 download_queue: HashMap<(u64, u32), Arc<RequestTask>>, 44 upload_queue: HashMap<(u64, u32), Arc<RequestTask>>, 72 pub(crate) fn get_task(&self, uid: u64, task_id: u32) -> Option<&Arc<RequestTask>> { in get_task() 90 let abort_flag = Arc::new(AtomicBool::new(false)); in try_restart() 107 pub(crate) fn tasks(&self) -> impl Iterator<Item = &Arc<RequestTask>> { in tasks() 218 let abort_flag = Arc::new(AtomicBool::new(false)); in reschedule_inner() 249 abort_flag: Arc<AtomicBool>, 254 fn new(abort_flag: Arc<AtomicBool>, join_handle: JoinHandle<()>) -> Self { in new()
|
H A D | running_task.rs | 16 use std::sync::Arc; 29 task: Arc<RequestTask>, 36 pub(crate) fn new(task: Arc<RequestTask>, tx: TaskManagerTx, keeper: SAKeeper) -> Self { in new() 44 pub(crate) async fn run(self, abort_flag: Arc<AtomicBool>) { in run() 58 type Target = Arc<RequestTask>;
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_signal/src/ |
H A D | common.rs | 15 use std::sync::Arc; 57 pub(crate) new_act: Option<Arc<SigHandler>>, 66 pub(crate) fn new(sig_num: c_int, new_act: Arc<SigHandler>) -> io::Result<Signal> { in new() 84 let act = Arc::new(handler); in register_action() 135 use std::sync::Arc; 151 let handler = Arc::new(handler); in ut_signal_new() 174 let value = Arc::new(AtomicUsize::new(0)); in ut_signal_register() 177 let value2 = Arc::new(AtomicUsize::new(10)); in ut_signal_register()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/ |
H A D | pool.rs | 17 use std::sync::{Arc, Mutex}; 28 connector: Arc<C>, 35 connector: Arc::new(connector), in new() 52 list: Arc<Mutex<Vec<ConnDispatcher<S>>>>, 58 list: Arc::new(Mutex::new(Vec::new())), in new()
|