projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
544dab6
)
fix code to be 64 bit clean
author
Brian Demsky
<bdemsky@uci.edu>
Mon, 21 May 2012 06:20:43 +0000
(23:20 -0700)
committer
Brian Demsky
<bdemsky@uci.edu>
Mon, 21 May 2012 06:20:43 +0000
(23:20 -0700)
threads.cc
patch
|
blob
|
history
diff --git
a/threads.cc
b/threads.cc
index 99297749a800987b48a157570daf0820aeb5715d..0ed7bdcabc084eabf0755c8df098b724d3c023c4 100644
(file)
--- a/
threads.cc
+++ b/
threads.cc
@@
-1,3
+1,5
@@
+/* -*- Mode: C; indent-tabs-mode: t -*- */
+
#include "libthreads.h"
#include "common.h"
#include "threads.h"
#include "libthreads.h"
#include "common.h"
#include "threads.h"
@@
-22,6
+24,13
@@
Thread * thread_current(void)
return model->scheduler->get_current_thread();
}
return model->scheduler->get_current_thread();
}
+/* This method just gets around makecontext not being 64-bit clean */
+
+void thread_startup() {
+ Thread * curr_thread=thread_current();
+ curr_thread->start_routine(curr_thread->arg);
+}
+
int Thread::create_context()
{
int ret;
int Thread::create_context()
{
int ret;
@@
-36,7
+45,7
@@
int Thread::create_context()
context.uc_stack.ss_size = STACK_SIZE;
context.uc_stack.ss_flags = 0;
context.uc_link = model->get_system_context();
context.uc_stack.ss_size = STACK_SIZE;
context.uc_stack.ss_flags = 0;
context.uc_link = model->get_system_context();
- makecontext(&context, start_routine, 1
, arg
);
+ makecontext(&context, start_routine, 1);
return 0;
}
return 0;
}
@@
-61,7
+70,6
@@
void Thread::complete()
}
}
}
}
-
Thread::Thread(thrd_t *t, void (*func)(), void *a) {
int ret;
Thread::Thread(thrd_t *t, void (*func)(), void *a) {
int ret;