Skip to content

Commit

Permalink
rt: Add interface to box annihilator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliott Slaughter committed Aug 31, 2012
1 parent dbf6abf commit f8323ac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rt/rust_box_annihilator.cpp
Expand Up @@ -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>;
Expand Down
12 changes: 12 additions & 0 deletions src/rt/rust_box_annihilator.h
@@ -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 changes: 7 additions & 0 deletions src/rt/rust_builtin.cpp
Expand Up @@ -7,6 +7,7 @@
#include "sync/timer.h"
#include "rust_abi.h"
#include "rust_port.h"
#include "rust_box_annihilator.h"

#include <time.h>

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f8323ac

Please sign in to comment.