A comprehensive overhaul on the thread library.

Lots of polishing, organizational changes, bug fixes, error handling etc. are
introduced.

COPY and NEW space thread creation are allowed but not thoroughly tested yet. It
seems they will work best if the lib supports utcb virtual range management
through the mapping.
This commit is contained in:
Bora Sahin
2009-11-12 22:29:41 +02:00
parent 9763296ddc
commit 58959d5fb0
11 changed files with 177 additions and 131 deletions

View File

@@ -1,19 +1,19 @@
/*
* Stack region helper routines.
* Stack space helper routines.
*
* Copyright (C) 2009 B Labs Ltd.
*/
#ifndef __LIB_STACK_H__
#define __LIB_STACK_H__
/* Symbolic constants and macros */
/* Checks if l4_set_stack_params is called. */
#define IS_STACK_SETUP() (lib_stack_size)
int stack_pool_init(unsigned long stack_start,
unsigned long stack_end,
unsigned long stack_size);
void *get_stack_space(int nitems, int size);
int delete_stack_space(void *stack_address, int nitems, int size);
void *get_stack_space(void);
int delete_stack_space(void *stack_address);
#endif /* __LIB_STACK_H__ */