uwx_env.c (121642) | uwx_env.c (129059) |
---|---|
1/* 2Copyright (c) 2003 Hewlett-Packard Development Company, L.P. 3Permission is hereby granted, free of charge, to any person 4obtaining a copy of this software and associated documentation 5files (the "Software"), to deal in the Software without 6restriction, including without limitation the rights to use, 7copy, modify, merge, publish, distribute, sublicense, and/or sell 8copies of the Software, and to permit persons to whom the --- 10 unchanged lines hidden (view full) --- 19HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22OTHER DEALINGS IN THE SOFTWARE. 23*/ 24 25#ifndef _KERNEL 26#include <stdlib.h> | 1/* 2Copyright (c) 2003 Hewlett-Packard Development Company, L.P. 3Permission is hereby granted, free of charge, to any person 4obtaining a copy of this software and associated documentation 5files (the "Software"), to deal in the Software without 6restriction, including without limitation the rights to use, 7copy, modify, merge, publish, distribute, sublicense, and/or sell 8copies of the Software, and to permit persons to whom the --- 10 unchanged lines hidden (view full) --- 19HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22OTHER DEALINGS IN THE SOFTWARE. 23*/ 24 25#ifndef _KERNEL 26#include <stdlib.h> |
27#else 28#define free(p) /* nullified */ 29#define malloc(sz) NULL | |
30#endif 31 32#include "uwx_env.h" 33#include "uwx_scoreboard.h" 34#include "uwx_str.h" 35#include "uwx_trace.h" 36 | 27#endif 28 29#include "uwx_env.h" 30#include "uwx_scoreboard.h" 31#include "uwx_str.h" 32#include "uwx_trace.h" 33 |
34#ifdef _KERNEL 35static struct uwx_env uwx_env; 36#define free(p) /* nullified */ 37#define malloc(sz) ((sz == sizeof(uwx_env)) ? &uwx_env : NULL) 38#endif 39 |
|
37alloc_cb uwx_allocate_cb = 0; 38free_cb uwx_free_cb = 0; 39 40int uwx_register_alloc_cb(alloc_cb alloc, free_cb free) 41{ 42 uwx_allocate_cb = alloc; 43 uwx_free_cb = free; 44 return UWX_OK; --- 38 unchanged lines hidden (view full) --- 83 env->context.gr[i] = 0; 84 for (i = 0; i < NPRESERVEDBR; i++) 85 env->context.br[i] = 0; 86 for (i = 0; i < NPRESERVEDFR; i++) { 87 env->context.fr[i].part0 = 0; 88 env->context.fr[i].part1 = 0; 89 } 90 env->rstate = 0; | 40alloc_cb uwx_allocate_cb = 0; 41free_cb uwx_free_cb = 0; 42 43int uwx_register_alloc_cb(alloc_cb alloc, free_cb free) 44{ 45 uwx_allocate_cb = alloc; 46 uwx_free_cb = free; 47 return UWX_OK; --- 38 unchanged lines hidden (view full) --- 86 env->context.gr[i] = 0; 87 for (i = 0; i < NPRESERVEDBR; i++) 88 env->context.br[i] = 0; 89 for (i = 0; i < NPRESERVEDFR; i++) { 90 env->context.fr[i].part0 = 0; 91 env->context.fr[i].part1 = 0; 92 } 93 env->rstate = 0; |
94 env->remapped_ip = 0; |
|
91 env->function_offset = 0; 92 (void)uwx_init_history(env); 93 env->allocate_cb = uwx_allocate_cb; 94 env->free_cb = uwx_free_cb; 95 env->free_scoreboards = 0; 96 env->used_scoreboards = 0; 97 env->labeled_scoreboards = 0; 98 (void)uwx_init_str_pool(env); --- 72 unchanged lines hidden --- | 95 env->function_offset = 0; 96 (void)uwx_init_history(env); 97 env->allocate_cb = uwx_allocate_cb; 98 env->free_cb = uwx_free_cb; 99 env->free_scoreboards = 0; 100 env->used_scoreboards = 0; 101 env->labeled_scoreboards = 0; 102 (void)uwx_init_str_pool(env); --- 72 unchanged lines hidden --- |