Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
vityaman committed Nov 21, 2024
1 parent 0ac13a4 commit 449e4d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions source/coroed/api/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ void tasks_wait();
void tasks_print_statistics();
void tasks_destroy();

void task_yield(struct task* task);
void task_exit(struct task* task);
void task_submit(struct task* parent, uthread_routine entry, void* argument);
void task_yield(struct task* caller);
void task_exit(struct task* caller);
void task_submit(struct task* caller, uthread_routine entry, void* argument);

#define TASK_DECLARE(name, type, argument) \
void task_body_##name(struct task* __self, type* argument); /* NOLINT */ \
Expand Down
14 changes: 7 additions & 7 deletions source/coroed/sched/schedy.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ void sched_cancel(struct task* task) {
task->state = UTHREAD_CANCELLED;
}

void task_yield(struct task* task) {
sched_switch_to_scheduler(task);
void task_yield(struct task* caller) {
sched_switch_to_scheduler(caller);
}

void task_exit(struct task* task) {
sched_cancel(task);
task_yield(task);
void task_exit(struct task* caller) {
sched_cancel(caller);
task_yield(caller);
}

void task_submit(struct task* parent, uthread_routine entry, void* argument) {
(void)parent;
void task_submit(struct task* caller, uthread_routine entry, void* argument) {
(void)caller;
sched_submit(*entry, argument);
}

Expand Down

0 comments on commit 449e4d2

Please sign in to comment.