[PATCH 1/3] smpschedaffinity02: Change semaphore attributes.

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Nov 13 07:20:53 UTC 2014


On 12/11/14 17:17, Jennifer Averett wrote:
>
>> >-----Original Message-----
>> >From: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de]
>> >Sent: Wednesday, November 12, 2014 9:16 AM
>> >To: Jennifer Averett;rtems-devel at rtems.org
>> >Subject: Re: [PATCH 1/3] smpschedaffinity02: Change semaphore attributes.
>> >
>> >On 12/11/14 15:48, Jennifer Averett wrote:
>>> > >Change semaphore attributes to prevent semaphore from being locked
>> >and
>>> > >never released upon a context switch.
>>> > >---
>>> > >   testsuites/smptests/smpschedaffinity02/init.c | 7 ++-----
>>> > >   1 file changed, 2 insertions(+), 5 deletions(-)
>>> > >
>>> > >diff --git a/testsuites/smptests/smpschedaffinity02/init.c
>>> > >b/testsuites/smptests/smpschedaffinity02/init.c
>>> > >index a3e0ddf..43efc99 100644
>>> > >--- a/testsuites/smptests/smpschedaffinity02/init.c
>>> > >+++ b/testsuites/smptests/smpschedaffinity02/init.c
>>> > >@@ -140,11 +140,8 @@ static void test(void)
>>> > >     sc = rtems_semaphore_create(
>>> > >       rtems_build_name('S', 'E', 'M', '0'),
>>> > >       1,
>>> > >-    RTEMS_LOCAL                   |
>>> > >-    RTEMS_SIMPLE_BINARY_SEMAPHORE |
>>> > >-    RTEMS_NO_INHERIT_PRIORITY     |
>>> > >-    RTEMS_NO_PRIORITY_CEILING     |
>>> > >-    RTEMS_FIFO,
>>> > >+    RTEMS_BINARY_SEMAPHORE |
>>> > >+    RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
>>> > >       0,
>>> > >       &task_sem
>>> > >     );
>> >
>> >Why do you use RTEMS_MULTIPROCESSOR_RESOURCE_SHARING here?
> It just needed to use a binary instead of a simple binary.  I think it could also
> have been resolved with the following settings:
>
> RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY
>

The MrsP semaphores are broken with the affinity scheduler.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list