00001 #include <stdlib.h> 00002 #include <free_align.h> 00003 #include <stdio.h> 00004 #include <spu_mfcio.h> 00005 00006 #include <internal/spu/imoc_core_spu.h> 00007 #include <internal/imoc.h> 00008 #include <spu/moc.h> 00009 00010 int MOC_Finalize(void) 00011 { 00012 spu_write_out_mbox(node_handle.rank); 00013 while (spu_stat_in_mbox() < 1) 00014 ; 00015 extern moc_internal_buffer_node_t* bmalloc_first_node; 00016 /* free local resources */ 00017 _free_align((void*) node_handle.message_queue_base); 00018 _free_align((void*) node_handle.status_array_base); 00019 _free_align((void*) node_handle.moc_process_list); 00020 while (bmalloc_first_node) 00021 { 00022 moc_internal_buffer_node_t* temp = bmalloc_first_node; 00023 bmalloc_first_node = bmalloc_first_node->next_node; 00024 free(temp); 00025 } 00026 return 0; 00027 } 00028
1.5.6