Support multi-threading in the Patmos Platform - #582
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to add multi-threaded runtime support for the Patmos platform by introducing Patmos implementations of the LF threading/synchronization abstractions when LF_SINGLE_THREADED is not defined.
Changes:
- Added a Patmos “threaded” branch in
lf_patmos_support.cwith implementations for threads, mutexes, and condition variables. - Added Patmos platform typedefs for
lf_thread_t,lf_mutex_t, andlf_cond_tunder!LF_SINGLE_THREADED.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| low_level_platform/impl/src/lf_patmos_support.c | Adds Patmos-side threaded implementations (threads/mutex/cond) and related helpers under #else of LF_SINGLE_THREADED. |
| low_level_platform/api/platform/lf_patmos_support.h | Introduces threaded Patmos typedefs and includes <pthread.h> when !LF_SINGLE_THREADED. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
edwardalee
left a comment
There was a problem hiding this comment.
Looks to me like the Copilot suggestions need to be addressed.
|
As you address issues raised by Copilot, please record a brief comment on how the issue was addressed and mark the comment "Resolved". |
…e LF_SINGLE_THREADED branch in lf_patmos_support_c
… hook so interrupt nesting stays allocation-free and thread-safe.
@edwardalee I addressed all Copilot's issues. I feel it is now ready for your review. |
edwardalee
left a comment
There was a problem hiding this comment.
Looks OK to me, except it looks like the call to _lf_patmos_global_lock_acquire should be implemented in the Patmos-specific implementation of lf_disable_interrupts_nested rather than conditionally called in lf_atomic_irq.c.
Thank you for your review, @edwardalee, and sorry for my delayed answer. I added Can we implement these functions in a separate file, named |
Is |
Thank you for your feedback, @edwardalee , I edited my PR in 6dc4221, so we have no changes in |
No description provided.