From bdf33aae40f998b4cfbd94baf3050009266644c1 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 20 Jul 2022 21:37:38 -0700 Subject: libs/sig: add blurb comment about need for seed Nothing uses libs/sig yet, but this will probably become an issue once that changes. --- src/libs/sig/sig.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3