Home
last modified time | relevance | path

Searched refs:alarm (Results 1 – 25 of 43) sorted by relevance

12

/system/bt/osi/test/
Dalarm_test.cc75 alarm_t* alarm = alarm_new("alarm_test.test_new_free_simple"); in TEST_F() local
76 ASSERT_TRUE(alarm != NULL); in TEST_F()
77 alarm_free(alarm); in TEST_F()
83 alarm_t* alarm = alarm_new("alarm_test.test_simple_cancel"); in TEST_F() local
84 alarm_cancel(alarm); in TEST_F()
85 alarm_free(alarm); in TEST_F()
89 alarm_t* alarm = alarm_new("alarm_test.test_cancel"); in TEST_F() local
90 alarm_set(alarm, 10, cb, NULL); in TEST_F()
91 alarm_cancel(alarm); in TEST_F()
97 alarm_free(alarm); in TEST_F()
[all …]
Dalarm_mock.h11 MOCK_METHOD4(AlarmSetOnMloop, void(alarm_t* alarm, uint64_t interval_ms,
22 void AlarmFreeImpl(alarm_t* alarm) { in AlarmFreeImpl() argument
23 uint8_t* ptr = (uint8_t*)alarm; in AlarmFreeImpl()
25 return AlarmFree(alarm); in AlarmFreeImpl()
47 void alarm_free(alarm_t* alarm) { AlarmMock::Get()->AlarmFreeImpl(alarm); } in alarm_free() argument
49 void alarm_set_on_mloop(alarm_t* alarm, uint64_t interval_ms, in alarm_set_on_mloop() argument
51 AlarmMock::Get()->AlarmSetOnMloop(alarm, interval_ms, cb, data); in alarm_set_on_mloop()
/system/bt/osi/src/
Dalarm.cc136 static void alarm_set_internal(alarm_t* alarm, uint64_t period_ms,
139 static void alarm_cancel_internal(alarm_t* alarm);
140 static void remove_pending_alarm(alarm_t* alarm);
141 static void schedule_next_instance(alarm_t* alarm);
189 void alarm_free(alarm_t* alarm) { in alarm_free() argument
190 if (!alarm) return; in alarm_free()
192 alarm_cancel(alarm); in alarm_free()
194 osi_free((void*)alarm->stats.name); in alarm_free()
195 alarm->closure.~CancelableClosureInStruct(); in alarm_free()
196 alarm->callback_mutex.reset(); in alarm_free()
[all …]
/system/bt/osi/test/fuzzers/alarm/
Dfuzz_alarm.cc64 bool fuzz_set_alarm(alarm_t* alarm, uint64_t interval, alarm_callback_t cb, in fuzz_set_alarm() argument
80 if (alarm) { in fuzz_set_alarm()
83 alarm_set_on_mloop(alarm, interval, cb, data_buffer); in fuzz_set_alarm()
85 alarm_set(alarm, interval, cb, data_buffer); in fuzz_set_alarm()
99 alarm_t* alarm = nullptr; in LLVMFuzzerTestOneInput() local
103 alarm = fuzz_init_alarm(&dataProvider); in LLVMFuzzerTestOneInput()
108 if (alarm) { in LLVMFuzzerTestOneInput()
109 if (!fuzz_set_alarm(alarm, MAX_ALARM_DURATION, cb, &dataProvider)) { in LLVMFuzzerTestOneInput()
112 alarm_cancel(alarm); in LLVMFuzzerTestOneInput()
116 alarm_is_scheduled(alarm); in LLVMFuzzerTestOneInput()
[all …]
/system/bt/osi/include/
Dalarm.h53 void alarm_free(alarm_t* alarm);
73 void alarm_set(alarm_t* alarm, uint64_t interval_ms, alarm_callback_t cb,
79 void alarm_set_on_mloop(alarm_t* alarm, uint64_t interval_ms,
87 void alarm_cancel(alarm_t* alarm);
91 bool alarm_is_scheduled(const alarm_t* alarm);
96 uint64_t alarm_get_remaining_ms(const alarm_t* alarm);
/system/memory/libmemunreachable/tests/
DDisableMalloc_test.cpp31 void alarm(std::chrono::microseconds us) { in alarm() function in android::DisableMallocTest
43 alarm(100ms); in TEST_F()
63 alarm(100ms); in TEST_F()
83 alarm(100ms); in TEST_F()
99 alarm(250ms); in TEST_F()
113 alarm(100ms); in TEST_F()
124 alarm(100ms); in TEST_F()
/system/core/trusty/fuzz/
Dutils.cpp81 alarm(kTimeoutSeconds); in Connect()
83 alarm(0); in Connect()
97 alarm(kTimeoutSeconds); in Read()
99 alarm(0); in Read()
112 alarm(kTimeoutSeconds); in Write()
114 alarm(0); in Write()
/system/bt/gd/rust/common/src/
Dtime.rs93 let mut alarm = Alarm::new(); in alarm_simple_case() localVariable
94 alarm.reset(Duration::from_millis(10)); in alarm_simple_case()
95 alarm.expired().await; in alarm_simple_case()
108 let mut alarm = Alarm::new(); in alarm_clear_ready_after_expired() localVariable
109 alarm.reset(Duration::from_millis(10)); in alarm_clear_ready_after_expired()
110 alarm.expired().await; in alarm_clear_ready_after_expired()
115 _ = alarm.expired() => (), in alarm_clear_ready_after_expired()
/system/core/trusty/confirmationui/fuzz/
Dmsg_fuzzer.cpp158 alarm(kTimeoutSeconds); in LLVMFuzzerTestOneInput()
160 alarm(0); in LLVMFuzzerTestOneInput()
165 alarm(kTimeoutSeconds); in LLVMFuzzerTestOneInput()
167 alarm(0); in LLVMFuzzerTestOneInput()
/system/logging/liblog/tests/
Dlog_wrap_test.cpp73 alarm(5); in TEST()
80 alarm(0); in TEST()
Dliblog_benchmark.cpp660 alarm(alarm_time); in BM_log_latency()
671 alarm(alarm_time); in BM_log_latency()
705 alarm(0); in BM_log_latency()
734 alarm(alarm_time); in BM_log_delay()
744 alarm(alarm_time); in BM_log_delay()
775 alarm(0); in BM_log_delay()
Dliblog_test.cpp91 alarm(2); in RunLogTests()
92 auto alarm_guard = android::base::make_scope_guard([] { alarm(0); }); in RunLogTests()
582 alarm(alarm_time); in TEST()
592 alarm(alarm_time); in TEST()
625 alarm(0); in TEST()
740 alarm(alarm_time); in TEST()
748 alarm(alarm_time); in TEST()
781 alarm(0); in TEST()
1101 alarm(2); in TEST()
1102 auto alarm_guard = android::base::make_scope_guard([] { alarm(0); }); in TEST()
/system/logging/logd/
Dlogd_test.cpp523 unsigned int old_alarm = alarm(3); in timeout_negative()
528 alarm(old_alarm); in timeout_negative()
537 alarm_wrap = alarm(5); in timeout_negative()
554 alarm_timeout = alarm(old_alarm); in timeout_negative()
638 unsigned int old_alarm = alarm(3); in TEST()
643 alarm(old_alarm); in TEST()
652 alarm_wrap = alarm(5); in TEST()
669 alarm_timeout = alarm(old_alarm); in TEST()
749 unsigned int old_alarm = alarm(alarm_time); in TEST()
773 EXPECT_NE(0U, alarm(old_alarm)); in TEST()
/system/bt/bta/sys/
Dbta_sys_main.cc192 void bta_sys_start_timer(alarm_t* alarm, uint64_t interval_ms, uint16_t event, in bta_sys_start_timer() argument
199 alarm_set_on_mloop(alarm, interval_ms, bta_sys_sendmsg, p_buf); in bta_sys_start_timer()
Dbta_sys.h211 extern void bta_sys_start_timer(alarm_t* alarm, uint64_t interval_ms,
/system/bt/test/mock/
Dmock_bta_sys_main.cc61 void bta_sys_start_timer(alarm_t* alarm, uint64_t interval_ms, uint16_t event, in bta_sys_start_timer() argument
/system/bt/test/stub/
Dosi.cc381 bool alarm_is_scheduled(const alarm_t* alarm) { in alarm_is_scheduled() argument
385 uint64_t alarm_get_remaining_ms(const alarm_t* alarm) { in alarm_get_remaining_ms() argument
389 void alarm_cancel(alarm_t* alarm) { mock_function_count_map[__func__]++; } in alarm_cancel() argument
392 void alarm_free(alarm_t* alarm) { mock_function_count_map[__func__]++; } in alarm_free() argument
393 void alarm_set(alarm_t* alarm, uint64_t interval_ms, alarm_callback_t cb, in alarm_set() argument
399 void alarm_set_on_mloop(alarm_t* alarm, uint64_t interval_ms, in alarm_set_on_mloop() argument
/system/bt/gd/docs/architecture/
Dstyle_guide.md101 * alarm.h: common header for alarm
103 * alarm.cc: Linux generic implementation of alarm.h using timer_fd
104 * alarm_test.cc: unit test for alarm.h
/system/bt/gd/os/
DBUILD.gn29 "linux_generic/alarm.cc",
DAndroid.bp49 "linux_generic/alarm.cc",
/system/bt/stack/gatt/
Dconnection_manager.cc51 void alarm_set_closure(const base::Location& posted_from, alarm_t* alarm, in alarm_set_closure() argument
57 alarm_set_on_mloop(alarm, interval_ms, alarm_closure_cb, data); in alarm_set_closure()
/system/bt/osi/
DBUILD.gn19 "src/alarm.cc",
DAndroid.bp56 "src/alarm.cc",
/system/logging/logcat/tests/
Dlogcat_test.cpp668 alarm(2); in TEST()
688 alarm(0); in TEST()
736 alarm(2); in TEST()
758 alarm(0); in TEST()
1210 alarm(2); in TEST()
1289 alarm(0); in TEST()
/system/bt/stack/test/
Dble_advertiser_test.cc57 void alarm_set_on_mloop(alarm_t* alarm, uint64_t interval_ms, in alarm_set_on_mloop() argument
63 void alarm_cancel(alarm_t* alarm) {} in alarm_cancel() argument
66 void alarm_free(alarm_t* alarm) {} in alarm_free() argument

12