Dear Cenk, thanks for bringing up this discussion.
On Wed, Mar 08, 2017 at 12:18:28AM +0100, Cenk Gündoğan wrote: > 1) we can define it as BCP to *not* use `random_init()` if `auto_init` > is used > => it's hard to guarantee a one-time call to `random_init()` as human > do surely err (especially if several nested modules are involved). Basically, we have similar problems for other modules that should (or even must) not be initialized twice. So far, my/our take on this was to document this rather than programmatically prevent this. The memory overhead is small, but existent, the runtime overhead is probably negligible for a function that should not be called more than once. > In contrast to the current procedure of having a global state, we rather > should opt to allow local states for each thread (not excluding a global > state). Is testing and simulation the only use case you can imagine? I'm somewhat reluctant to add code just for non-production purposes. Cheers, Oleg -- /* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ * * Wirzenius wrote this portably, Torvalds fucked it up :-) */ linux-2.2.16/lib/vsprintf.c
signature.asc
Description: PGP signature
_______________________________________________ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel