summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/julia/julia.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/julia/julia.c b/src/modules/julia/julia.c
index 48f85da..95846e3 100644
--- a/src/modules/julia/julia.c
+++ b/src/modules/julia/julia.c
@@ -67,7 +67,15 @@ static uint32_t colors[] = {
static void * julia_create_context(unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
- return calloc(1, sizeof(julia_context_t));
+ julia_context_t *ctxt;
+
+ ctxt = calloc(1, sizeof(julia_context_t));
+ if (!ctxt)
+ return NULL;
+
+ ctxt->rr = ((float)rand()) / (float)RAND_MAX * 100.f;
+
+ return ctxt;
}
© All Rights Reserved