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,     ); 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

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, ); if (sc !=

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.