Commit d208a59a authored by Joseph Noir's avatar Joseph Noir

Add more RIOT adjustments

parent 4ab7c4af
......@@ -70,7 +70,6 @@ set (LIBCAF_CORE_SRCS
src/replies_to.cpp
src/resumable.cpp
src/ripemd_160.cpp
src/run_program.cpp
src/scoped_actor.cpp
src/set_scheduler.cpp
src/serializer.cpp
......@@ -84,6 +83,12 @@ set (LIBCAF_CORE_SRCS
src/uniform_type_info.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)
# build shared library if not compiling static only
......
......@@ -20,7 +20,6 @@
#ifndef CAF_LOGGING_HPP
#define CAF_LOGGING_HPP
#include <thread>
#include <cstring>
#include <sstream>
#include <iostream>
......@@ -28,6 +27,7 @@
#include <unordered_map>
#include "caf/config.hpp"
#include "caf/thread.hpp"
#include "caf/to_string.hpp"
#include "caf/abstract_actor.hpp"
......@@ -97,7 +97,7 @@ class logging {
private:
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 {
......
......@@ -484,7 +484,7 @@ void local_actor::launch(execution_unit* eu, bool lazy, bool hide) {
scheduler::inc_detached_threads();
}
//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_LOGF_TRACE("");
auto max_throughput = std::numeric_limits<size_t>::max();
......
......@@ -197,7 +197,7 @@ logging* logging::create_singleton() {
// returns the actor ID for the current thread
actor_id logging::get_aid() {
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()) {
return i->second;
}
......@@ -205,7 +205,7 @@ actor_id logging::get_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};
auto i = m_aids.find(tid);
if (i != m_aids.end()) {
......
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