Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
78eec3bc
Commit
78eec3bc
authored
Nov 09, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
got rid of warnings in build w/o context switching
parent
79b83f81
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
23 deletions
+6
-23
cppa/util/fiber.hpp
cppa/util/fiber.hpp
+2
-6
src/fiber.cpp
src/fiber.cpp
+4
-17
No files found.
cppa/util/fiber.hpp
View file @
78eec3bc
...
...
@@ -33,11 +33,9 @@
namespace
cppa
{
namespace
util
{
class
fiber_impl
;
struct
fiber_impl
;
class
fiber
{
public:
struct
fiber
{
fiber
();
...
...
@@ -47,8 +45,6 @@ class fiber {
static
void
swap
(
fiber
&
from
,
fiber
&
to
);
private:
fiber_impl
*
m_impl
;
};
...
...
src/fiber.cpp
View file @
78eec3bc
...
...
@@ -62,7 +62,7 @@ void fiber::swap(fiber&, fiber&) {
namespace
cppa
{
namespace
util
{
class
fiber_impl
;
struct
fiber_impl
;
void
fiber_trampoline
(
intptr_t
iptr
);
namespace
{
...
...
@@ -122,9 +122,7 @@ inline void fc_make(fc_member& storage, fc_allocator& alloc, vg_member& vgm) {
}
// namespace <anonymous>
class
fiber_impl
{
public:
struct
fiber_impl
{
fiber_impl
()
:
m_ctx
()
{
}
...
...
@@ -136,16 +134,12 @@ class fiber_impl {
fc_jump
(
m_ctx
,
to
->
m_ctx
,
to
);
}
protected:
fc_member
m_ctx
;
};
// a fiber representing a thread ('converts' the thread to a fiber)
class
converted_fiber
:
public
fiber_impl
{
public:
struct
converted_fiber
:
fiber_impl
{
converted_fiber
()
{
# if BOOST_VERSION > 105100
...
...
@@ -153,8 +147,6 @@ class converted_fiber : public fiber_impl {
# endif
}
private:
# if BOOST_VERSION > 105100
ctx
::
fcontext_t
m_ctx_obj
;
# endif
...
...
@@ -162,9 +154,7 @@ class converted_fiber : public fiber_impl {
};
// a fiber executing a function
class
fun_fiber
:
public
fiber_impl
{
public:
struct
fun_fiber
:
fiber_impl
{
fun_fiber
(
void
(
*
fun
)(
void
*
),
void
*
arg
)
:
m_arg
(
arg
),
m_fun
(
fun
)
{
fc_make
(
m_ctx
,
m_alloc
,
m_vgm
);
...
...
@@ -178,9 +168,6 @@ class fun_fiber : public fiber_impl {
m_fun
(
m_arg
);
}
private:
void
*
m_arg
;
void
(
*
m_fun
)(
void
*
);
fc_allocator
m_alloc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment