l4/sys/syscalls.h: No such file or directory

Valentin Hauner valentinhauner at gmx.de
Tue Sep 16 16:22:25 CEST 2014


Hi,

On 09/16/2014 03:54 PM, Björn Döbel wrote:
> Just to be sure: How large is this per-thread stack? Are you properly
> aligning it to page boundaries?
Adam suggested to give it a size of 2000 * l4_umword_t
(THREAD_STACK_SIZE is set to 2000) in his mail from September 3th, so
I'm using the following code:

> thread_stack[count] = malloc(THREAD_STACK_SIZE * sizeof(l4_umword_t));
> // For x86-32, the arguments of functions are passed via the stack
> thread_stack[count][THREAD_STACK_SIZE - 1] = (l4_umword_t)t->arg;
> thread_stack[count][THREAD_STACK_SIZE - 2] = 0;
> // ...
> l4_touch_rw(thread_stack[count], sizeof(thread_stack[count]));
> // ...
> l4_thread_ex_regs(t->cap,
>                                 (l4_umword_t)t->func,
>                                
(l4_umword_t)&thread_stack[count][THREAD_STACK_SIZE - 2], 0);


Header of the thread function:

> void thread_func(l4_umword_t data) { /* ... */ }


That's the whole stack-relevant code in my library. With one task for
all threads only, everything works.

Best regards,
Valentin




More information about the l4-hackers mailing list