blob: c9a705ae7a03f8d5a9d01e8bc9050f4fb8a2cc85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#
# Verify we select the oldest task at a priority
#
rtems_init 4
task_create smp1 8
task_create smp2 8
task_create smp3 8
task_create smp4 8
# GOAL: Tasks 0x0a010001 - 0x0a010004 as heir and executing
# GOAL: on CPUs 3 - 0 respectively
cpus smp4 smp3 smp2 smp1
# sem1 is binary semaphore (e.g. mutex) with priority ceiling of 5
semaphore_create -b -p -C 5 -V 1 sem1
cpus smp4 smp3 smp2 smp1
semaphore_obtain sem1 0
# This should show smp4 has inherited a priority of 5
cpus smp4 smp3 smp2 smp1
semaphore_release sem1
# This should show smp1 has its original priority of 8
cpus smp4 smp3 smp2 smp1
|