}
Thread::Thread(thrd_t *t, void (*func)(void *), void *a) :
+ start_routine(func),
+ arg(a),
+ user_thread(t),
+ state(THREAD_CREATED),
last_action_val(VALUE_NONE)
{
int ret;
- user_thread = t;
- start_routine = func;
- arg = a;
-
/* Initialize state */
ret = create_context();
if (ret)
printf("Error in create_context\n");
- state = THREAD_CREATED;
id = model->get_next_id();
*user_thread = id;
parent = thread_current();