-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIs
Description
Right now we just have sys_rand32_get() which returns a value between 0 and UINT_MAX.
Using a modulus operator (sys_rand32_get() % N) may not be the best practice to get a number in the range of 0...N:
Implement an API in the random subsystem that does this right. Check the kernel codebase for example of the modulus pattern and replace with calls to this API.
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIs