Currently, NSPR does not provide functions to generate pseudo random numbers, that use the thread safe equivalent available on each platform, as it should be used in a multithreaded application - like rand_r on Linux. I think it would be good to have support for at least: - rand - srand
No use keeping two bugs on the same topic: threadsafe number generation (in NSPR or elsewhere...) *** This bug has been marked as a duplicate of 143492 ***
This bug asks NSPR to provide a new API. There are other bugs (such as bug 143492) that ask other mozilla products to use this NSPR API, once it is developed. This bug is NOT a duplicate of those others, and they are NOT duplicates of this bug.