To prevent re-entry
在 2013-06-01 18:16:15,"Gilles Chanteperdrix" <[email protected]> 
写道:
>On 06/01/2013 10:41 AM, 嵌入式工程师 wrote:
>
>> I have try the kernal-3.4.6 with ipipe-core-3.4.6-arm-4.patch 
>> when I set three same Priority tasks I found untill the tasks stop ,the 
>> interrut founction will not run.
>> It same like before version kernal-2.6.35.9 with  
>> ipipe-core-2.6.35.9-arm-4.patch
>> 
>> 
>> static int test_thread(void *data)
>> {
>>      //phase=ctrl_mnm1221_m();
>>      while(1)
>>      {
>>      if(flag)
>>      {
>>              printk("runting %lld\n",tt3);
>>              flag=0;
>>              }
>>      SLEEP_MILLI_SEC(50);
>> 
>>      }
>>      return 0;
>> }
>> 
>> int irq_handle_function(int irq, void *device_id)
>> {
>>      //if(phase==PH_RUNNING)
>>      //ctrl_mnm1221_m();
>>      rt_intr_disable(&amp;intr_desc);
>>      tt1=rt_timer_read();
>>      tt3=tt1-tt2;
>>      if(tt3&gt;300000)
>>      flag=1;
>>      tt2=tt1;
>>      rt_intr_enable(&amp;intr_desc);
>>      return RT_INTR_HANDLED;;
>> }
>
>
>Why do you disable/enable the irq during the irq handler?
>
>
>-- 
>                                                                Gilles.


_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to