Rev 3386 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3386 | Rev 4153 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | { |
51 | { |
52 | uint32_t rc; |
52 | uint32_t rc; |
53 | 53 | ||
54 | spinlock_lock(&sem_lock); |
54 | spinlock_lock(&sem_lock); |
55 | rc = seed % max; |
55 | rc = seed % max; |
56 | seed = (((seed<<2) ^ (seed>>2)) * 487) + rc; |
56 | seed = (((seed << 2) ^ (seed >> 2)) * 487) + rc; |
57 | spinlock_unlock(&sem_lock); |
57 | spinlock_unlock(&sem_lock); |
58 | return rc; |
58 | return rc; |
59 | } |
59 | } |
60 | 60 | ||
61 | static void consumer(void *arg) |
61 | static void consumer(void *arg) |