rt: Add interface to box annihilator.
This commit is contained in:
parent
dbf6abf6bf
commit
f8323ac615
3 changed files with 20 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "rust_globals.h"
|
||||
#include "rust_task.h"
|
||||
#include "rust_shape.h"
|
||||
#include "rust_box_annihilator.h"
|
||||
|
||||
class annihilator : public shape::data<annihilator,shape::ptr> {
|
||||
friend class shape::data<annihilator,shape::ptr>;
|
||||
|
|
12
src/rt/rust_box_annihilator.h
Normal file
12
src/rt/rust_box_annihilator.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef RUST_BOX_ANNIHILATOR_H
|
||||
#define RUST_BOX_ANNIHILATOR_H
|
||||
|
||||
#include "rust_task.h"
|
||||
|
||||
void
|
||||
annihilate_box(rust_task *task, rust_opaque_box *box);
|
||||
|
||||
void
|
||||
annihilate_boxes(rust_task *task);
|
||||
|
||||
#endif
|
|
@ -7,6 +7,7 @@
|
|||
#include "sync/timer.h"
|
||||
#include "rust_abi.h"
|
||||
#include "rust_port.h"
|
||||
#include "rust_box_annihilator.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
@ -740,6 +741,12 @@ rust_set_exit_status(intptr_t code) {
|
|||
task->kernel->set_exit_status((int)code);
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
rust_annihilate_box(rust_opaque_box *ptr) {
|
||||
rust_task *task = rust_get_current_task();
|
||||
annihilate_box(task, ptr);
|
||||
}
|
||||
|
||||
extern void log_console_on();
|
||||
|
||||
extern "C" CDECL void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue