diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-19 14:55:24 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-19 14:55:24 +0000 |
commit | 712726d3df9965ddf15e9e9d61af79268a453e3a (patch) | |
tree | cecf989ca45babe0c7be421f22d91480064790b7 /testsuites/psxtests/psx07/task.c | |
parent | 2009-08-18 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-712726d3df9965ddf15e9e9d61af79268a453e3a.tar.bz2 |
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.
Diffstat (limited to 'testsuites/psxtests/psx07/task.c')
-rw-r--r-- | testsuites/psxtests/psx07/task.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx07/task.c b/testsuites/psxtests/psx07/task.c index 417eb5bdfc..281436f500 100644 --- a/testsuites/psxtests/psx07/task.c +++ b/testsuites/psxtests/psx07/task.c @@ -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; +} |