[PATCH] leon,grascs: fix semaphore policies

Daniel Hellstrom daniel at gaisler.com
Fri Aug 25 11:51:25 UTC 2017


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_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) {
-- 
2.7.4




More information about the devel mailing list