OsSemaphore is implemented in a portable way with C++11 threads.
This should allow much more threads to be created at the same time,
allowing Mac and Java users to simulate many more actors.
+ - Drop several unused xbt_os_thread_t functions:
+ - xbt_os_thread_get_extra_data()
+ - xbt_os_thread_set_extra_data()
+ - xbt_os_thread_self_name()
Fixed bugs:
- #261: Document the parameters of parallel execution's constructor
XBT_PUBLIC void xbt_os_thread_exit(int* retcode);
XBT_PUBLIC xbt_os_thread_t xbt_os_thread_self(void);
-XBT_PUBLIC const char* xbt_os_thread_self_name(void);
/* xbt_os_thread_join frees the joined thread (ie the XBT wrapper around it, the OS frees the rest) */
XBT_PUBLIC void xbt_os_thread_join(xbt_os_thread_t thread, void** thread_return);
XBT_PUBLIC void xbt_os_thread_setstacksize(int stack_size);
#include "simgrid/s4u/Actor.hpp"
#include "src/kernel/context/Context.hpp"
#include "src/simix/ActorImpl.hpp"
-#include <xbt/xbt_os_thread.h>
#include <boost/intrusive/list.hpp>
#include <mutex>
#endif
}
-const char *xbt_os_thread_self_name(void)
-{
- xbt_os_thread_t me = xbt_os_thread_self();
- return me ? (const char *)me->name : "main";
-}
-
void xbt_os_thread_join(xbt_os_thread_t thread, void **thread_return)
{
int errcode = pthread_join(thread->t, thread_return);