/kernel/trunk/test/synch/semaphore2/test.c |
---|
45,16 → 45,16 |
static waitq_t can_start; |
__u32 seed = 0xdeadbeef; |
uint32_t seed = 0xdeadbeef; |
static __u32 random(__u32 max); |
static uint32_t random(uint32_t max); |
static void consumer(void *arg); |
static void failed(void); |
__u32 random(__u32 max) |
uint32_t random(uint32_t max) |
{ |
__u32 rc; |
uint32_t rc; |
spinlock_lock(&lock); |
rc = seed % max; |
95,7 → 95,7 |
void test(void) |
{ |
__u32 i, k; |
uint32_t i, k; |
printf("Semaphore test #2\n"); |