Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Actor::create already does init->start.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 11 Oct 2022 12:50:14 +0000 (14:50 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 11 Oct 2022 13:15:57 +0000 (15:15 +0200)
examples/sthread/pthread-mutex-simple.tesh
src/sthread/sthread_impl.cpp

index 1dd09bd..29d66a9 100644 (file)
@@ -1,7 +1,7 @@
 $ env ASAN_OPTIONS=verify_asan_link_order=0:$ASAN_OPTIONS LD_PRELOAD=${libdir:=.}/libsthread.so ./pthread-mutex-simple
 > [0.000000] [sthread/INFO] Starting the simulation.
-> The thread 0 is terminating.
 > All threads are started.
+> The thread 0 is terminating.
 > The thread 1 is terminating.
 > User's main is terminating.
 > [0.000000] [sthread/INFO] All threads exited. Terminating the simulation.
index 7721982..9eb1a91 100644 (file)
@@ -83,8 +83,7 @@ int sthread_create(unsigned long int* thread, const void* /*pthread_attr_t* attr
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 #endif
   std::string name    = simgrid::xbt::string_printf("%d:%d", rank, TID);
-  sg4::ActorPtr actor = sg4::Actor::init(name.c_str(), lilibeth);
-  actor->start(thread_create_wrapper, start_routine, arg);
+  sg4::ActorPtr actor = sg4::Actor::create(name, lilibeth, thread_create_wrapper, start_routine, arg);
 
   intrusive_ptr_add_ref(actor.get());
   *thread = reinterpret_cast<unsigned long>(actor.get());