Skip to content

Commit 1dad32c

Browse files
committed
rt: Remove unused builtins
1 parent ae2968d commit 1dad32c

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

src/rt/rust_builtin.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ rust_getcwd() {
8181
return make_str(task->kernel, cbuf, strlen(cbuf), "rust_str(getcwd");
8282
}
8383

84-
8584
#if defined(__WIN32__)
8685
extern "C" CDECL rust_vec *
8786
rust_env_pairs() {
@@ -124,18 +123,6 @@ rust_env_pairs() {
124123
}
125124
#endif
126125

127-
// TODO: Allow calling native functions that return double results.
128-
extern "C" CDECL
129-
void squareroot(double *input, double *output) {
130-
*output = sqrt(*input);
131-
}
132-
133-
extern "C" CDECL void
134-
leak(void *thing) {
135-
// Do nothing. Call this with move-mode in order to say "Don't worry rust,
136-
// I'll take care of this."
137-
}
138-
139126
extern "C" CDECL intptr_t
140127
refcount(intptr_t *v) {
141128
// Passed-in value has refcount 1 too high
@@ -474,13 +461,6 @@ rust_new_task_in_sched(rust_sched_id id) {
474461
return new_task_common(sched, task);
475462
}
476463

477-
extern "C" CDECL void
478-
drop_task(rust_task *target) {
479-
if(target) {
480-
target->deref();
481-
}
482-
}
483-
484464
extern "C" CDECL void
485465
rust_task_config_notify(rust_task_id task_id, chan_handle *chan) {
486466
rust_task *task = rust_task_thread::get_task();
@@ -491,12 +471,6 @@ rust_task_config_notify(rust_task_id task_id, chan_handle *chan) {
491471
target->deref();
492472
}
493473

494-
extern "C" CDECL rust_task *
495-
get_task_pointer(rust_task_id id) {
496-
rust_task *task = rust_task_thread::get_task();
497-
return task->kernel->get_task_by_id(id);
498-
}
499-
500474
extern "C" rust_task *
501475
rust_get_task() {
502476
return rust_task_thread::get_task();

src/rt/rustrt.def.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ debug_ptrcast
99
debug_tag
1010
debug_tydesc
1111
debug_get_stk_seg
12-
drop_task
1312
get_port_id
1413
get_task_id
15-
get_task_pointer
1614
get_time
1715
last_os_error
18-
leak
1916
nano_time
2017
new_port
2118
new_task
@@ -52,7 +49,6 @@ rust_get_task
5249
rust_task_config_notify
5350
sched_threads
5451
shape_log_str
55-
squareroot
5652
start_task
5753
vec_reserve_shared
5854
str_reserve_shared

0 commit comments

Comments
 (0)