one question about l4_thread_ex_regs flags
Guanghui, Cheng
cheng.guanghui.ml at gmail.com
Sat Aug 22 19:24:24 CEST 2009
Hello:
About the l4_thread_ex_regs system call there are 2 flags related with
exception ipc. I only know the thread with these flags could generate the
exception ipc but i don't know what is the difference between these flags:
L4_THREAD_EX_REGS_RAISE_EXCEPTION , L4_THREAD_EX_REGS_ALIEN and
L4_THREAD_EX_REGS_ALIEN | L4_THREAD_EX_REGS_ALIEN.
So, i write a following program to test the behaviour with different flags :
void idle(void *data)
{
l4_sleep(1000);
l4_sleep(1000);
l4_sleep(1000);
l4_sleep(1000);
l4_sleep(1000);
}
int main()
{
...
l4_threadid_t me = l4_myself();
l4thread_create(idle, NULL, L4THREAD_CREATE_ASYNC);
...
l4_thread_ex_regs_flags(idle_thread, ~0UL, ~0UL,
&_preempter, &me,
&o, &o, &o,
L4_THREAD_EX_REGS_RAISE_EXCEPTION
| L4_THREAD_EX_REGS_ALIEN);
while(1)
{
l4_ipc_wait(&src, ...);
printf("thread :%d:%d\n", src.id.task, src.id.lthread);
}
}
I tried 3 combination about these 2 flags but the output is the same as this:
exceptio| thread :8:3
i don't know why there is only one exception ipc. But the idle function
includes 5 system calls. Additionally, it seems the ALIEN state is
TEMPORARILY. I set once there is one exception ipc, twice two exception ipc.
Can you explain me?
Thanks.
Cheng Guanghui
More information about the l4-hackers
mailing list