rt: Remove new_chan. Not needed
This commit is contained in:
parent
0dc8387995
commit
08d0ff38bc
3 changed files with 3 additions and 16 deletions
|
@ -484,18 +484,6 @@ get_port_id(rust_port *port) {
|
||||||
return port->id;
|
return port->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" CDECL rust_chan*
|
|
||||||
new_chan(rust_port *port) {
|
|
||||||
rust_task *task = rust_scheduler::get_task();
|
|
||||||
rust_scheduler *sched = task->sched;
|
|
||||||
LOG(task, comm, "new_chan("
|
|
||||||
"task=0x%" PRIxPTR " (%s), port=0x%" PRIxPTR ")",
|
|
||||||
(uintptr_t) task, task->name, port);
|
|
||||||
I(sched, port);
|
|
||||||
return new (task->kernel, "rust_chan")
|
|
||||||
rust_chan(task->kernel, port, port->unit_sz);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" CDECL
|
extern "C" CDECL
|
||||||
void del_chan(rust_chan *chan) {
|
void del_chan(rust_chan *chan) {
|
||||||
rust_task *task = rust_scheduler::get_task();
|
rust_task *task = rust_scheduler::get_task();
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#include "rust_internal.h"
|
#include "rust_internal.h"
|
||||||
#include "rust_port.h"
|
#include "rust_port.h"
|
||||||
|
#include "rust_chan.h"
|
||||||
|
|
||||||
extern "C" CDECL rust_chan*
|
|
||||||
new_chan(rust_port *port);
|
|
||||||
|
|
||||||
rust_port::rust_port(rust_task *task, size_t unit_sz)
|
rust_port::rust_port(rust_task *task, size_t unit_sz)
|
||||||
: ref_count(1), kernel(task->kernel), task(task),
|
: ref_count(1), kernel(task->kernel), task(task),
|
||||||
|
@ -13,7 +12,8 @@ rust_port::rust_port(rust_task *task, size_t unit_sz)
|
||||||
PRIxPTR, (uintptr_t)task, unit_sz, (uintptr_t)this);
|
PRIxPTR, (uintptr_t)task, unit_sz, (uintptr_t)this);
|
||||||
|
|
||||||
id = task->register_port(this);
|
id = task->register_port(this);
|
||||||
remote_chan = new_chan(this);
|
remote_chan = new (task->kernel, "rust_chan")
|
||||||
|
rust_chan(task->kernel, this, unit_sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
rust_port::~rust_port() {
|
rust_port::~rust_port() {
|
||||||
|
|
|
@ -30,7 +30,6 @@ last_os_error
|
||||||
leak
|
leak
|
||||||
migrate_alloc
|
migrate_alloc
|
||||||
nano_time
|
nano_time
|
||||||
new_chan
|
|
||||||
new_port
|
new_port
|
||||||
new_task
|
new_task
|
||||||
pin_task
|
pin_task
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue