-/* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2019. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/xbt/OsSemaphore.hpp"
#include "xbt/xbt_os_thread.h"
+#include <thread>
+
namespace simgrid {
namespace kernel {
namespace context {
private:
/** A portable thread */
- xbt_os_thread_t thread_ = nullptr;
+ std::thread* thread_ = nullptr;
/** Semaphore used to schedule/yield the process (not needed when the maestro is in main, but harmless then) */
xbt::OsSemaphore begin_{0};
/** Semaphore used to schedule/unschedule (not needed when the maestro is in main, but harmless then) */
return create_context(std::move(code), cleanup_func, process, maestro);
}
void run_all() override;
- ThreadContext* self() override { return static_cast<ThreadContext*>(xbt_os_thread_get_extra_data()); }
// Optional methods:
ThreadContext* attach(void_pfn_smxprocess_t cleanup_func, smx_actor_t process) override