Get rid of some unused upcalls
I guess these became obsolete when the communication stuff moved into the stdlib.
This commit is contained in:
parent
bd2ec03771
commit
139b1d1b31
@ -24,12 +24,7 @@ import lib::llvm::llvm::ValueRef;
|
||||
import lib::llvm::llvm::TypeRef;
|
||||
|
||||
type upcalls =
|
||||
{grow_task: ValueRef,
|
||||
_yield: ValueRef,
|
||||
sleep: ValueRef,
|
||||
_fail: ValueRef,
|
||||
kill: ValueRef,
|
||||
exit: ValueRef,
|
||||
{_fail: ValueRef,
|
||||
malloc: ValueRef,
|
||||
free: ValueRef,
|
||||
shared_malloc: ValueRef,
|
||||
@ -61,13 +56,7 @@ fn declare_upcalls(_tn: type_names, tydesc_type: TypeRef,
|
||||
let d = bind decl_with_taskptr(taskptr_type, llmod, _, _, _);
|
||||
let dr = bind decl(llmod, _, _, _);
|
||||
|
||||
let empty_vec: [TypeRef] = [];
|
||||
ret @{grow_task: dv("grow_task", [T_size_t()]),
|
||||
_yield: dv("yield", empty_vec),
|
||||
sleep: dv("sleep", [T_size_t()]),
|
||||
_fail: dv("fail", [T_ptr(T_i8()), T_ptr(T_i8()), T_size_t()]),
|
||||
kill: dv("kill", [taskptr_type]),
|
||||
exit: dv("exit", empty_vec),
|
||||
ret @{_fail: dv("fail", [T_ptr(T_i8()), T_ptr(T_i8()), T_size_t()]),
|
||||
malloc:
|
||||
d("malloc", [T_size_t(), T_ptr(tydesc_type)], T_ptr(T_i8())),
|
||||
free: dv("free", [T_ptr(T_i8()), T_int()]),
|
||||
|
@ -160,11 +160,9 @@ rand_free(rust_task *task, randctx *rctx)
|
||||
task->free(rctx);
|
||||
}
|
||||
|
||||
extern "C" CDECL void upcall_sleep(rust_task *task, size_t time_in_us);
|
||||
|
||||
extern "C" CDECL void
|
||||
task_sleep(rust_task *task, size_t time_in_us) {
|
||||
upcall_sleep(task, time_in_us);
|
||||
task->yield(time_in_us);
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
|
@ -20,20 +20,6 @@ check_stack(rust_task *task) {
|
||||
}
|
||||
#endif
|
||||
|
||||
extern "C" void
|
||||
upcall_grow_task(rust_task *task, size_t n_frame_bytes) {
|
||||
I(task->sched, false);
|
||||
LOG_UPCALL_ENTRY(task);
|
||||
task->grow(n_frame_bytes);
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
upcall_yield(rust_task *task) {
|
||||
LOG_UPCALL_ENTRY(task);
|
||||
LOG(task, comm, "upcall yield()");
|
||||
task->yield(1);
|
||||
}
|
||||
|
||||
// Copy elements from one vector to another,
|
||||
// dealing with reference counts
|
||||
static inline void
|
||||
@ -54,15 +40,6 @@ copy_elements(rust_task *task, type_desc *elem_t,
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
upcall_sleep(rust_task *task, size_t time_in_us) {
|
||||
LOG_UPCALL_ENTRY(task);
|
||||
LOG(task, task, "elapsed %" PRIu64 " us",
|
||||
task->yield_timer.elapsed_us());
|
||||
LOG(task, task, "sleep %d us", time_in_us);
|
||||
task->yield(time_in_us);
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
upcall_fail(rust_task *task,
|
||||
char const *expr,
|
||||
@ -73,28 +50,6 @@ upcall_fail(rust_task *task,
|
||||
task->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called whenever a task's ref count drops to zero.
|
||||
*/
|
||||
extern "C" CDECL void
|
||||
upcall_kill(rust_task *task, rust_task_id tid) {
|
||||
LOG_UPCALL_ENTRY(task);
|
||||
rust_task *target = task->kernel->get_task_by_id(tid);
|
||||
target->kill();
|
||||
target->deref();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the exit glue when the task terminates.
|
||||
*/
|
||||
extern "C" CDECL void
|
||||
upcall_exit(rust_task *task) {
|
||||
LOG_UPCALL_ENTRY(task);
|
||||
task->die();
|
||||
task->notify_tasks_waiting_to_join();
|
||||
task->yield(1);
|
||||
}
|
||||
|
||||
extern "C" CDECL uintptr_t
|
||||
upcall_malloc(rust_task *task, size_t nbytes, type_desc *td) {
|
||||
LOG_UPCALL_ENTRY(task);
|
||||
|
@ -71,17 +71,12 @@ upcall_dynastack_alloc
|
||||
upcall_dynastack_alloc_2
|
||||
upcall_dynastack_free
|
||||
upcall_dynastack_mark
|
||||
upcall_exit
|
||||
upcall_fail
|
||||
upcall_free
|
||||
upcall_get_type_desc
|
||||
upcall_grow_task
|
||||
upcall_vec_grow
|
||||
upcall_vec_push
|
||||
upcall_kill
|
||||
upcall_log_type
|
||||
upcall_malloc
|
||||
upcall_shared_malloc
|
||||
upcall_shared_free
|
||||
upcall_sleep
|
||||
upcall_yield
|
||||
|
Loading…
x
Reference in New Issue
Block a user