And now we have working thread demo container.

This commit is contained in:
Amit Mahajan
2009-12-09 12:05:06 +05:30
parent b106aa902f
commit 57f157c4a5
4 changed files with 10 additions and 3 deletions

View File

@@ -14,9 +14,13 @@ struct l4_thread_struct {
/* -- Bora start -- */
/* A helper macro easing utcb space creation. */
/*
* A helper macro easing utcb space creation,
* FIXME: We need to fix address allocation path, so as to use
* actual size of units instead of page size
*/
#define DECLARE_UTCB_SPACE(name, entries) \
char name[(entries + PAGE_SIZE / UTCB_SIZE) * UTCB_SIZE] ALIGN(PAGE_SIZE);
char name[entries * PAGE_SIZE] ALIGN(PAGE_SIZE);
int l4_set_stack_params(unsigned long stack_top,
unsigned long stack_bottom,

View File

@@ -26,7 +26,7 @@ int address_pool_init(struct address_pool *pool,
unsigned long start, unsigned long end,
unsigned int size)
{
if ((pool->idpool = id_pool_new_init(__pfn(end - start) / size)) < 0)
if ((pool->idpool = id_pool_new_init(__pfn(end - start) )) < 0)
return (int)pool->idpool;
pool->start = start;
pool->end = end;

View File

@@ -7,6 +7,7 @@
#include <l4lib/addr.h>
#include <l4lib/thread/utcb-common.h>
#include <malloc/malloc.h>
#include INC_GLUE(message.h)
/* Globally disjoint utcb virtual region pool */
static struct address_pool utcb_region_pool;

View File

@@ -130,6 +130,7 @@ int l4_set_utcb_params(unsigned long utcb_start, unsigned long utcb_end)
"than utcb start address.\n");
return -EINVAL;
}
#if 0
/*
* This check guarantees two things:
* 1. The range must be multiple of UTCB_SIZE, at least one item.
@@ -140,6 +141,7 @@ int l4_set_utcb_params(unsigned long utcb_start, unsigned long utcb_end)
"of the utcb size(%d).\n", UTCB_SIZE);
return -EINVAL;
}
#endif
/* Arguments passed the validity tests. */
/* Init utcb virtual address pool. */