Changeset 96348adc in mainline for kernel/test/synch/rwlock2.c


Ignore:
Timestamp:
2006-12-12T17:24:58Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e13972
Parents:
34db7fa
Message:

cleanup tests

File:
1 edited

Legend:

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

    r34db7fa r96348adc  
    4040static rwlock_t rwlock;
    4141
    42 static void writer(void *arg);
    43 static void failed(void);
    44 
    4542static void writer(void *arg)
    4643{
     
    5956}
    6057
    61 static void failed()
    62 {
    63         printf("Test failed prematurely.\n");
    64         thread_exit();
    65 }
    66 
    67 void test_rwlock2(void)
     58char * test_rwlock2(void)
    6859{
    6960        thread_t *thrd;
    7061       
    71         printf("Read/write locks test #2\n");
    72    
    7362        rwlock_initialize(&rwlock);
    7463
     
    8271                thread_ready(thrd);
    8372        else
    84                 failed();
    85 
     73                return "Could not create thread";
    8674
    8775        thread_sleep(1);
     
    9078        rwlock_read_unlock(&rwlock);
    9179        rwlock_read_unlock(&rwlock);
    92         rwlock_read_unlock(&rwlock);   
    93 
     80        rwlock_read_unlock(&rwlock);
     81       
     82        return NULL;
    9483}
Note: See TracChangeset for help on using the changeset viewer.