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
668dcb59
Commit
668dcb59
authored
Feb 17, 2013
by
Andrea Bigagli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated for boost 1.53
parent
bfc843db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
src/fiber.cpp
src/fiber.cpp
+20
-1
No files found.
src/fiber.cpp
View file @
668dcb59
...
...
@@ -56,6 +56,9 @@ void fiber::swap(fiber&, fiber&) {
#endif
#include <boost/version.hpp>
#include <boost/context/all.hpp>
#if BOOST_VERSION >= 105300
#include <boost/coroutine/all.hpp>
#endif
namespace
cppa
{
namespace
util
{
...
...
@@ -96,10 +99,25 @@ inline void fc_make(fc_member& storage, fc_allocator& alloc, vg_member& vgm) {
reinterpret_cast
<
void
*>
(
reinterpret_cast
<
intptr_t
>
(
storage
.
fc_stack
.
base
)
-
stacksize
));
}
#elif BOOST_VERSION < 105300
namespace
ctx
=
boost
::
context
;
typedef
ctx
::
fcontext_t
*
fc_member
;
typedef
ctx
::
guarded_stack_allocator
fc_allocator
inline
void
fc_jump
(
fc_member
&
from
,
fc_member
&
to
,
fiber_impl
*
ptr
)
{
ctx
::
jump_fcontext
(
from
,
to
,
(
intptr_t
)
ptr
);
}
inline
void
fc_make
(
fc_member
&
storage
,
fc_allocator
&
alloc
,
vg_member
&
vgm
)
{
size_t
mss
=
fc_allocator
::
minimum_stacksize
();
storage
=
ctx
::
make_fcontext
(
alloc
.
allocate
(
mss
),
mss
,
fiber_trampoline
);
vg_register
(
vgm
,
storage
->
fc_stack
.
sp
,
reinterpret_cast
<
void
*>
(
reinterpret_cast
<
intptr_t
>
(
storage
->
fc_stack
.
sp
)
-
mss
));
}
#else
namespace
ctx
=
boost
::
context
;
typedef
ctx
::
fcontext_t
*
fc_member
;
typedef
ctx
::
guarded_
stack_allocator
fc_allocator
;
typedef
boost
::
coroutines
::
stack_allocator
fc_allocator
;
inline
void
fc_jump
(
fc_member
&
from
,
fc_member
&
to
,
fiber_impl
*
ptr
)
{
ctx
::
jump_fcontext
(
from
,
to
,
(
intptr_t
)
ptr
);
}
...
...
@@ -111,6 +129,7 @@ inline void fc_make(fc_member& storage, fc_allocator& alloc, vg_member& vgm) {
reinterpret_cast
<
void
*>
(
reinterpret_cast
<
intptr_t
>
(
storage
->
fc_stack
.
sp
)
-
mss
));
}
#endif
}
// namespace <anonymous>
...
...
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