Changeset 201abde in mainline for kernel/test/synch


Ignore:
Timestamp:
2007-04-07T20:06:52Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e58979
Parents:
6adbe3c2
Message:

make thread ID 64 bit (task ID is 64 bit already)
cleanup thread syscalls

Location:
kernel/test/synch
Files:
3 edited

Legend:

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

    r6adbe3c2 r201abde  
    4646       
    4747        if (!sh_quiet)
    48                 printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid);
     48                printf("cpu%d, tid %llu: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid);
    4949       
    5050        rwlock_read_lock(&rwlock);
     
    5252       
    5353        if (!sh_quiet) {
    54                 printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid);               
    55                 printf("cpu%d, tid %d: trying to lock rwlock for writing....\n", CPU->id, THREAD->tid);         
     54                printf("cpu%d, tid %llu: success\n", CPU->id, THREAD->tid);             
     55                printf("cpu%d, tid %llu: trying to lock rwlock for writing....\n", CPU->id, THREAD->tid);       
    5656        }
    5757
     
    6060       
    6161        if (!sh_quiet)
    62                 printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid);
     62                printf("cpu%d, tid %llu: success\n", CPU->id, THREAD->tid);
    6363       
    6464        atomic_dec(&thread_count);
  • kernel/test/synch/rwlock4.c

    r6adbe3c2 r201abde  
    7575       
    7676        if (!sh_quiet)
    77                 printf("cpu%d, tid %d w+ (%d)\n", CPU->id, THREAD->tid, to);
     77                printf("cpu%d, tid %llu w+ (%d)\n", CPU->id, THREAD->tid, to);
    7878       
    7979        rc = rwlock_write_lock_timeout(&rwlock, to);
    8080        if (SYNCH_FAILED(rc)) {
    8181                if (!sh_quiet)
    82                         printf("cpu%d, tid %d w!\n", CPU->id, THREAD->tid);
     82                        printf("cpu%d, tid %llu w!\n", CPU->id, THREAD->tid);
    8383                atomic_dec(&thread_count);
    8484                return;
     
    8686       
    8787        if (!sh_quiet)
    88                 printf("cpu%d, tid %d w=\n", CPU->id, THREAD->tid);
     88                printf("cpu%d, tid %llu w=\n", CPU->id, THREAD->tid);
    8989
    9090        if (rwlock.readers_in) {
     
    107107       
    108108        if (!sh_quiet)
    109                 printf("cpu%d, tid %d w-\n", CPU->id, THREAD->tid);
     109                printf("cpu%d, tid %llu w-\n", CPU->id, THREAD->tid);
    110110        atomic_dec(&thread_count);
    111111}
     
    120120       
    121121        if (!sh_quiet)
    122                 printf("cpu%d, tid %d r+ (%d)\n", CPU->id, THREAD->tid, to);
     122                printf("cpu%d, tid %llu r+ (%d)\n", CPU->id, THREAD->tid, to);
    123123       
    124124        rc = rwlock_read_lock_timeout(&rwlock, to);
    125125        if (SYNCH_FAILED(rc)) {
    126126                if (!sh_quiet)
    127                         printf("cpu%d, tid %d r!\n", CPU->id, THREAD->tid);
     127                        printf("cpu%d, tid %llu r!\n", CPU->id, THREAD->tid);
    128128                atomic_dec(&thread_count);
    129129                return;
     
    131131       
    132132        if (!sh_quiet)
    133                 printf("cpu%d, tid %d r=\n", CPU->id, THREAD->tid);
     133                printf("cpu%d, tid %llu r=\n", CPU->id, THREAD->tid);
    134134       
    135135        thread_usleep(30000);
     
    137137       
    138138        if (!sh_quiet)
    139                 printf("cpu%d, tid %d r-\n", CPU->id, THREAD->tid);
     139                printf("cpu%d, tid %llu r-\n", CPU->id, THREAD->tid);
    140140        atomic_dec(&thread_count);
    141141}
  • kernel/test/synch/semaphore2.c

    r6adbe3c2 r201abde  
    6868       
    6969        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);
    7171        rc = semaphore_down_timeout(&sem, to);
    7272        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);
    7474                return;
    7575        }
    7676       
    77         printf("cpu%d, tid %d down=\n", CPU->id, THREAD->tid); 
     77        printf("cpu%d, tid %llu down=\n", CPU->id, THREAD->tid);       
    7878        thread_usleep(random(30000));
    7979       
    8080        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);
    8282}
    8383
Note: See TracChangeset for help on using the changeset viewer.