- xbt_os_thread_t thread_ = nullptr;
- /** Semaphore used to schedule/yield the process */
- xbt_os_sem_t begin_ = nullptr;
- /** Semaphore used to schedule/unschedule */
- xbt_os_sem_t end_ = nullptr;
+ std::thread* thread_ = nullptr;
+ /** Semaphore used to schedule/yield the actor (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) */
+ xbt::OsSemaphore end_{0};
+ bool is_maestro_;
+
+ void start(); // match a call to release()
+ void yield(); // match a call to yield()
+ virtual void start_hook() { /* empty placeholder, called after start(). Used in parallel mode and Java */}
+ 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 */}