[PATCH] leon,grascs: fix semaphore policies

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Aug 25 11:54:58 UTC 2017



On 25/08/17 13:51, Daniel Hellstrom wrote:
> Closes #2726
> ---
>   c/src/lib/libbsp/sparc/shared/ascs/grascs.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/c/src/lib/libbsp/sparc/shared/ascs/grascs.c b/c/src/lib/libbsp/sparc/shared/ascs/grascs.c
> index bc09159..d078e59 100644
> --- a/c/src/lib/libbsp/sparc/shared/ascs/grascs.c
> +++ b/c/src/lib/libbsp/sparc/shared/ascs/grascs.c
> @@ -209,22 +209,23 @@ int ASCS_init(void) {
>     /* Create semaphores for blocking ASCS_TC/TM functions */
>     if(rtems_semaphore_create(rtems_build_name('A','S','C','0'),1,
>   			    (RTEMS_FIFO|RTEMS_BINARY_SEMAPHORE|
> -			     RTEMS_NO_INHERIT_PRIORITY|RTEMS_LOCAL|
> +			     RTEMS_INHERIT_PRIORITY|RTEMS_LOCAL|

RTEMS_INHERIT_PRIORITY with RTEMS_FIFO makes no sense. I guess it would be a run-time error.


>   			     RTEMS_NO_PRIORITY_CEILING), 0,
>   			    &cfg->tcsem1) != RTEMS_SUCCESSFUL) {
>       DBG("ASCS_init: Failed to create semaphore ASC0\n");
>       goto init_error2;
>     }
>     if(rtems_semaphore_create(rtems_build_name('A','S','C','1'),1,
> -			    (RTEMS_FIFO|RTEMS_SIMPLE_BINARY_SEMAPHORE|
> -			     RTEMS_NO_INHERIT_PRIORITY|RTEMS_LOCAL|
> +			    (RTEMS_FIFO|RTEMS_BINARY_SEMAPHORE|
> +			     RTEMS_INHERIT_PRIORITY|RTEMS_LOCAL|
>   			     RTEMS_NO_PRIORITY_CEILING), 0,
>   			    &cfg->tmsem1) != RTEMS_SUCCESSFUL) {
>       DBG("ASCS_init: Failed to create semaphore ASC1\n");
>       goto init_error2;
>     }
> +  /* Create semaphores for waiting on ASCS_TC/TM interrupt */
>     if(rtems_semaphore_create(rtems_build_name('A','S','C','2'),0,
> -			    (RTEMS_FIFO|RTEMS_BINARY_SEMAPHORE|
> +			    (RTEMS_FIFO|RTEMS_SIMPLE_BINARY_SEMAPHORE|
>   			     RTEMS_NO_INHERIT_PRIORITY|RTEMS_LOCAL|
>   			     RTEMS_NO_PRIORITY_CEILING), 0,
>   			    &cfg->tcsem2) != RTEMS_SUCCESSFUL) {

-- 
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