summaryrefslogtreecommitdiff
path: root/core/minute-ia/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/minute-ia/task.c')
-rw-r--r--core/minute-ia/task.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 7e7c836f7e..f0296596b1 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -287,7 +287,7 @@ void __keep task_start_irq_handler(void *data)
irq_dist[irq]++;
else
/* Track total number of service calls */
- atomic_add(&svc_calls, 1);
+ deprecated_atomic_add(&svc_calls, 1);
/* Only the outer ISR should keep track of the ISR start time */
if (__in_isr == 1) {
@@ -318,7 +318,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
ret = timer_arm(deadline, me);
ASSERT(ret == EC_SUCCESS);
}
- while (!(evt = atomic_read_clear(&tsk->events))) {
+ while (!(evt = deprecated_atomic_read_clear(&tsk->events))) {
/* Remove ourself and get the next task in the scheduler */
__schedule(1, resched);
resched = TASK_ID_IDLE;
@@ -326,7 +326,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
if (timeout_us > 0) {
timer_cancel(me);
/* Ensure timer event is clear, we no longer care about it */
- atomic_clear(&tsk->events, TASK_EVENT_TIMER);
+ deprecated_atomic_clear(&tsk->events, TASK_EVENT_TIMER);
}
return evt;
}
@@ -345,12 +345,12 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
ASSERT(receiver);
/* Set the event bit in the receiver message bitmap */
- atomic_or(&receiver->events, event);
+ deprecated_atomic_or(&receiver->events, event);
/* Re-schedule if priorities have changed */
if (in_interrupt_context()) {
/* The receiver might run again */
- atomic_or(&tasks_ready, 1 << tskid);
+ deprecated_atomic_or(&tasks_ready, 1 << tskid);
} else {
if (wait)
return __wait_evt(-1, tskid);
@@ -389,7 +389,8 @@ uint32_t task_wait_event_mask(uint32_t event_mask, int timeout_us)
/* Re-post any other events collected */
if (events & ~event_mask)
- atomic_or(&current_task->events, events & ~event_mask);
+ deprecated_atomic_or(&current_task->events,
+ events & ~event_mask);
return events & event_mask;
}
@@ -405,12 +406,12 @@ void task_enable_all_tasks(void)
void task_enable_task(task_id_t tskid)
{
- atomic_or(&tasks_enabled, BIT(tskid));
+ deprecated_atomic_or(&tasks_enabled, BIT(tskid));
}
void task_disable_task(task_id_t tskid)
{
- atomic_clear(&tasks_enabled, BIT(tskid));
+ deprecated_atomic_clear(&tasks_enabled, BIT(tskid));
if (!in_interrupt_context() && tskid == task_get_current())
__schedule(0, 0);
@@ -454,7 +455,7 @@ void mutex_lock(struct mutex *mtx)
uint32_t id = 1 << task_get_current();
ASSERT(id != TASK_ID_INVALID);
- atomic_or(&mtx->waiters, id);
+ deprecated_atomic_or(&mtx->waiters, id);
do {
old_val = 0;
@@ -470,7 +471,7 @@ void mutex_lock(struct mutex *mtx)
}
} while (old_val);
- atomic_clear(&mtx->waiters, id);
+ deprecated_atomic_clear(&mtx->waiters, id);
}
void mutex_unlock(struct mutex *mtx)
@@ -497,7 +498,7 @@ void mutex_unlock(struct mutex *mtx)
}
/* Ensure no event is remaining from mutex wake-up */
- atomic_clear(&tsk->events, TASK_EVENT_MUTEX);
+ deprecated_atomic_clear(&tsk->events, TASK_EVENT_MUTEX);
}
void task_print_list(void)