Re: Task sync problems related with binary semaphore and cache memories

2018-11-28 Thread Sebastian Huber
On 28/11/2018 11:52, Arturo Perez Garcia wrote: Yes, I'm checking the return status always. When I create the RTEMS objects and when I acquire/release the semaphore. I removed those checks from the code I put in the previous message. Ok, good. Thanks. El 2018-11-28 11:42, Sebastian Huber e

Re: Task sync problems related with binary semaphore and cache memories

2018-11-28 Thread Arturo Perez Garcia
Yes, I'm checking the return status always. When I create the RTEMS objects and when I acquire/release the semaphore. I removed those checks from the code I put in the previous message. Thanks. El 2018-11-28 11:42, Sebastian Huber escribió: On 28/11/2018 11:30, Arturo Perez Garcia wrote: Dis

Re: Task sync problems related with binary semaphore and cache memories

2018-11-28 Thread Sebastian Huber
On 28/11/2018 11:30, Arturo Perez Garcia wrote: Disabling the caches don't fixe the problem, I was wrong. Maybe I'm initializing wrongly the RTEMS objects. In the Init task I create the binary semaphore:    rtems_semaphore_create(a3_sem_name, 1, RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO | RTEMS

Re: Task sync problems related with binary semaphore and cache memories

2018-11-28 Thread Arturo Perez Garcia
Disabling the caches don't fixe the problem, I was wrong. Maybe I'm initializing wrongly the RTEMS objects. In the Init task I create the binary semaphore: rtems_semaphore_create(a3_sem_name, 1, RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO | RTEMS_LOCAL, 0, &a3_sem_id); Then I create 2 tasks w

Re: Task sync problems related with binary semaphore and cache memories

2018-11-28 Thread Arturo Perez Garcia
RTEMS is running in the R5 processors in lockstep mode, hence it is not an SMP configuration. Thanks. El 2018-11-27 14:45, Sebastian Huber escribió: On 27/11/2018 13:23, Arturo Perez Garcia wrote: Hi, I have been facing thread synchronization problems. I was trying to synchronize two threads

Re: Task sync problems related with binary semaphore and cache memories

2018-11-27 Thread Sebastian Huber
On 27/11/2018 13:23, Arturo Perez Garcia wrote: Hi, I have been facing thread synchronization problems. I was trying to synchronize two threads using a binary semaphore to protect critical parts of the code. Today I realized that the semaphore was been acquired sequentially by both threads bef

Task sync problems related with binary semaphore and cache memories

2018-11-27 Thread Arturo Perez Garcia
Hi, I have been facing thread synchronization problems. I was trying to synchronize two threads using a binary semaphore to protect critical parts of the code. Today I realized that the semaphore was been acquired sequentially by both threads before It was released by any of them. This behavio