rt: Remove new_chan. Not needed

This commit is contained in:
Brian Anderson 2011-11-10 15:59:31 -08:00
parent 0dc8387995
commit 08d0ff38bc
3 changed files with 3 additions and 16 deletions

View File

@ -484,18 +484,6 @@ get_port_id(rust_port *port) {
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
void del_chan(rust_chan *chan) {
rust_task *task = rust_scheduler::get_task();

View File

@ -1,8 +1,7 @@
#include "rust_internal.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)
: 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);
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() {

View File

@ -30,7 +30,6 @@ last_os_error
leak
migrate_alloc
nano_time
new_chan
new_port
new_task
pin_task