Article: LoRaWAN on NuttX

2022-01-02 Thread Lee, Lup Yuen
This article explains how I ported Semtech's LoRaWAN Stack to NuttX. Have
an awesome 2022! :-)

https://lupyuen.github.io/articles/lorawan3

Lup


Re: question about design of priority inheritance

2022-01-02 Thread Gregory Nutt
a As for the priority inversion avoidance test, both NuttX
> and ChibiOS passed. However, with NuttX, we found that
> there is no priority inheritance implemented for threads
> blocked on a mutex but only on a binary semaphore.
>

This is completely untrue.  Certainly priority inheritance is supported on
pthread mutexes (provided that you enable that option using the standard
POSIX interfaces.

In NuttX, pthread mutexes are designed on top of binary semaphores so any
feature supported by binary semaphores is also supported by pthread mutexes.


question about design of priority inheritance

2022-01-02 Thread xyluo
Hello, sorry to trouble you. This week I found a conference paper named "
Which Is the Best Real-Time Operating System for Drones? Evaluation of the 
Real-Time Characteristics of NuttX and ChibiOS", published in 2021, in this 
paper nuttx9.0 and chibios are compared and analysed.As for the priority 
inversion avoidance test, chapter V stated as follows:'''As for the 
priority inversion avoidance test, both NuttX
and ChibiOS passed. However, with NuttX, we found that
there is no priority inheritance implemented for threads
blocked on a mutex but only on a binary semaphore. By
replacing the mutex in the test with a binary semaphore
(with the initial counter = 1), the priority inheritance works
perfectly. This problem is not explained in any official
documents of NuttX but should be known by the application
designer. It is probably because mutexes were introduced
later to the POSIX RT extensions and NuttX did not change
its implementation of priority inversion avoidance algorithm
to a mutex-based one. This misuse of binary semaphores on
priority inheritance may cause confusions for NuttX users
and possibly lead to wrong designs 
''I have compared nuttx9.0 and nuttx10.2.0, and found 
that CONFIG_PRIORITY_INHERITANCE had been support  in pthread_mutex_init since 
nuttx9.0. But why this paper get the conclusion that there is no priority 
inheritance implemented for threads blocked on a mutex? who can help explain 
this? Thanks very much.