summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-07-20 21:37:38 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-07-20 21:37:38 -0700
commitbdf33aae40f998b4cfbd94baf3050009266644c1 (patch)
treeff0992860fa233da6077b7f72a54456c8b5cc1f9 /src
parent56e8c6bea343f81d8c87e73eeffd1d2546a8949c (diff)
libs/sig: add blurb comment about need for seed
Nothing uses libs/sig yet, but this will probably become an issue once that changes.
Diffstat (limited to 'src')
-rw-r--r--src/libs/sig/sig.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/sig/sig.c b/src/libs/sig/sig.c
index 203a37a..5d1d657 100644
--- a/src/libs/sig/sig.c
+++ b/src/libs/sig/sig.c
@@ -210,6 +210,12 @@ sig_t * sig_new_pow(sig_t *x, sig_t *y)
}
+/* TODO: this should probably accept a seed, but seeing as nothing uses libs/sig
+ * yet, it's unclear what's actually most appropriate. The implementation in
+ * ops_rand currently just abuses ticks as the seed w/rand_r making it ticks-derived.
+ * But that prevents uniqueness across rand sigs at the same tick, which seems obviously
+ * undesirable.
+ */
sig_t * sig_new_rand(void)
{
return sig_new(&sig_ops_rand);
© All Rights Reserved