9 #pragma GCC optimize ("O2") 20 uint64_t Semaphore::sem_time=0;
47 uint32_t dt = timeout_ms*1000;
65 asm volatile(
"svc 1 \r\n" 70 asm volatile(
"svc 2 \r\n" 76 asm volatile(
"svc 3 \r\n" 82 void Semaphore::save_log(
enum Sem_OP op,
bool result){
83 Sem_Log *lp = sem_log[sem_log_ptr++];
84 if(sem_log_ptr >= SEM_LOG_SIZE) sem_log_ptr=0;
102 save_log(Sem_Give,
true);
107 save_log(Sem_Give,
false);
118 save_log(Sem_Take_Nonblocking,
true);
125 save_log(Sem_Take_Nonblocking,
true);
131 save_log(Sem_Take_Nonblocking,
false);
142 save_log(Sem_Take,
true);
148 save_log(Sem_Take,
true);
154 save_log(Sem_Take,
false);
bool svc_take_nonblocking()
static void context_switch_isr()
bool _take_from_mainloop(uint32_t timeout_ms)
#define HAL_SEMAPHORE_BLOCK_FOREVER
static bool in_interrupt()
bool svc_take(uint32_t timeout_ms)
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
static uint32_t _micros()
static void * get_current_task_isr()
bool take(uint32_t timeout_ms)