MEGATRON



LOG | FILES | OVERVIEW


F diff --git a/src/backend/targets/C/ast_to_c.c b/src/backend/targets/C/ast_to_c.c --- a/src/backend/targets/C/ast_to_c.c +++ b/src/backend/targets/C/ast_to_c.c
}
if(options->providing_own_buffer_implementation)
{
- fprintf(out, "extern machine_buffer_t* get_machine_buffer(void *content,size_t size);\n");
+ fprintf(out, "//extern machine_buffer_t* get_machine_buffer(void *content,size_t size);\n");
fprintf(out, "\nextern void delete_machine_buffer(machine_buffer_t *buffer);\n");
}
if(options->has_mutex)
if(options->providing_own_buffer_implementation)
{
- fprintf(out,"typedef struct machine_buffer_t machine_buffer_t\t\n");
+ fprintf(out,"typedef struct machine_buffer_t machine_buffer_t;\n");
}else
{
ast_print_machine_buffer_declarations(out);
context_arrow="context->";
global="";
fprintf(out, "void machine_context_init(machine_context_t *context)\n{\n\tcontext->machine_queue=(struct machine_queue_t){ .first=NULL,.last=NULL,.size=0};\n");
+ fprintf(out, "\tcontext->machine_states_lock=0;\n");
for(which_machine=0;which_machine<translation_unit->number_of_machines;++which_machine)
{
fprintf(out,"\tcontext->machine_states[%zu]=",which_machine);
"\tit COPIES the contents of content \n"
"\tsize is in bytes"
);
+
fprintf(out,"extern machine_buffer_t* get_machine_buffer(void *content,size_t size);\n\n");
ast_to_c_print_comment(out,"\tfrees the buffer from the heap");
fprintf(out,"extern void delete_machine_buffer(machine_buffer_t *buffer);\n\n");