mirror of
https://github.com/drasko/codezero.git
synced 2026-02-02 05:03:14 +01:00
Stack recycling is added to the thread library.
Still, it does not support thread trees which have more than one level depth.
This commit is contained in:
@@ -21,7 +21,7 @@ int address_pool_init_with_idpool(struct address_pool *pool,
|
||||
int address_pool_init(struct address_pool *pool,
|
||||
unsigned long start, unsigned long end,
|
||||
int size);
|
||||
void *address_new(struct address_pool *pool, int npages);
|
||||
int address_del(struct address_pool *, void *addr, int npages);
|
||||
void *address_new(struct address_pool *pool, int nitems, int size);
|
||||
int address_del(struct address_pool *, void *addr, int nitems, int size);
|
||||
|
||||
#endif /* __ADDR_H__ */
|
||||
|
||||
16
conts/libl4thread/include/l4thread/stack.h
Normal file
16
conts/libl4thread/include/l4thread/stack.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Stack region helper routines.
|
||||
*
|
||||
* Copyright (C) 2009 B Labs Ltd.
|
||||
*/
|
||||
#ifndef __LIB_STACK_H__
|
||||
#define __LIB_STACK_H__
|
||||
|
||||
int stack_pool_init(unsigned long stack_start,
|
||||
unsigned long stack_end,
|
||||
unsigned long stack_size);
|
||||
|
||||
void *stack_new_space(int nitems, int size);
|
||||
int stack_delete_space(void *stack_address, int nitems, int size);
|
||||
|
||||
#endif /* __LIB_STACK_H__ */
|
||||
@@ -19,6 +19,7 @@ struct l4t_tcb {
|
||||
int tid;
|
||||
struct utcb_head *utcb_head;
|
||||
unsigned long utcb_addr;
|
||||
unsigned long stack_addr;
|
||||
};
|
||||
|
||||
/* This struct keeps track of all the threads handled by the thread lib. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* UTCB handling common helper routines
|
||||
* UTCB handling common helper routines.
|
||||
*
|
||||
* Copyright (C) 2009 B Labs Ltd.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user