Changeset 70b6de1 in mainline for kernel/test/synch


Ignore:
Timestamp:
2006-12-11T19:33:19Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e54fb21
Parents:
f272cb8
Message:

integrate rest of the tests

Location:
kernel/test/synch
Files:
7 moved

Legend:

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

    rf272cb8 r70b6de1  
    4141static rwlock_t rwlock;
    4242
    43 void test(void)
     43void test_rwlock1(void)
    4444{
    4545        printf("Read/write locks test #1\n");
  • kernel/test/synch/rwlock2.c

    rf272cb8 r70b6de1  
    4343static void failed(void);
    4444
    45 void writer(void *arg)
     45static void writer(void *arg)
    4646{
    4747
     
    5959}
    6060
    61 void failed()
     61static void failed()
    6262{
    6363        printf("Test failed prematurely.\n");
     
    6565}
    6666
    67 void test(void)
     67void test_rwlock2(void)
    6868{
    6969        thread_t *thrd;
  • kernel/test/synch/rwlock3.c

    rf272cb8 r70b6de1  
    4343static void failed(void);
    4444
    45 void reader(void *arg)
     45static void reader(void *arg)
    4646{
    4747        thread_detach(THREAD);
     
    6262}
    6363
    64 void failed(void)
     64static void failed(void)
    6565{
    6666        printf("Test failed prematurely.\n");
     
    6868}
    6969
    70 void test(void)
     70void test_rwlock3(void)
    7171{
    7272        int i;
  • kernel/test/synch/rwlock4.c

    rf272cb8 r70b6de1  
    4747static rwlock_t rwlock;
    4848
    49 SPINLOCK_INITIALIZE(lock);
     49static SPINLOCK_INITIALIZE(lock);
    5050
    5151static waitq_t can_start;
    5252
    53 uint32_t seed = 0xdeadbeef;
     53static uint32_t seed = 0xdeadbeef;
    5454
    5555static uint32_t random(uint32_t max);
     
    5959static void failed(void);
    6060
    61 uint32_t random(uint32_t max)
     61static uint32_t random(uint32_t max)
    6262{
    6363        uint32_t rc;
     
    7171
    7272
    73 void writer(void *arg)
     73static void writer(void *arg)
    7474{
    7575        int rc, to;
     
    9494}
    9595
    96 void reader(void *arg)
     96static void reader(void *arg)
    9797{
    9898        int rc, to;
     
    113113}
    114114
    115 void failed(void)
     115static void failed(void)
    116116{
    117117        printf("Test failed prematurely.\n");
     
    119119}
    120120
    121 void test(void)
     121void test_rwlock4(void)
    122122{
    123123        context_t ctx;
  • kernel/test/synch/rwlock5.c

    rf272cb8 r70b6de1  
    7777}
    7878
    79 void test(void)
     79void test_rwlock5(void)
    8080{
    8181        int i, j, k;
  • kernel/test/synch/semaphore1.c

    rf272cb8 r70b6de1  
    5050static void failed(void);
    5151
    52 void producer(void *arg)
     52static void producer(void *arg)
    5353{
    5454        thread_detach(THREAD); 
     
    6262}
    6363
    64 void consumer(void *arg)
     64static void consumer(void *arg)
    6565{
    6666        thread_detach(THREAD); 
     
    7474}
    7575
    76 void failed(void)
     76static void failed(void)
    7777{
    7878        printf("Test failed prematurely.\n");
     
    8080}
    8181
    82 void test(void)
     82void test_semaphore1(void)
    8383{
    8484        int i, j, k;
  • kernel/test/synch/semaphore2.c

    rf272cb8 r70b6de1  
    4242static semaphore_t sem;
    4343
    44 SPINLOCK_INITIALIZE(lock);
     44static SPINLOCK_INITIALIZE(lock);
    4545
    4646static waitq_t can_start;
    4747
    48 uint32_t seed = 0xdeadbeef;
     48static uint32_t seed = 0xdeadbeef;
    4949
    5050static uint32_t random(uint32_t max);
     
    5353static void failed(void);
    5454
    55 uint32_t random(uint32_t max)
     55static uint32_t random(uint32_t max)
    5656{
    5757        uint32_t rc;
     
    6565
    6666
    67 void consumer(void *arg)
     67static void consumer(void *arg)
    6868{
    6969        int rc, to;
     
    8888}
    8989
    90 void failed(void)
     90static void failed(void)
    9191{
    9292        printf("Test failed prematurely.\n");
     
    9494}
    9595
    96 void test(void)
     96void test_semaphore2(void)
    9797{
    9898        uint32_t i, k;
Note: See TracChangeset for help on using the changeset viewer.