2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>

* psx07/init.c, psx07/psx07.scn, psx07/system.h, psx07/task.c: Update
	test to reflect not allowing poriority changes when mutex is locked.
This commit is contained in:
Joel Sherrill
2009-08-19 14:55:24 +00:00
parent 3a12177645
commit 712726d3df
5 changed files with 112 additions and 1 deletions

View File

@@ -31,3 +31,36 @@ void *Task_1(
return NULL; /* just so the compiler thinks we returned something */
}
void *Task_2(
void *argument
)
{
int i = 0;
time_t now, start;
/*
* Change our priority so we are running at a logically higher
* priority than our "ss_high_priority". This should result in
* our replenishment period not touching our priority.
*/
/*
* Consume time so the cpu budget callout will run.
*
* DO NOT BLOCK!!!
*/
start = time(&start);
while( i <= 10 ) {
do {
now = time(&now);
} while (start == now);
start = time(&start);
printf( "Time elapsed Task_2: %2d (seconds)\n", i++ );
}
puts( "Task_2 - exitting" );
pthread_exit( NULL );
return NULL;
}