Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1787 → Rev 2022

/trunk/kernel/test/synch/semaphore2.c/test.c
41,11 → 41,11
 
static semaphore_t sem;
 
SPINLOCK_INITIALIZE(lock);
static SPINLOCK_INITIALIZE(lock);
 
static waitq_t can_start;
 
uint32_t seed = 0xdeadbeef;
static uint32_t seed = 0xdeadbeef;
 
static uint32_t random(uint32_t max);
 
52,7 → 52,7
static void consumer(void *arg);
static void failed(void);
 
uint32_t random(uint32_t max)
static uint32_t random(uint32_t max)
{
uint32_t rc;
 
64,7 → 64,7
}
 
 
void consumer(void *arg)
static void consumer(void *arg)
{
int rc, to;
87,13 → 87,13
printf("cpu%d, tid %d up\n", CPU->id, THREAD->tid);
}
 
void failed(void)
static void failed(void)
{
printf("Test failed prematurely.\n");
thread_exit();
}
 
void test(void)
void test_semaphore2(void)
{
uint32_t i, k;