The C11 thrd_yield() interface should return void. Also, it doesn't need
to do anything in our model-checker for now. I'm leaving its
implementation commented out for now, in case we find it helps for
fairness, for instance. Note that I made its location parameter non-NULL
now, too, so that we can identify the Thread, if we ever use it.
int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
int thrd_join(thrd_t);
int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
int thrd_join(thrd_t);
thrd_t thrd_current(void);
int user_main(int, char**);
thrd_t thrd_current(void);
int user_main(int, char**);
+/** A no-op, for now */
+void thrd_yield(void)
- /* seq_cst is just a 'don't care' parameter */
- return model->switch_to_master(new ModelAction(THREAD_YIELD, std::memory_order_seq_cst, NULL, VALUE_NONE));
+ //model->switch_to_master(new ModelAction(THREAD_YIELD, std::memory_order_seq_cst, thread_current(), VALUE_NONE));
}
thrd_t thrd_current(void)
}
thrd_t thrd_current(void)