forked from Imagelibrary/rtems
New ideas on test incorporated.
This commit is contained in:
@@ -2,18 +2,26 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
|
||||||
This test should be for rtems_semaphore_flush. It will be something like:
|
This test will be for rtems_semaphore_flush once it is written.
|
||||||
|
|
||||||
|
To avoid scheduling problems in the printout, it would be better to
|
||||||
|
have the test program:
|
||||||
|
|
||||||
|
volatile int bFlag, cFlag;
|
||||||
|
|
||||||
TaskA:
|
TaskA:
|
||||||
create semaphore with initial count 0
|
create semaphore with initial count 0
|
||||||
start taskB and TaskC (Higher priority than taskA, no round-robin)
|
start taskB and TaskC (Higher priority than taskA, no
|
||||||
print message
|
round-robin)
|
||||||
semaphore_flush
|
print bFlag, cFlag (should both be 0)
|
||||||
|
semaphore_flush
|
||||||
|
print bFlag, cFlag (should both be 1)
|
||||||
|
|
||||||
TaskB/C:
|
TaskB/C:
|
||||||
obtain semaphore
|
obtain semaphore
|
||||||
print message
|
set flag (B or C as appropriate)
|
||||||
suspend/delete self
|
suspend/delete self
|
||||||
|
|
||||||
Successful test would show message from both tasks B and C after the
|
Successful test would show message from both tasks B and C after the
|
||||||
message from task A.
|
message from task A.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user