samples: Add task statistics and semaphore samples - #43
Open
Aditya-abs397 wants to merge 2 commits into
Open
Conversation
Adds new sample for implementation of task statistics, os_task_get_stats is used to pull live scheduler data, and polled UART transmission is used to print it without depending on interrupts. Part of vedantmalkar#15 Signed-off-by: Aditya Salunke <adisalunke07@gmail.com>
Adds a sample for semaphore, with 4 priority-tiered tasks sharing a resource capped at 2 concurrent users, proving priority-based access ordering with mutex protected logging. Signed-off-by: Aditya Salunke <adisalunke07@gmail.com>
Aditya-abs397
force-pushed
the
samples/samples_sem_stats
branch
from
July 27, 2026 20:40
86f47ae to
885fd40
Compare
Contributor
Author
|
Worked on suggested changes. |
Owner
|
pinging @mt-tass |
Contributor
|
@Aditya-abs397 did you test this on board ? |
Contributor
Author
|
@mt-tass I haven't tested it on board yet, will make sure to do it before tomorrow |
Contributor
|
@Aditya-abs397 updates ? |
Contributor
Author
|
@mt-tass Tested both samples on stm32 discovery board, its working sem.implementation.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds two new samples (
samples/statsandsamples/sem) demonstrating AstraRTOS's task statistics and the counting semaphore implementation for a resource with limited concurrent access.What it does
Task statistics sample (
samples/stats)Semaphore sample (
samples/sem)Testing
Verified both samples on QEMU
Semaphore sample output:

Task statistics sample output:
Related
Part of #15