]> git.proxmox.com Git - rustc.git/blame - library/std/src/sys/vxworks/stack_overflow.rs
New upstream version 1.48.0+dfsg1
[rustc.git] / library / std / src / sys / vxworks / stack_overflow.rs
CommitLineData
416331ca
XL
1#![cfg_attr(test, allow(dead_code))]
2
60c5eb7d 3use self::imp::{drop_handler, make_handler};
416331ca
XL
4
5pub use self::imp::cleanup;
6pub use self::imp::init;
7
8pub struct Handler {
60c5eb7d 9 _data: *mut libc::c_void,
416331ca
XL
10}
11
12impl Handler {
13 pub unsafe fn new() -> Handler {
14 make_handler()
15 }
16}
17
18impl Drop for Handler {
19 fn drop(&mut self) {
20 unsafe {
21 drop_handler(self);
22 }
23 }
24}
25
26mod imp {
27 use crate::ptr;
28
60c5eb7d 29 pub unsafe fn init() {}
416331ca 30
60c5eb7d 31 pub unsafe fn cleanup() {}
416331ca
XL
32
33 pub unsafe fn make_handler() -> super::Handler {
34 super::Handler { _data: ptr::null_mut() }
35 }
36
60c5eb7d 37 pub unsafe fn drop_handler(_handler: &mut super::Handler) {}
416331ca 38}