projects
/
c11tester.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Eliminate system context
[c11tester.git]
/
pthread.cc
diff --git
a/pthread.cc
b/pthread.cc
index f5ce1bcf514e23c7a3e3b4e3f8facd82fa8b6ce2..e95fb37a3c9b079599b19ca90dd9f00d74fd66b3 100644
(file)
--- a/
pthread.cc
+++ b/
pthread.cc
@@
-25,7
+25,7
@@
int pthread_create(pthread_t *t, const pthread_attr_t * attr,
struct pthread_params params = { start_routine, arg };
/* seq_cst is just a 'don't care' parameter */
struct pthread_params params = { start_routine, arg };
/* seq_cst is just a 'don't care' parameter */
- model->switch_t
o_master
(new ModelAction(PTHREAD_CREATE, std::memory_order_seq_cst, t, (uint64_t)¶ms));
+ model->switch_t
hread
(new ModelAction(PTHREAD_CREATE, std::memory_order_seq_cst, t, (uint64_t)¶ms));
return 0;
}
return 0;
}
@@
-34,7
+34,7
@@
int pthread_join(pthread_t t, void **value_ptr) {
ModelExecution *execution = model->get_execution();
Thread *th = execution->get_pthread(t);
ModelExecution *execution = model->get_execution();
Thread *th = execution->get_pthread(t);
- model->switch_t
o_master
(new ModelAction(PTHREAD_JOIN, std::memory_order_seq_cst, th, id_to_int(th->get_id())));
+ model->switch_t
hread
(new ModelAction(PTHREAD_JOIN, std::memory_order_seq_cst, th, id_to_int(th->get_id())));
if ( value_ptr ) {
// store return value
if ( value_ptr ) {
// store return value
@@
-59,7
+59,7
@@
int sched_yield() {
void pthread_exit(void *value_ptr) {
Thread * th = thread_current();
th->set_pthread_return(value_ptr);
void pthread_exit(void *value_ptr) {
Thread * th = thread_current();
th->set_pthread_return(value_ptr);
- model->switch_t
o_master
(new ModelAction(THREADONLY_FINISH, std::memory_order_seq_cst, th));
+ model->switch_t
hread
(new ModelAction(THREADONLY_FINISH, std::memory_order_seq_cst, th));
//Need to exit so we don't return to the program
real_pthread_exit(NULL);
}
//Need to exit so we don't return to the program
real_pthread_exit(NULL);
}