Permalink
Browse files

yield 1

  • Loading branch information...
1 parent 915813e commit d1b10d5e7c33ac73f07260d710ad0bb7eca62922 @grantborthwick committed Oct 4, 2012
Showing with 184 additions and 139 deletions.
  1. +1 −1 src/threads/thread.c
  2. +183 −138 src/threads/thread.c~
@@ -251,7 +251,7 @@ thread_unblock (struct thread *t)
ASSERT (t->status == THREAD_BLOCKED);
list_push_back (&ready_list, &t->elem);
t->status = THREAD_READY;
- //printf("(%s - %d, %s - %d)",(thread_current ()->name), (thread_current ()->priority),(t->name),(t->priority));
+ printf("(%s - %d, %s - %d)",(thread_current ()->name), (thread_current ()->priority),(t->name),(t->priority));
if ((thread_current ()->priority) < (t->priority)){/*printf(" => Should yield.\n");*/ /*thread_yield();*/ /*printf("Back.\n");*/}
else{/*printf(" => Did not yield\n");*/}
/*struct list_elem* e;
Oops, something went wrong.

0 comments on commit d1b10d5

Please sign in to comment.