Track Program_Counter(PC)/regs of L4Linux Task

Adam Lackorzynski adam at
Fri Dec 16 19:14:10 CET 2005

On Fri Dec 16, 2005 at 01:42:25 -0500, Julian Grizzard wrote:
> Okay, so let me back up a minute from trying to understand all of these
> items at the same time.  What I would like to understand first is what
> are the main threads for the L4Linux server.  Based on your feedback and
> some further analysis, here is what I believe are the main threads:
> Thread 0 - l4env initialization, then sleeps

Regionmanager thread.

> Thread 1 - ??

Semaphore thread.

> Thread 2 - runs "main" to get the L4Linux server going, then sleeps


> Thread 3 - runs "l4env_linux_startup" function, then sleeps

No, thread 3 does all the work. l4env_linux_startup() calls
start_kernel() at the bottom!

> until told that L4Linux is exiting
> Thread 4 - Timer interrupt thread, handles the periodic timer for linux
>    the entry functions for thread 4 are:
>    timer_irq_thread --- the main handler
>    l4lx_irq_timer_startup --- gets timer_irq_thread started
>    l4lx_irq_timer_shutdown
>    l4lx_irq_timer_enable
>    l4lx_irq_timer_disable
>    l4lx_irq_timer_ack
>    l4lx_irq_timer_end

Yup, thread 4 is the timer.

> Additional threads >= 5, one for each IRQ (virtual not implemented yet)

virtual not implemented yet?

>    the entry functions for these threads are
>    irq_dev_thread --- the main handler
>    l4lx_irq_dev_startup_hw  --- gets irq_dev_thread started
>    l4lx_irq_dev_shutdown_hw
>    l4lx_irq_dev_enable_hw
>    l4lx_irq_dev_disable_hw
>    l4lx_irq_dev_ack_hw
>    l4lx_irq_dev_end_hw
>    l4lx_irq_dev_startup_virt
>    l4lx_irq_dev_shutdown_virt
>    l4lx_irq_dev_enable_virt
>    l4lx_irq_dev_disable_virt
>    l4lx_irq_dev_ack_virt
>    l4lx_irq_dev_end_virt

Not only irq threads but also all other threads that may be allocated by
stubs etc.

> Anything wrong with that description?  What does thread 1 do?  I can't
> seem to track it down.

All l4env apps have thread0 (region manager thread) and thread1
(semaphore), real work starts in thread2.

> Also, which thread is responsible for handling
> system calls?

thread3, it actually runs the Linux kernel.

> Is that what thread 1 does maybe?  Which L4Linux function
> does the system call handler function start?

Maybe you mean l4x_user_dispatcher()?

Adam                 adam at

More information about the l4-hackers mailing list