Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Johnson, Andrew N.
On Sep 28, 2021, at 5:02 AM, Sebastian Huber mailto:sebastian.hu...@embedded-brains.de>> wrote: On 28/09/2021 11:46, Heinz Junkes wrote: Unfortunately we found out that EPICS uses the mutex handling also in the interrupt context and this leads to core-dumps in RTEMS :-( Yes, using any kind of

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Sebastian Huber
On 28/09/2021 17:11, Johnson, Andrew N. wrote: sc = rtems_semaphore_create (rtems_build_name ('B', c3, c2, c1),     initialState,     RTEMS_FIFO | RTEMS_SIMPLE_BINARY_SEMAPHORE |         RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL, 0,     &sid); We will want to use the

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Sebastian Huber
On 28/09/2021 12:24, Heinz Junkes wrote: in EPICS osdMutex the semaphore is created like this: sc = rtems_semaphore_create (rtems_build_name ('M', c3, c2, c1), 1, RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0,

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Heinz Junkes
Yes, Andrew is absolutely right. I unfortunately got the two things mutex vs. event mixed up in the rush. Sorry for that. Viele Grüße Heinz > On 28. Sep 2021, at 17:11, Johnson, Andrew N. wrote: > > On Sep 28, 2021, at 5:02 AM, Sebastian Huber > wrote: >> >> On 28/09/2021 11:46, Heinz Ju

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Heinz Junkes
Hallo Sebastian, in EPICS osdMutex the semaphore is created like this: sc = rtems_semaphore_create (rtems_build_name ('M', c3, c2, c1), 1, RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, &sid); if (sc != R

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Sebastian Huber
On 28/09/2021 11:46, Heinz Junkes wrote: Unfortunately we found out that EPICS uses the mutex handling also in the interrupt context and this leads to core-dumps in RTEMS :-( Yes, using any kind of mutexes in interrupt context is undefined behaviour. Mutexes may only be used from threads. W

Re: [EXTERNAL] Re: rtems_semaphore routines on SMP systems

2021-09-27 Thread Sebastian Huber
Hello Michel, On 27/09/2021 18:59, Michel, John M wrote: Could you clarify what you mean by "concurrent use and deletion of a semaphore object is undefined behaviour on SMP systems". sorry for being so unclear. What I meant is using the semaphore (obtain or release) in one thread and deletin

Re: rtems_semaphore routines on SMP systems

2021-09-27 Thread Sebastian Huber
Hello Heinz, On 25/09/2021 12:23, Heinz Junkes wrote: Can the rtems_semaphore_*() routines be used on SMP systems? all the rtems_semaphore_*() routines can be used on SMP systems. However, concurrent use and deletion of a semaphore object is undefined behaviour on SMP systems. -- embedded

Re: rtems_semaphore routines on SMP systems

2021-09-25 Thread andrew.butterfi...@scss.tcd.ie
on behalf of Heinz Junkes Date: Saturday 25 September 2021 at 11:23 To: Rtems users Subject: rtems_semaphore routines on SMP systems Can the rtems_semaphore_*() routines be used on SMP systems? Viele Grüße Heinz ___ users mai

rtems_semaphore routines on SMP systems

2021-09-25 Thread Heinz Junkes
Can the rtems_semaphore_*() routines be used on SMP systems? Viele Grüße Heinz ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users