XBT:
- Remove xbt_os_thread_specific features
- Remove portability wrapper to condition variables
+ - Remove xbt_os_thread_yield()
Fixed bugs:
- #264: Add ptask L07 resource tracing
XBT_PUBLIC void* xbt_os_thread_get_extra_data(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_yield(void);
XBT_PUBLIC void xbt_os_thread_setstacksize(int stack_size);
XBT_PUBLIC void xbt_os_thread_setguardsize(int guard_size);
XBT_PUBLIC int xbt_os_thread_bind(xbt_os_thread_t thread, int core);
#include <boost/optional.hpp>
#include <condition_variable>
#include <mutex>
+#include <thread>
#if HAVE_FUTEX_H
#include <linux/futex.h>
template <typename T> void Parmap<T>::BusyWaitSynchro::master_wait()
{
while (__atomic_load_n(&this->parmap.thread_counter, __ATOMIC_SEQ_CST) < this->parmap.num_workers) {
- xbt_os_thread_yield();
+ std::this_thread::yield();
}
}
{
/* wait for more work */
while (__atomic_load_n(&this->parmap.work_round, __ATOMIC_SEQ_CST) != round) {
- xbt_os_thread_yield();
+ std::this_thread::yield();
}
}
return pthread_getspecific(xbt_self_thread_key);
}
-#include <sched.h>
-void xbt_os_thread_yield(void)
-{
- sched_yield();
-}
-
/****** mutex related functions ******/
typedef struct xbt_os_mutex_ {
pthread_mutex_t m;