Mercurial > repos > rhope
comparison runtime/context.c @ 186:ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Oct 2011 00:10:02 -0700 |
parents | 7bbdc034e347 |
children |
comparison
equal
deleted
inserted
replaced
185:4580c08fd4e8 | 186:ba35ab624ec2 |
---|---|
2 #include "object.h" | 2 #include "object.h" |
3 #include "thread.h" | 3 #include "thread.h" |
4 #include <stdlib.h> | 4 #include <stdlib.h> |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 | |
8 #ifndef RAW_FUNC | |
7 | 9 |
8 context * contextqueue[32]; | 10 context * contextqueue[32]; |
9 int32_t cq_readloc=0; | 11 int32_t cq_readloc=0; |
10 int32_t cq_writeloc=0; | 12 int32_t cq_writeloc=0; |
11 rh_mutex(cq_lock) | 13 rh_mutex(cq_lock) |
124 } | 126 } |
125 ct->current_stack->free_space = data; | 127 ct->current_stack->free_space = data; |
126 if(ct->current_stack->free_space == ct->current_stack->data && ct->current_stack->prev) | 128 if(ct->current_stack->free_space == ct->current_stack->data && ct->current_stack->prev) |
127 ct->current_stack = ct->current_stack->prev; | 129 ct->current_stack = ct->current_stack->prev; |
128 } | 130 } |
131 #endif | |
129 | 132 |