Permalink
Browse files

stable

  • Loading branch information...
grantborthwick committed Oct 5, 2012
1 parent 081463d commit 53dbb3bcbeecf8bef0dca997b333be84ace9f858
Showing with 2 additions and 3 deletions.
  1. +1 −1 src/tests/threads/alarm-negative.c
  2. +1 −2 src/threads/thread.c
@@ -25,7 +25,7 @@ test_alarm_negative (void)
wake_time = timer_ticks () + 5 * TIMER_FREQ;
sema_init (&wait_sema, 0);
for (i = 27; i<37; ++i){
- ++j; ++j;
+ j += 2;
char name[16];
snprintf (name, sizeof name, "priority %d", i-20);
thread_create(name,i-20, alarm_priority_thread, NULL);
View
@@ -370,7 +370,6 @@ thread_foreach (thread_action_func *func, void *aux)
void
thread_set_priority (int new_priority)
{
- //todo check if lower than any ready thread.
thread_current ()->priority = new_priority;
thread_check_yield ();
}
@@ -380,7 +379,7 @@ int
thread_get_priority (void)
{
//todo recursive with list or number check
- return thread_current ()->priority;
+ return thread_current ()->priority;
}
/* Sets the current thread's nice value to NICE. */

0 comments on commit 53dbb3b

Please sign in to comment.