A fix and a helper macro for the thread library.

The fix solves the problem of giving the last slice from a pool.

The helper macro makes utcb space creation easy for the user because we have to
consider a few things like alignment and total allocated space.
This commit is contained in:
Bora Sahin
2009-11-16 21:49:37 +02:00
parent 7fb923cd35
commit 682c62f8bb
2 changed files with 5 additions and 2 deletions

View File

@@ -6,6 +6,10 @@
#ifndef __LIB_THREAD_H__
#define __LIB_THREAD_H__
/* A helper macro easing utcb space creation. */
#define DECLARE_UTCB_SPACE(name, entries) \
char name[(entries + PAGE_SIZE / UTCB_SIZE) * UTCB_SIZE] ALIGN(PAGE_SIZE);
int l4_set_stack_params(unsigned long stack_top,
unsigned long stack_bottom,
unsigned long stack_size);