2015-04-16 20:06:57 +08:00
|
|
|
// This file is part of libfringe, a low-level green threading library.
|
2016-03-22 15:25:23 +08:00
|
|
|
// Copyright (c) edef <edef@edef.eu>
|
2016-08-21 05:45:01 +08:00
|
|
|
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
|
|
|
|
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
|
|
|
|
// http://opensource.org/licenses/MIT>, at your option. This file may not be
|
|
|
|
// copied, modified, or distributed except according to those terms.
|
2015-08-25 10:50:50 +08:00
|
|
|
pub use self::imp::*;
|
2015-04-16 14:30:10 +08:00
|
|
|
|
2015-08-25 10:50:50 +08:00
|
|
|
#[cfg(feature = "valgrind")]
|
2016-01-04 22:32:03 +08:00
|
|
|
#[path = "valgrind.rs"]
|
2015-08-25 10:50:50 +08:00
|
|
|
mod imp;
|
2015-04-16 14:30:10 +08:00
|
|
|
|
2015-08-25 10:50:50 +08:00
|
|
|
#[cfg(not(feature = "valgrind"))]
|
|
|
|
mod imp {
|
|
|
|
use stack;
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct StackId;
|
|
|
|
/// No-op since no valgrind
|
|
|
|
impl StackId {
|
2016-07-16 09:22:41 +08:00
|
|
|
pub fn register<Stack: stack::Stack>(_stack: &Stack) -> StackId {
|
2015-08-25 10:50:50 +08:00
|
|
|
StackId
|
2015-04-16 14:30:10 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|