Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#2726 closed defect (fixed)

grascs.c: Questionable use of binary semaphore

Reported by: Sebastian Huber Owned by: Daniel Hellstrom
Priority: normal Milestone: 5.1
Component: arch/sparc Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

Use a simple binary semaphore or binary semaphore with inherit priority instead.

c/src/lib/libbsp/sparc/shared/ascs/grascs.c-    
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-  /* Create semaphores for blocking ASCS_TC/TM functions */
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-  if(rtems_semaphore_create(rtems_build_name('A','S','C','0'),1,
c/src/lib/libbsp/sparc/shared/ascs/grascs.c:                        (RTEMS_FIFO|RTEMS_BINARY_SEMAPHORE|
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-                         RTEMS_NO_INHERIT_PRIORITY|RTEMS_LOCAL|
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-                         RTEMS_NO_PRIORITY_CEILING), 0,
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-                        &cfg->tcsem1) != RTEMS_SUCCESSFUL) {
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-    goto init_error2;
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-  }
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-  if(rtems_semaphore_create(rtems_build_name('A','S','C','2'),0,
c/src/lib/libbsp/sparc/shared/ascs/grascs.c:                        (RTEMS_FIFO|RTEMS_BINARY_SEMAPHORE|
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-                         RTEMS_NO_INHERIT_PRIORITY|RTEMS_LOCAL|
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-                         RTEMS_NO_PRIORITY_CEILING), 0,
c/src/lib/libbsp/sparc/shared/ascs/grascs.c-                        &cfg->tcsem2) != RTEMS_SUCCESSFUL) {

Change History (5)

comment:1 Changed on 05/11/17 at 07:31:02 by Sebastian Huber

Milestone: 4.124.12.0

comment:2 Changed on 08/14/17 at 00:49:08 by Chris Johns

Version: 4.104.12

comment:3 Changed on 08/30/17 at 10:41:43 by Daniel Hellstrom

Resolution: fixed
Status: newclosed

comment:4 Changed on 10/10/17 at 06:53:06 by Sebastian Huber

Component: bspsarch/sparc

comment:5 Changed on 11/09/17 at 06:27:14 by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

Note: See TracTickets for help on using tickets.