Hi Alan,

I'm tried enable the CONFIG_PRIORITY_INHERITANCE and the problem remains, 
thanks for your reply


Best regard
Zou 
 
------------------ Original ------------------
From: &nbsp;"Alan&nbsp;Carvalho&nbsp;de&nbsp;Assis"<acas...@gmail.com&gt;;
Date: &nbsp;Sun, Mar 27, 2022 10:11 PM
To: &nbsp;"dev"<dev@nuttx.apache.org&gt;; 

Subject: &nbsp;Re: usleep can't wake up incidentally in tickless mode

&nbsp;

Zou,

just a think that passed on my mind:

try to enable the CONFIG_PRIORITY_INHERITANCE and let us know if the
issue will happen again in this case.

BR,

Alan

On 3/27/22, Alan Carvalho de Assis <acas...@gmail.com&gt; wrote:
&gt; Hi Zou,
&gt;
&gt; Is there some way to identify that thread A didn't wake up and create
&gt; some unity test to report and to analyze it?
&gt;
&gt; Maybe there is some very specific race condition that we never saw before.
&gt;
&gt; BR,
&gt;
&gt; Alan
&gt;
&gt; On 3/27/22, fft <f...@feedforward.com.cn&gt; wrote:
&gt;&gt; Hi team,
&gt;&gt;
&gt;&gt;
&gt;&gt; I've been puzzled by a strange problem for a long time, when i use
&gt;&gt; tickless
&gt;&gt; OS mode on stm32f405, usleep can't wake up incidentally.
&gt;&gt;
&gt;&gt; My config about tickless OS mode as shown below:
&gt;&gt;
&gt;&gt;
&gt;&gt; CONFIG_ARCH_HAVE_TICKLESS=y
&gt;&gt; CONFIG_SCHED_TICKLESS=y
&gt;&gt; # CONFIG_SCHED_TICKLESS_ALARM is not set
&gt;&gt; # CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP is not set
&gt;&gt; CONFIG_USEC_PER_TICK=10
&gt;&gt;
&gt;&gt; # CONFIG_STM32_TICKLESS_SYSTICK is not set
&gt;&gt;
&gt;&gt; CONFIG_STM32_TICKLESS_TIMER=2
&gt;&gt; CONFIG_STM32_TICKLESS_CHANNEL=1
&gt;&gt;
&gt;&gt;
&gt;&gt; When use usleep(1000) in a pthread A, then thread A maybe sporadic 
sleep
&gt;&gt; dead and can't be wake up, the probability is about 1/100000.
&gt;&gt; Moreover, when the problem happened, if i execute usleep 10000 in NSH
&gt;&gt; terminus, then thread A will wakeup. Is my configuration incorrect?
&gt;&gt;
&gt;&gt; Does anyone else have the same problem?
&gt;&gt;
&gt;&gt;
&gt;&gt; Best regard
&gt;&gt; Zou
&gt;

Reply via email to