2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-17 13:42:21 +00:00

small fixes

This commit is contained in:
Oliver Kowalke
2015-09-08 21:33:20 +02:00
parent 2cd1d39f12
commit 291b9d7c17
3 changed files with 9 additions and 13 deletions

View File

@@ -33,12 +33,10 @@ context::active() noexcept {
return active_;
}
context *
void
context::active( context * active) noexcept {
BOOST_ASSERT( nullptr != active);
context * old( active_);
active_ = active;
return old;
}
context::~context() {
@@ -111,9 +109,9 @@ context::get_fss_data( void const * vp) const {
void
context::set_fss_data( void const * vp,
detail::fss_cleanup_function::ptr_t const& cleanup_fn,
void * data,
bool cleanup_existing) {
detail::fss_cleanup_function::ptr_t const& cleanup_fn,
void * data,
bool cleanup_existing) {
BOOST_ASSERT( cleanup_fn);
uintptr_t key( reinterpret_cast< uintptr_t >( vp) );
@@ -147,13 +145,11 @@ context::set_properties( fiber_properties * props) {
}
void
context::do_spawn( fiber const& f_) {
context::do_spawn( fiber const& f) {
BOOST_ASSERT( nullptr != scheduler_);
BOOST_ASSERT( this == active_);
context * f( f_.impl_.get() );
f->set_scheduler( scheduler_);
scheduler_->spawn( f);
scheduler_->spawn( f.impl_.get() );
}
void