mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 17:17:38 +00:00
thread: rearrange thread context management
Use a bit allocator for the allocation management of thread contexts, instead of holding allocation information within the Thread_base objects, which lead to race conditions in the past. Moreover, extend the Thread_base class interface with the ability to to add additional stacks to a thread, and associate the context they're located in with the corresponding Thread_base object. Additional stacks can be used to do user-level scheduling with stack switching, without breaking Genode's API. Fixes #1024 Fixes #1036
This commit is contained in:
committed by
Christian Helmuth
parent
66c5887bd3
commit
5447c406e5
38
base-foc/include/x86/base/native_config.h
Normal file
38
base-foc/include/x86/base/native_config.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* \brief Platform-specific context area definitions
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2014-01-24
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__BASE__NATIVE_CONFIG_H_
|
||||
#define _INCLUDE__BASE__NATIVE_CONFIG_H_
|
||||
|
||||
#include <base/stdint.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
struct Native_config
|
||||
{
|
||||
/**
|
||||
* Thread-context area configuration
|
||||
*/
|
||||
static constexpr addr_t context_area_virtual_base() {
|
||||
return 0x40000000UL; }
|
||||
static constexpr addr_t context_area_virtual_size() {
|
||||
return 0x10000000UL; }
|
||||
|
||||
/**
|
||||
* Size of virtual address region holding the context of one thread
|
||||
*/
|
||||
static constexpr addr_t context_virtual_size() { return 0x00100000UL; }
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__BASE__NATIVE_CONFIG_H_ */
|
Reference in New Issue
Block a user