Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use real pointer type for context wrappers.
[simgrid.git] / src / kernel / context / ContextThread.hpp
index 6f6125a..22e3814 100644 (file)
@@ -21,6 +21,8 @@ namespace context {
 class XBT_PUBLIC ThreadContext : public AttachContext {
 public:
   ThreadContext(std::function<void()> code, smx_actor_t actor, bool maestro);
+  ThreadContext(const ThreadContext&) = delete;
+  ThreadContext& operator=(const ThreadContext&) = delete;
   ~ThreadContext() override;
   void stop() override;
   void suspend() override;
@@ -46,7 +48,7 @@ private:
   virtual void yield_hook() { /* empty placeholder, called before yield(). Used in parallel mode */}
   virtual void stop_hook() { /* empty placeholder, called at stop(). Used in Java */}
 
-  static void* wrapper(void *param);
+  static void wrapper(ThreadContext* context);
 };
 
 class XBT_PUBLIC SerialThreadContext : public ThreadContext {
@@ -80,6 +82,8 @@ private:
 class ThreadContextFactory : public ContextFactory {
 public:
   ThreadContextFactory();
+  ThreadContextFactory(const ThreadContextFactory&) = delete;
+  ThreadContextFactory& operator=(const ThreadContextFactory&) = delete;
   ~ThreadContextFactory() override;
   ThreadContext* create_context(std::function<void()> code, smx_actor_t actor) override
   {