#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 May 11, 2017 at 7:31:02 AM by Sebastian Huber

Milestone: 4.124.12.0

comment:2 Changed on Aug 14, 2017 at 12:49:08 AM by Chris Johns

Version: 4.104.12

comment:3 Changed on Aug 30, 2017 at 10:41:43 AM by Daniel Hellstrom

Resolution: fixed
Status: newclosed

comment:4 Changed on Oct 10, 2017 at 6:53:06 AM by Sebastian Huber

Component: bspsarch/sparc

comment:5 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

Note: See TracTickets for help on using tickets.