Subversion Repositories HelenOS

Rev

Rev 2071 | Rev 3069 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 2216
Line 65... Line 65...
65
    thread_detach(THREAD);
65
    thread_detach(THREAD);
66
   
66
   
67
    waitq_sleep(&can_start);
67
    waitq_sleep(&can_start);
68
   
68
   
69
    to = random(20000);
69
    to = random(20000);
70
    printf("cpu%d, tid %d down+ (%d)\n", CPU->id, THREAD->tid, to);
70
    printf("cpu%d, tid %llu down+ (%d)\n", CPU->id, THREAD->tid, to);
71
    rc = semaphore_down_timeout(&sem, to);
71
    rc = semaphore_down_timeout(&sem, to);
72
    if (SYNCH_FAILED(rc)) {
72
    if (SYNCH_FAILED(rc)) {
73
        printf("cpu%d, tid %d down!\n", CPU->id, THREAD->tid);
73
        printf("cpu%d, tid %llu down!\n", CPU->id, THREAD->tid);
74
        return;
74
        return;
75
    }
75
    }
76
   
76
   
77
    printf("cpu%d, tid %d down=\n", CPU->id, THREAD->tid); 
77
    printf("cpu%d, tid %llu down=\n", CPU->id, THREAD->tid);   
78
    thread_usleep(random(30000));
78
    thread_usleep(random(30000));
79
   
79
   
80
    semaphore_up(&sem);
80
    semaphore_up(&sem);
81
    printf("cpu%d, tid %d up\n", CPU->id, THREAD->tid);
81
    printf("cpu%d, tid %llu up\n", CPU->id, THREAD->tid);
82
}
82
}
83
 
83
 
84
char * test_semaphore2(bool quiet)
84
char * test_semaphore2(bool quiet)
85
{
85
{
86
    uint32_t i, k;
86
    uint32_t i, k;