2 * (c) Copyright 1990-1996 OPEN SOFTWARE FOUNDATION, INC.
3 * (c) Copyright 1990-1996 HEWLETT-PACKARD COMPANY
4 * (c) Copyright 1990-1996 DIGITAL EQUIPMENT CORPORATION
5 * (c) Copyright 1991, 1992 Siemens-Nixdorf Information Systems
6 * To anyone who acknowledges that this file is provided "AS IS" without
7 * any express or implied warranty: permission to use, copy, modify, and
8 * distribute this file for any purpose is hereby granted without fee,
9 * provided that the above copyright notices and this notice appears in
10 * all source code copies, and that none of the names listed above be used
11 * in advertising or publicity pertaining to distribution of the software
12 * without specific, written prior permission. None of these organizations
13 * makes any representations about the suitability of this software for
17 * Header file for stack management
26 #include <cma_tcb_defs.h>
29 #include <cma_queue.h>
30 #include <cma_stack_int.h>
33 * CONSTANTS AND MACROS
36 #if _CMA_UNIPROCESSOR_
37 # define cma__get_self_tcb() (cma__g_current_thread)
41 * Round the given value (a) upto cma__g_chunk_size
43 #define cma__roundup_chunksize(a) (cma__roundup(a,cma__g_chunk_size))
53 extern cma__t_list cma__g_stack_clusters
;
54 extern cma__t_int_tcb
*cma__g_current_thread
;
55 extern cma_t_integer cma__g_chunk_size
;
61 extern void cma__assign_stack (cma__t_int_stack
*,cma__t_int_tcb
*);
63 extern void cma__free_stack (cma__t_int_stack
*);
65 extern void cma__free_stack_list (cma__t_queue
*);
67 #if !_CMA_UNIPROCESSOR_
68 extern cma__t_int_tcb
* cma__get_self_tcb (void);
71 extern cma__t_int_tcb
* cma__get_sp_tcb (cma_t_address
);
73 extern cma__t_int_stack
* cma__get_stack (cma__t_int_attr
*);
75 extern void cma__init_stack (void);
77 extern void cma__reinit_stack (cma_t_integer
);
79 #if _CMA_PROTECT_MEMORY_
80 extern void cma__remap_stack_holes (void);