Rev 3386 | Rev 4263 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3386 | Rev 4153 | ||
---|---|---|---|
Line 58... | Line 58... | ||
58 | { |
58 | { |
59 | uint32_t rc; |
59 | uint32_t rc; |
60 | 60 | ||
61 | spinlock_lock(&rw_lock); |
61 | spinlock_lock(&rw_lock); |
62 | rc = seed % max; |
62 | rc = seed % max; |
63 | seed = (((seed<<2) ^ (seed>>2)) * 487) + rc; |
63 | seed = (((seed << 2) ^ (seed >> 2)) * 487) + rc; |
64 | spinlock_unlock(&rw_lock); |
64 | spinlock_unlock(&rw_lock); |
65 | return rc; |
65 | return rc; |
66 | } |
66 | } |
67 | 67 | ||
68 | static void writer(void *arg) |
68 | static void writer(void *arg) |