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
Yes, if you #define RTEMS_SMP you can use the MrsP protocol (for example) by calling rtems_semaphore_create with an attribute set containing RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE | RTEMS_MULTIPROCESSOR_RESOURCE_SHARING. You can then use rtems_semaphore_obtain, rtems_semaphore_release , r