Subversion Repositories HelenOS

Rev

Rev 111 | Rev 501 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 111 Rev 263
Line 38... Line 38...
38
#define WRITERS     50
38
#define WRITERS     50
39
 
39
 
40
static rwlock_t rwlock;
40
static rwlock_t rwlock;
41
 
41
 
42
static void writer(void *arg);
42
static void writer(void *arg);
43
static void failed(void *arg);
43
static void failed(void);
44
 
44
 
45
void writer(void *arg)
45
void writer(void *arg)
46
{
46
{
47
    printf("Trying to lock rwlock for writing....\n");    
47
    printf("Trying to lock rwlock for writing....\n");    
48
 
48
 
Line 53... Line 53...
53
    rwlock_read_lock(&rwlock);
53
    rwlock_read_lock(&rwlock);
54
    rwlock_read_unlock(&rwlock);   
54
    rwlock_read_unlock(&rwlock);   
55
    printf("Test passed.\n");
55
    printf("Test passed.\n");
56
}
56
}
57
 
57
 
58
void failed(void)
58
void failed()
59
{
59
{
60
    printf("Test failed prematurely.\n");
60
    printf("Test failed prematurely.\n");
61
    thread_exit();
61
    thread_exit();
62
}
62
}
63
 
63