summaryrefslogtreecommitdiff
path: root/boost/fiber/algo/algorithm.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fiber/algo/algorithm.hpp')
-rw-r--r--boost/fiber/algo/algorithm.hpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/boost/fiber/algo/algorithm.hpp b/boost/fiber/algo/algorithm.hpp
index 515fc5ed5c..9b846e774b 100644
--- a/boost/fiber/algo/algorithm.hpp
+++ b/boost/fiber/algo/algorithm.hpp
@@ -43,11 +43,11 @@ struct BOOST_FIBERS_DECL algorithm {
class BOOST_FIBERS_DECL algorithm_with_properties_base : public algorithm {
public:
// called by fiber_properties::notify() -- don't directly call
- virtual void property_change_( context * f, fiber_properties * props) noexcept = 0;
+ virtual void property_change_( context * ctx, fiber_properties * props) noexcept = 0;
protected:
- static fiber_properties* get_properties( context * f) noexcept;
- static void set_properties( context * f, fiber_properties * p) noexcept;
+ static fiber_properties* get_properties( context * ctx) noexcept;
+ static void set_properties( context * ctx, fiber_properties * p) noexcept;
};
template< typename PROPS >
@@ -58,18 +58,18 @@ struct algorithm_with_properties : public algorithm_with_properties_base {
// must override awakened() with properties parameter instead. Otherwise
// you'd have to remember to start every subclass awakened() override
// with: algorithm_with_properties<PROPS>::awakened(fb);
- virtual void awakened( context * f) noexcept override final {
- fiber_properties * props = super::get_properties( f);
+ virtual void awakened( context * ctx) noexcept override final {
+ fiber_properties * props = super::get_properties( ctx);
if ( nullptr == props) {
// TODO: would be great if PROPS could be allocated on the new
// fiber's stack somehow
- props = new_properties( f);
+ props = new_properties( ctx);
// It is not good for new_properties() to return 0.
- BOOST_ASSERT_MSG(props, "new_properties() must return non-NULL");
+ BOOST_ASSERT_MSG( props, "new_properties() must return non-NULL");
// new_properties() must return instance of (a subclass of) PROPS
BOOST_ASSERT_MSG( dynamic_cast< PROPS * >( props),
"new_properties() must return properties class");
- super::set_properties( f, props);
+ super::set_properties( ctx, props);
}
// Set algo_ again every time this fiber becomes READY. That
// handles the case of a fiber migrating to a new thread with a new
@@ -77,31 +77,31 @@ struct algorithm_with_properties : public algorithm_with_properties_base {
props->set_algorithm( this);
// Okay, now forward the call to subclass override.
- awakened( f, properties(f) );
+ awakened( ctx, properties( ctx) );
}
// subclasses override this method instead of the original awakened()
- virtual void awakened( context *, PROPS& ) noexcept = 0;
+ virtual void awakened( context *, PROPS &) noexcept = 0;
// used for all internal calls
- PROPS & properties( context * f) noexcept {
- return static_cast< PROPS & >( * super::get_properties( f) );
+ PROPS & properties( context * ctx) noexcept {
+ return static_cast< PROPS & >( * super::get_properties( ctx) );
}
// override this to be notified by PROPS::notify()
- virtual void property_change( context * f, PROPS & props) noexcept {
+ virtual void property_change( context * ctx, PROPS & props) noexcept {
}
// implementation for algorithm_with_properties_base method
- void property_change_( context * f, fiber_properties * props ) noexcept override final {
- property_change( f, * static_cast< PROPS * >( props) );
+ void property_change_( context * ctx, fiber_properties * props) noexcept override final {
+ property_change( ctx, * static_cast< PROPS * >( props) );
}
// Override this to customize instantiation of PROPS, e.g. use a different
// allocator. Each PROPS instance is associated with a particular
// context.
- virtual fiber_properties * new_properties( context * f) {
- return new PROPS( f);
+ virtual fiber_properties * new_properties( context * ctx) {
+ return new PROPS( ctx);
}
};