Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix getopt for BSD systems
[simgrid.git] / src / smpi / include / smpi_actor.hpp
index 1314d4b..97d4d2b 100644 (file)
@@ -15,10 +15,9 @@ namespace simgrid {
 namespace smpi {
 
 class ActorExt {
-private:
   double simulated_ = 0 /* Used to time with simulated_start/elapsed */;
-  s4u::MailboxPtr mailbox_;
-  s4u::MailboxPtr mailbox_small_;
+  s4u::Mailbox* mailbox_;
+  s4u::Mailbox* mailbox_small_;
   s4u::MutexPtr mailboxes_mutex_;
   xbt_os_timer_t timer_;
   MPI_Comm comm_self_   = MPI_COMM_NULL;
@@ -32,7 +31,7 @@ private:
   smpi_trace_call_location_t trace_call_loc_;
   s4u::ActorPtr actor_                           = nullptr;
   smpi_privatization_region_t privatized_region_ = nullptr;
-  int optind                                     = 0; /*for getopt replacement */
+  int optind                                     = 1; /*for getopt replacement */
   std::string tracing_category_                  = "";
 
 #if HAVE_PAPI
@@ -41,7 +40,7 @@ private:
   papi_counter_t papi_counter_data_;
 #endif
 public:
-  explicit ActorExt(simgrid::s4u::ActorPtr actor, simgrid::s4u::Barrier* barrier);
+  explicit ActorExt(s4u::ActorPtr actor, s4u::Barrier* barrier);
   ActorExt(const ActorExt&) = delete;
   ActorExt& operator=(const ActorExt&) = delete;
   ~ActorExt();
@@ -58,8 +57,8 @@ public:
   smpi_trace_call_location_t* call_location();
   void set_privatized_region(smpi_privatization_region_t region);
   smpi_privatization_region_t privatized_region();
-  s4u::MailboxPtr mailbox() { return mailbox_; }
-  s4u::MailboxPtr mailbox_small() { return mailbox_small_; }
+  s4u::Mailbox* mailbox() { return mailbox_; }
+  s4u::Mailbox* mailbox_small() { return mailbox_small_; }
   s4u::MutexPtr mailboxes_mutex();
 #if HAVE_PAPI
   int papi_event_set();
@@ -75,7 +74,7 @@ public:
   void set_sampling(int s);
   int sampling();
   static void init();
-  simgrid::s4u::ActorPtr get_actor();
+  s4u::ActorPtr get_actor();
   int get_optind();
   void set_optind(int optind);
 };