[riot-devel] To global seed or not to global seed

Kaspar Schleiser kaspar at schleiser.de
Wed Mar 8 10:13:32 CET 2017


Hey,

On 03/08/2017 10:06 AM, Cenk Gündoğan wrote:
> 
>> How about an interface a la
>>
> Looks good at first sight. We also would need some sort of
> synchronization for concurrent access, e.g. a mutex in the `rnd_t`
> struct, if two threads should use the same local state.

Do we need that kind of synchronization if all state is localized in the
overloaded rnd_t, at that level?

Applications *seeding* the same state in multiple threads will be rare
and can synchronize externally.

Whether "reading" from the rng needs to be synchronized should be up to
the RNG implementation.

Kaspar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 516 bytes
Desc: OpenPGP digital signature
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20170308/96620918/attachment-0001.sig>


More information about the devel mailing list