Mercurial > repos > rhope
comparison runtime/context.h @ 67:d1569087348f
Some small optimizations
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 07 Jun 2010 01:15:16 -0400 |
parents | d4b44ae2e34a |
children | a68e6828d896 |
comparison
equal
deleted
inserted
replaced
66:d4b44ae2e34a | 67:d1569087348f |
---|---|
3 | 3 |
4 #include "thread.h" | 4 #include "thread.h" |
5 #include "plat_types.h" | 5 #include "plat_types.h" |
6 #include "func.h" | 6 #include "func.h" |
7 | 7 |
8 #define STACK_CHUNK_SIZE 4096-(sizeof(struct stackchunk *)*2+sizeof(uint32_t)) | 8 #define STACK_CHUNK_SIZE 4096-(sizeof(struct stackchunk *)*2+sizeof(char *)) |
9 | 9 |
10 typedef struct stackchunk { | 10 typedef struct stackchunk { |
11 struct stackchunk * next; | 11 struct stackchunk * next; |
12 struct stackchunk * prev; | 12 struct stackchunk * prev; |
13 uint32_t used; | 13 char *free_space; |
14 char data[STACK_CHUNK_SIZE]; | 14 char data[STACK_CHUNK_SIZE]; |
15 } stackchunk; | 15 } stackchunk; |
16 | 16 |
17 typedef struct context { | 17 typedef struct context { |
18 stackchunk *stack_begin; | 18 stackchunk *stack_begin; |