Files
codezero/conts/libl4thread/include/l4thread/utcb.h
Bora Sahin 55af5c83cb The second step in creating a thread library.
Utcb support has beed added. It has the same drawback as in the stack support:
the area in questen has to be already mapped-in. There is some basic
infrastructure for utcb to support mapping but it is far from being complete.
MAPPING_ENABLE symbolic constant controls this behaviour.

There are also some minor fixes for the stack support and the utcb common helper
routines.
2009-11-05 13:51:22 +02:00

42 lines
854 B
C

/*
* UTCB handling helper routines
*
* Copyright (C) 2009 B Labs Ltd.
*/
#ifndef __LIB_UTCB_H__
#define __LIB_UTCB_H__
#include "utcb-common.h"
#define UTCB_START_ADDR(utcb) ((unsigned long)(utcb))
#define UTCB_END_ADDR(utcb) \
((unsigned long)((utcb) + (sizeof(utcb))))
int set_utcb_params(unsigned long utcb_start_addr,
unsigned long utcb_end_addr);
//#define MAPPING_ENABLE
#if defined(MAPPING_ENABLE)
#define IS_UTCB_SETUP() (utcb_table_ptr)
struct utcb_entry *utcb_table_ptr;
struct utcb_entry {
struct utcb_desc *udesc;
unsigned long utcb_phys_base;
};
unsigned long get_utcb_addr(struct task_ids *parent_id, struct task_ids *child_id);
#else /* !MAPPING_ENABLE */
#define IS_UTCB_SETUP() (udesc_ptr)
struct utcb_desc *udesc_ptr;
unsigned long get_utcb_addr(void);
#endif /* MAPPING_ENABLE */
#endif /* __LIB_UTCB_H__ */