diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 02:29:14 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 02:29:14 +0100 |
commit | 6b1444aa3918382aba127c16c671f045a3586e53 (patch) | |
tree | 08b6b1e55383d63ba4e5824071620a35f737925c /src/salis.c | |
parent | 2250b4db92bd272dbb1fd717eb791e293c17e37a (diff) |
Common pipe replaced with sender/receiver functors.
[#27] C library now only takes care of relaying data to/from functors,
which must be provided by the wrapping application (in this case, a
new python module named 'common.py').
Diffstat (limited to 'src/salis.c')
-rw-r--r-- | src/salis.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/salis.c b/src/salis.c index 1aae1fa..32a14b8 100644 --- a/src/salis.c +++ b/src/salis.c @@ -7,14 +7,13 @@ static boolean g_is_init; static uint32 g_cycle; static uint32 g_epoch; -void sal_main_init(uint32 order, string pipe) +void sal_main_init(uint32 order) { /* Initialize all Salis modules to their initial states. We pass along any arguments to their respective modules. */ assert(!g_is_init); _sal_mem_init(order); - _sal_comm_init(pipe); _sal_evo_init(); _sal_proc_init(); g_is_init = TRUE; @@ -30,17 +29,16 @@ void sal_main_quit(void) assert(g_is_init); _sal_proc_quit(); _sal_evo_quit(); - _sal_comm_quit(); _sal_mem_quit(); g_is_init = FALSE; g_cycle = 0; g_epoch = 0; } -void sal_main_load(string file_name, string pipe) +void sal_main_load(string file_name) { /* Load simulation state from file. This file must have been created by - 'sal_main_save()'. File name of common pipe must also be provided. + 'sal_main_save()'. */ FILE *file; assert(!g_is_init); @@ -54,7 +52,6 @@ void sal_main_load(string file_name, string pipe) _sal_evo_load_from(file); _sal_proc_load_from(file); fclose(file); - _sal_comm_init(pipe); } void sal_main_save(string file_name) |