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
d208a59a
Commit
d208a59a
authored
May 22, 2015
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more RIOT adjustments
parent
4ab7c4af
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
libcaf_core/CMakeLists.txt
libcaf_core/CMakeLists.txt
+6
-1
libcaf_core/caf/detail/logging.hpp
libcaf_core/caf/detail/logging.hpp
+2
-2
libcaf_core/src/local_actor.cpp
libcaf_core/src/local_actor.cpp
+1
-1
libcaf_core/src/logging.cpp
libcaf_core/src/logging.cpp
+2
-2
No files found.
libcaf_core/CMakeLists.txt
View file @
d208a59a
...
@@ -70,7 +70,6 @@ set (LIBCAF_CORE_SRCS
...
@@ -70,7 +70,6 @@ set (LIBCAF_CORE_SRCS
src/replies_to.cpp
src/replies_to.cpp
src/resumable.cpp
src/resumable.cpp
src/ripemd_160.cpp
src/ripemd_160.cpp
src/run_program.cpp
src/scoped_actor.cpp
src/scoped_actor.cpp
src/set_scheduler.cpp
src/set_scheduler.cpp
src/serializer.cpp
src/serializer.cpp
...
@@ -84,6 +83,12 @@ set (LIBCAF_CORE_SRCS
...
@@ -84,6 +83,12 @@ set (LIBCAF_CORE_SRCS
src/uniform_type_info.cpp
src/uniform_type_info.cpp
src/uniform_type_info_map.cpp
)
src/uniform_type_info_map.cpp
)
if
(
NOT CAF_FOR_RIOT
)
set
(
LIBCAF_CORE_SRCS
${
LIBCAF_CORE_SRCS
}
src/run_program.cpp
)
endif
()
add_custom_target
(
libcaf_core
)
add_custom_target
(
libcaf_core
)
# build shared library if not compiling static only
# build shared library if not compiling static only
...
...
libcaf_core/caf/detail/logging.hpp
View file @
d208a59a
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#ifndef CAF_LOGGING_HPP
#ifndef CAF_LOGGING_HPP
#define CAF_LOGGING_HPP
#define CAF_LOGGING_HPP
#include <thread>
#include <cstring>
#include <cstring>
#include <sstream>
#include <sstream>
#include <iostream>
#include <iostream>
...
@@ -28,6 +27,7 @@
...
@@ -28,6 +27,7 @@
#include <unordered_map>
#include <unordered_map>
#include "caf/config.hpp"
#include "caf/config.hpp"
#include "caf/thread.hpp"
#include "caf/to_string.hpp"
#include "caf/to_string.hpp"
#include "caf/abstract_actor.hpp"
#include "caf/abstract_actor.hpp"
...
@@ -97,7 +97,7 @@ class logging {
...
@@ -97,7 +97,7 @@ class logging {
private:
private:
detail
::
shared_spinlock
m_aids_lock
;
detail
::
shared_spinlock
m_aids_lock
;
std
::
unordered_map
<
std
::
thread
::
id
,
actor_id
>
m_aids
;
std
::
unordered_map
<
thread
::
id
,
actor_id
>
m_aids
;
};
};
struct
oss_wr
{
struct
oss_wr
{
...
...
libcaf_core/src/local_actor.cpp
View file @
d208a59a
...
@@ -484,7 +484,7 @@ void local_actor::launch(execution_unit* eu, bool lazy, bool hide) {
...
@@ -484,7 +484,7 @@ void local_actor::launch(execution_unit* eu, bool lazy, bool hide) {
scheduler
::
inc_detached_threads
();
scheduler
::
inc_detached_threads
();
}
}
//intrusive_ptr<local_actor> mself{this};
//intrusive_ptr<local_actor> mself{this};
std
::
thread
([
hide
](
intrusive_ptr
<
local_actor
>
mself
)
{
thread
([
hide
](
intrusive_ptr
<
local_actor
>
mself
)
{
CAF_PUSH_AID
(
mself
->
id
());
CAF_PUSH_AID
(
mself
->
id
());
CAF_LOGF_TRACE
(
""
);
CAF_LOGF_TRACE
(
""
);
auto
max_throughput
=
std
::
numeric_limits
<
size_t
>::
max
();
auto
max_throughput
=
std
::
numeric_limits
<
size_t
>::
max
();
...
...
libcaf_core/src/logging.cpp
View file @
d208a59a
...
@@ -197,7 +197,7 @@ logging* logging::create_singleton() {
...
@@ -197,7 +197,7 @@ logging* logging::create_singleton() {
// returns the actor ID for the current thread
// returns the actor ID for the current thread
actor_id
logging
::
get_aid
()
{
actor_id
logging
::
get_aid
()
{
shared_lock
<
detail
::
shared_spinlock
>
guard
{
m_aids_lock
};
shared_lock
<
detail
::
shared_spinlock
>
guard
{
m_aids_lock
};
auto
i
=
m_aids
.
find
(
std
::
this_thread
::
get_id
());
auto
i
=
m_aids
.
find
(
this_thread
::
get_id
());
if
(
i
!=
m_aids
.
end
())
{
if
(
i
!=
m_aids
.
end
())
{
return
i
->
second
;
return
i
->
second
;
}
}
...
@@ -205,7 +205,7 @@ actor_id logging::get_aid() {
...
@@ -205,7 +205,7 @@ actor_id logging::get_aid() {
}
}
actor_id
logging
::
set_aid
(
actor_id
aid
)
{
actor_id
logging
::
set_aid
(
actor_id
aid
)
{
auto
tid
=
std
::
this_thread
::
get_id
();
auto
tid
=
this_thread
::
get_id
();
upgrade_lock
<
detail
::
shared_spinlock
>
guard
{
m_aids_lock
};
upgrade_lock
<
detail
::
shared_spinlock
>
guard
{
m_aids_lock
};
auto
i
=
m_aids
.
find
(
tid
);
auto
i
=
m_aids
.
find
(
tid
);
if
(
i
!=
m_aids
.
end
())
{
if
(
i
!=
m_aids
.
end
())
{
...
...
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