diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2020-11-06 09:20:56 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-14 19:59:09 +0000 |
commit | f96f176c303a73973d7cf5ddf1abf86f534a6e39 (patch) | |
tree | a793c58f008cfa94cc93ea34627fd1b6457e3a1b /fuzz | |
parent | a23ef3d074335f2b6953194671f966117fd1fe60 (diff) | |
download | chrome-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 'fuzz')
-rw-r--r-- | fuzz/host_command_fuzz.c | 4 | ||||
-rw-r--r-- | fuzz/usb_pd_fuzz.c | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/fuzz/host_command_fuzz.c b/fuzz/host_command_fuzz.c index c4f49c9525..4ca94ff616 100644 --- a/fuzz/host_command_fuzz.c +++ b/fuzz/host_command_fuzz.c @@ -34,7 +34,7 @@ static struct ec_host_request *req = (struct ec_host_request *)req_buf; static void hostcmd_respond(struct host_packet *pkt) { - task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_HOSTCMD_DONE, 0); + task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_HOSTCMD_DONE); } static char calculate_checksum(const char *buf, int size) @@ -151,7 +151,7 @@ int test_fuzz_one_input(const uint8_t *data, unsigned int size) if (hostcmd_fill(data, size) < 0) return 0; - task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ, 0); + task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ); pthread_cond_wait(&done_cond, &lock); #ifdef VALID_REQUEST_ONLY diff --git a/fuzz/usb_pd_fuzz.c b/fuzz/usb_pd_fuzz.c index 54b138e03c..777a86d592 100644 --- a/fuzz/usb_pd_fuzz.c +++ b/fuzz/usb_pd_fuzz.c @@ -114,7 +114,7 @@ int tcpm_enqueue_message(const int port) pending = 1; /* Wake PD task up so it can process incoming RX messages */ - task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0); + task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE); return EC_SUCCESS; } @@ -175,14 +175,13 @@ void run_test(int argc, char **argv) memset(&mock_tcpc_state[port], 0, sizeof(mock_tcpc_state[port])); - task_set_event(PD_PORT_TO_TASK_ID(port), - PD_EVENT_TCPC_RESET, 0); + task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TCPC_RESET); task_wait_event(250 * MSEC); mock_tcpc_state[port].cc1 = next_cc1; mock_tcpc_state[port].cc2 = next_cc2; - task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0); + task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC); task_wait_event(50 * MSEC); /* Fake RX messages, one by one. */ @@ -234,7 +233,7 @@ int test_fuzz_one_input(const uint8_t *data, unsigned int size) return 0; } - task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ, 0); + task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ); pthread_cond_wait(&done_cond, &lock); return 0; |