summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/zinger/runtime.c4
-rw-r--r--common/usb_charger.c4
-rw-r--r--core/cortex-m/task.c4
-rw-r--r--core/cortex-m0/task.c4
-rw-r--r--core/host/task.c3
-rw-r--r--core/minute-ia/task.c4
-rw-r--r--core/nds32/task.c4
-rw-r--r--core/riscv-rv32i/task.c4
-rw-r--r--extra/lightbar/main.c3
-rw-r--r--extra/lightbar/simulation.h2
-rw-r--r--include/task.h3
-rw-r--r--include/usb_charge.h2
-rw-r--r--zephyr/shim/src/tasks.c4
13 files changed, 14 insertions, 31 deletions
diff --git a/board/zinger/runtime.c b/board/zinger/runtime.c
index 7665e3b55c..900c7b8c2f 100644
--- a/board/zinger/runtime.c
+++ b/board/zinger/runtime.c
@@ -68,11 +68,9 @@ void interrupt_enable(void)
asm("cpsie i");
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event)
+void task_set_event(task_id_t tskid, uint32_t event)
{
last_event = event;
-
- return 0;
}
static void tim2_interrupt(void)
diff --git a/common/usb_charger.c b/common/usb_charger.c
index 7b13c92d28..5387dba594 100644
--- a/common/usb_charger.c
+++ b/common/usb_charger.c
@@ -116,9 +116,9 @@ void usb_charger_reset_charge(int port)
}
-uint32_t usb_charger_task_set_event(int port, uint32_t event)
+void usb_charger_task_set_event(int port, uint32_t event)
{
- return task_set_event(USB_CHG_PORT_TO_TASK_ID(port), event);
+ task_set_event(USB_CHG_PORT_TO_TASK_ID(port), event);
}
static void usb_charger_init(void)
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 417a54f557..2ec1ec1dc2 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -449,7 +449,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event)
+void task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
ASSERT(receiver);
@@ -468,8 +468,6 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event)
} else {
__schedule(0, tskid);
}
-
- return 0;
}
uint32_t task_wait_event(int timeout_us)
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c
index e8aec0926e..52a6921ae6 100644
--- a/core/cortex-m0/task.c
+++ b/core/cortex-m0/task.c
@@ -376,7 +376,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event)
+void task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
ASSERT(receiver);
@@ -406,8 +406,6 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event)
asm volatile("isb");
__schedule(0, tskid);
}
-
- return 0;
}
uint32_t task_wait_event(int timeout_us)
diff --git a/core/host/task.c b/core/host/task.c
index 81d1b61479..f8f8dfb661 100644
--- a/core/host/task.c
+++ b/core/host/task.c
@@ -207,10 +207,9 @@ pthread_t task_get_thread(task_id_t tskid)
return tasks[tskid].thread;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event)
+void task_set_event(task_id_t tskid, uint32_t event)
{
atomic_or(&tasks[tskid].event, event);
- return 0;
}
atomic_t *task_get_event_bitmap(task_id_t tskid)
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 3526b93dd0..4eb33e295a 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -343,7 +343,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event)
+void task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
@@ -366,8 +366,6 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event)
} else {
__schedule(0, tskid);
}
-
- return 0;
}
uint32_t task_wait_event(int timeout_us)
diff --git a/core/nds32/task.c b/core/nds32/task.c
index aa88193d91..5fc86d6050 100644
--- a/core/nds32/task.c
+++ b/core/nds32/task.c
@@ -427,7 +427,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)
+void __ram_code task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
ASSERT(receiver);
@@ -444,8 +444,6 @@ uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event)
} else {
__schedule(0, tskid, 0);
}
-
- return 0;
}
uint32_t __ram_code task_wait_event(int timeout_us)
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c
index 204e58432d..edc31a872e 100644
--- a/core/riscv-rv32i/task.c
+++ b/core/riscv-rv32i/task.c
@@ -408,7 +408,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)
+void __ram_code task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
@@ -426,8 +426,6 @@ uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event)
} else {
__schedule(0, tskid, 0);
}
-
- return 0;
}
uint32_t __ram_code task_wait_event(int timeout_us)
diff --git a/extra/lightbar/main.c b/extra/lightbar/main.c
index 5acf3d427a..ef011d35f1 100644
--- a/extra/lightbar/main.c
+++ b/extra/lightbar/main.c
@@ -95,14 +95,13 @@ uint32_t task_wait_event(int timeout_us)
return event;
}
-uint32_t task_set_event(task_id_t tskid, /* always LIGHTBAR */
+void task_set_event(task_id_t tskid, /* always LIGHTBAR */
uint32_t event)
{
pthread_mutex_lock(&task_mutex);
task_event = event;
pthread_cond_signal(&task_cond);
pthread_mutex_unlock(&task_mutex);
- return 0;
}
diff --git a/extra/lightbar/simulation.h b/extra/lightbar/simulation.h
index 4df7b69411..edbe5f340e 100644
--- a/extra/lightbar/simulation.h
+++ b/extra/lightbar/simulation.h
@@ -97,7 +97,7 @@ struct host_cmd_handler_args {
/* EC functions that we have to provide */
uint32_t task_wait_event(int timeout_us);
-uint32_t task_set_event(task_id_t tskid, uint32_t event);
+void task_set_event(task_id_t tskid, uint32_t event);
timestamp_t get_time(void);
int system_add_jump_tag(uint16_t tag, int version, int size, const void *data);
uint8_t *system_get_jump_tag(uint16_t tag, int *version, int *size);
diff --git a/include/task.h b/include/task.h
index 4e0ff04697..0343644437 100644
--- a/include/task.h
+++ b/include/task.h
@@ -149,9 +149,8 @@ void set_int_mask(uint32_t val);
*
* @param tskid Task to set event for
* @param event Event bitmap to set (TASK_EVENT_*)
- * @return The bitmap of events which occurred if wait!=0, else 0.
*/
-uint32_t task_set_event(task_id_t tskid, uint32_t event);
+void task_set_event(task_id_t tskid, uint32_t event);
/**
* Wake a task. This sends it the TASK_EVENT_WAKE event.
diff --git a/include/usb_charge.h b/include/usb_charge.h
index a5284512fd..ec7a655256 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -174,7 +174,7 @@ static inline int usb_charger_ramp_max(int port, int supplier, int sup_curr)
* @param port port number
* @param event event bits (USB_CHG_EVENT_*)
*/
-uint32_t usb_charger_task_set_event(int port, uint32_t event);
+void usb_charger_task_set_event(int port, uint32_t event);
/**
* Reset available BC 1.2 chargers on all ports
diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c
index 196820ac3e..248d5e9607 100644
--- a/zephyr/shim/src/tasks.c
+++ b/zephyr/shim/src/tasks.c
@@ -140,7 +140,7 @@ atomic_t *task_get_event_bitmap(task_id_t cros_task_id)
return &data->event_mask;
}
-uint32_t task_set_event(task_id_t cros_task_id, uint32_t event)
+void task_set_event(task_id_t cros_task_id, uint32_t event)
{
struct task_ctx_base_data *data;
@@ -148,8 +148,6 @@ uint32_t task_set_event(task_id_t cros_task_id, uint32_t event)
atomic_or(&data->event_mask, event);
k_poll_signal_raise(&data->new_event, 0);
-
- return 0;
}
uint32_t task_wait_event(int timeout_us)