summaryrefslogtreecommitdiff
path: root/core/nds32/task.c
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2020-11-06 09:20:56 +0100
committerCommit Bot <commit-bot@chromium.org>2020-12-14 19:59:09 +0000
commitf96f176c303a73973d7cf5ddf1abf86f534a6e39 (patch)
treea793c58f008cfa94cc93ea34627fd1b6457e3a1b /core/nds32/task.c
parenta23ef3d074335f2b6953194671f966117fd1fe60 (diff)
downloadchrome-ec-f96f176c303a73973d7cf5ddf1abf86f534a6e39.tar.gz
task_set_event: remove the wait argument
There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'core/nds32/task.c')
-rw-r--r--core/nds32/task.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/nds32/task.c b/core/nds32/task.c
index f4446bdacb..9969db34bc 100644
--- a/core/nds32/task.c
+++ b/core/nds32/task.c
@@ -417,7 +417,7 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event, int wait)
+uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
ASSERT(receiver);
@@ -432,10 +432,7 @@ uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event, int wait)
if (start_called)
need_resched = 1;
} else {
- if (wait)
- return __wait_evt(-1, tskid);
- else
- __schedule(0, tskid, 0);
+ __schedule(0, tskid, 0);
}
return 0;
@@ -649,7 +646,7 @@ void __ram_code mutex_unlock(struct mutex *mtx)
waiters &= ~BIT(id);
/* Somebody is waiting on the mutex */
- task_set_event(id, TASK_EVENT_MUTEX, 0);
+ task_set_event(id, TASK_EVENT_MUTEX);
}
/* Ensure no event is remaining from mutex wake-up */