About the reasons for setting the timer-internal thread with the THREADOBJ_IRQCONTEXT flag.

孙世龙 sunshilong sunshilong369 at gmail.com
Tue Sep 1 11:11:43 CEST 2020


Hi,

I found that the timer-internal thread is set with the
THREADOBJ_IRQCONTEXT flag.
Here is the related code snippet:
static int server_prologue(void *arg)
{
   svpid = get_thread_pid();
   copperplate_set_current_name("timer-internal");
   timersv_init_corespec();
   threadobj_set_current(THREADOBJ_IRQCONTEXT);

   return 0;
}

Could you please tell me the reasons for setting the timer-internal
thread with the THREADOBJ_IRQCONTEXT flag.

What are the potential problems if not setting this flag?
(I want to make it possible to call rt_task_sleep in the callback
function of the timer which is created by rt_alarm_create.)

Thank you for your attention to this matter.
Best regards
Sunshilong



More information about the Xenomai mailing list