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

Valentin Hauner <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.