Mateusz Szafoni

Results 29 comments of Mateusz Szafoni

I think I know what's going on. I set breakpoint in `arm_svcall,` which is triggered when pthread is interrupted. What I found is that pthread is waiting for semaphore in...

The problem is that both main and pthread belong to the same task group and therefore share the same `struct filelist tg_filelist` in `struct task_group_s`: https://github.com/apache/incubator-nuttx/blob/dd70d29d4e919c47951926b34c5dc88785592e6f/include/nuttx/sched.h#L546-L549 There is a chance...

I don't think that splitted Kconfig is a good idea at the moment. STM32 ports are already a complete mess, the maintenance and keeping changes between STM32 ports in sync...

> And I don't really think there will be any order in stm32 ports :) There are too much small changes between chips, even stm32wl5 which is supposed to be...

Priority inheritance has no effect here. This is a classic [readers-writers problem](https://en.wikipedia.org/wiki/Readers%E2%80%93writers_problem) where we have many readers with concurrent access to task group data. rwlock is the correct solution here.

@pkarashchenko here is the context to this issue: https://lists.apache.org/thread/g7n5hvb2d33mqdf21v5j9hqtcthol9wk A brief summary of what I remember: 1. we have 2 threads that share task group data: a. `L`- low priority...

> Just for my understanding, what if the timer (or any other peripheral) interrupt happens right after H is awakened and executing a control code? That will lead to two...

Protecting this line with a critical section fixed the problem for FOC from what I remember: https://github.com/apache/nuttx/blob/dd70d29d4e919c47951926b34c5dc88785592e6f/fs/inode/fs_files.c#L378 The question is, would replacing `_files_semtake` with a critical section not be enough?...