Files
codezero/conts/libl4thread/include/l4thread/thread.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

22 lines
534 B
C

/*
* Thread creation userspace helpers
*
* Copyright (C) 2009 B Labs Ltd.
*/
#ifndef __LIB_THREAD_H__
#define __LIB_THREAD_H__
#include "utcb.h"
#define STACK_TOP_ADDR(stack) ((unsigned long)(stack))
#define STACK_BOTTOM_ADDR(stack) \
((unsigned long)((stack) + (sizeof(stack))))
int set_stack_params(unsigned long stack_top_addr,
unsigned long stack_bottom_addr,
unsigned long stack_size);
int thread_create(struct task_ids *ids, unsigned int flags,
int (*func)(void *), void *arg);
#endif /* __LIB_THREAD_H__ */