Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Commit

Permalink
stable
Browse files Browse the repository at this point in the history
  • Loading branch information
grantborthwick committed Oct 5, 2012
1 parent 9977001 commit 0daf54c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tests/threads/alarm-negative.c
Expand Up @@ -28,8 +28,9 @@ test_alarm_negative (void)
++j; ++j;
char name[16]; char name[16];
snprintf (name, sizeof name, "priority %d", i); snprintf (name, sizeof name, "priority %d", i);

thread_create(name,i-20, alarm_priority_thread, NULL);
thread_create(name,i, alarm_priority_thread, NULL); thread_create(name,i, alarm_priority_thread, NULL);
thread_yield();
} }




Expand Down Expand Up @@ -64,7 +65,7 @@ alarm_priority_thread (void *aux UNUSED)
{ {


//sema_down (&wait_sema); //sema_down (&wait_sema);
printf ("Thread %s here!.\n", thread_name ()); printf ("(%d)Thread %s here!.\n", (thread_current ()->priority) , thread_name ());
sema_up(&wait_sema); sema_up(&wait_sema);


//sema_up (&wait_sema); //sema_up (&wait_sema);
Expand Down

0 comments on commit 0daf54c

Please sign in to comment.