Commit 78eec3bc authored by Dominik Charousset's avatar Dominik Charousset

got rid of warnings in build w/o context switching

parent 79b83f81
...@@ -33,11 +33,9 @@ ...@@ -33,11 +33,9 @@
namespace cppa { namespace util { namespace cppa { namespace util {
class fiber_impl; struct fiber_impl;
class fiber { struct fiber {
public:
fiber(); fiber();
...@@ -47,8 +45,6 @@ class fiber { ...@@ -47,8 +45,6 @@ class fiber {
static void swap(fiber& from, fiber& to); static void swap(fiber& from, fiber& to);
private:
fiber_impl* m_impl; fiber_impl* m_impl;
}; };
......
...@@ -62,7 +62,7 @@ void fiber::swap(fiber&, fiber&) { ...@@ -62,7 +62,7 @@ void fiber::swap(fiber&, fiber&) {
namespace cppa { namespace util { namespace cppa { namespace util {
class fiber_impl; struct fiber_impl;
void fiber_trampoline(intptr_t iptr); void fiber_trampoline(intptr_t iptr);
namespace { namespace {
...@@ -122,9 +122,7 @@ inline void fc_make(fc_member& storage, fc_allocator& alloc, vg_member& vgm) { ...@@ -122,9 +122,7 @@ inline void fc_make(fc_member& storage, fc_allocator& alloc, vg_member& vgm) {
} // namespace <anonymous> } // namespace <anonymous>
class fiber_impl { struct fiber_impl {
public:
fiber_impl() : m_ctx() { } fiber_impl() : m_ctx() { }
...@@ -136,16 +134,12 @@ class fiber_impl { ...@@ -136,16 +134,12 @@ class fiber_impl {
fc_jump(m_ctx, to->m_ctx, to); fc_jump(m_ctx, to->m_ctx, to);
} }
protected:
fc_member m_ctx; fc_member m_ctx;
}; };
// a fiber representing a thread ('converts' the thread to a fiber) // a fiber representing a thread ('converts' the thread to a fiber)
class converted_fiber : public fiber_impl { struct converted_fiber : fiber_impl {
public:
converted_fiber() { converted_fiber() {
# if BOOST_VERSION > 105100 # if BOOST_VERSION > 105100
...@@ -153,8 +147,6 @@ class converted_fiber : public fiber_impl { ...@@ -153,8 +147,6 @@ class converted_fiber : public fiber_impl {
# endif # endif
} }
private:
# if BOOST_VERSION > 105100 # if BOOST_VERSION > 105100
ctx::fcontext_t m_ctx_obj; ctx::fcontext_t m_ctx_obj;
# endif # endif
...@@ -162,9 +154,7 @@ class converted_fiber : public fiber_impl { ...@@ -162,9 +154,7 @@ class converted_fiber : public fiber_impl {
}; };
// a fiber executing a function // a fiber executing a function
class fun_fiber : public fiber_impl { struct fun_fiber : fiber_impl {
public:
fun_fiber(void (*fun)(void*), void* arg) : m_arg(arg), m_fun(fun) { fun_fiber(void (*fun)(void*), void* arg) : m_arg(arg), m_fun(fun) {
fc_make(m_ctx, m_alloc, m_vgm); fc_make(m_ctx, m_alloc, m_vgm);
...@@ -178,9 +168,6 @@ class fun_fiber : public fiber_impl { ...@@ -178,9 +168,6 @@ class fun_fiber : public fiber_impl {
m_fun(m_arg); m_fun(m_arg);
} }
private:
void* m_arg; void* m_arg;
void (*m_fun)(void*); void (*m_fun)(void*);
fc_allocator m_alloc; fc_allocator m_alloc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment