Changeset deada67 in mainline for kernel/test/synch/rwlock2.c


Ignore:
Timestamp:
2006-12-19T17:54:50Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
730376d
Parents:
6536a4a9
Message:

quiet variants of tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/synch/rwlock2.c

    r6536a4a9 rdeada67  
    3939
    4040static rwlock_t rwlock;
     41static bool sh_quiet;
    4142
    4243static void writer(void *arg)
    4344{
    44 
    45         thread_detach(THREAD);
    46 
    47         printf("Trying to lock rwlock for writing....\n");   
    48 
     45        if (!sh_quiet)
     46                printf("Trying to lock rwlock for writing....\n");
     47       
    4948        rwlock_write_lock(&rwlock);
    5049        rwlock_write_unlock(&rwlock);
    5150       
    52         printf("Trying to lock rwlock for reading....\n");     
     51        if (!sh_quiet)
     52                printf("Trying to lock rwlock for reading....\n");
     53       
    5354        rwlock_read_lock(&rwlock);
    5455        rwlock_read_unlock(&rwlock);   
    55         printf("Test passed.\n");
    5656}
    5757
     
    5959{
    6060        thread_t *thrd;
     61        sh_quiet = quiet;
    6162       
    6263        rwlock_initialize(&rwlock);
     
    8081        rwlock_read_unlock(&rwlock);
    8182       
     83        thread_join(thrd);
     84        thread_detach(thrd);
     85       
    8286        return NULL;
    8387}
Note: See TracChangeset for help on using the changeset viewer.