summaryrefslogtreecommitdiff
path: root/src/til_module_context.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-05-11 11:10:48 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-05-11 15:19:25 -0700
commitdede4eca3e2fca76f297b5f5b901434cb99eafb0 (patch)
tree7cdf8634a41af9003d2408ccf143fcaf40b2b729 /src/til_module_context.h
parent7c8086020fb8d88f662a2b33b2dabef1b62ab39c (diff)
til_module_context: reference setup from module context
This just does the obvious pulling in of til_setup_t, holding the reference throughout the lifetime of the module context.
Diffstat (limited to 'src/til_module_context.h')
-rw-r--r--src/til_module_context.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/til_module_context.h b/src/til_module_context.h
index a11b876..7a5fca5 100644
--- a/src/til_module_context.h
+++ b/src/til_module_context.h
@@ -5,6 +5,7 @@
typedef struct til_module_context_t til_module_context_t;
typedef struct til_module_t til_module_t;
+typedef struct til_setup_t til_setup_t;
typedef struct til_stream_t til_stream_t;
struct til_module_context_t {
@@ -15,9 +16,10 @@ struct til_module_context_t {
unsigned n_cpus;
char *path; /* for locating this instance of the module, NOT a file path */
uint32_t path_hash;
+ til_setup_t *setup; /* optional baked setup this context was made from (reffed by context when present) */
};
-void * til_module_context_new(const til_module_t *module, size_t size, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path);
+void * til_module_context_new(const til_module_t *module, size_t size, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup);
void * til_module_context_free(til_module_context_t *module_context);
#endif
© All Rights Reserved