Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

stable

  • Loading branch information...
commit 0daf54cdfeb2177fad29f322d2ba6573fedfd723 1 parent 9977001
@grantborthwick authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/tests/threads/alarm-negative.c
View
5 src/tests/threads/alarm-negative.c
@@ -28,8 +28,9 @@ test_alarm_negative (void)
++j;
char name[16];
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_yield();
}
@@ -64,7 +65,7 @@ alarm_priority_thread (void *aux UNUSED)
{
//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);
Please sign in to comment.
Something went wrong with that request. Please try again.