Changeset c4c5de5 in mainline for init/init.c


Ignore:
Timestamp:
2006-03-24T14:29:19Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8fe1cdb
Parents:
520492a
Message:

Completed support for TLS in GCC (modifier thread) for ia32,amd64,ia64 and mips.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    r520492a rc4c5de5  
    4040atomic_t ftx;
    4141
     42int __thread tls_prom;
     43
    4244extern void utest(void *arg);
    4345void utest(void *arg)
     
    256258static int ptest(void *arg)
    257259{
    258         printf("Pseudo thread stage1.\n");
     260        tls_prom = -1;
     261        printf("Pseudo thread stage%d.\n", -tls_prom);
     262        tls_prom = -2;
    259263        psthread_schedule_next();
    260         printf("Pseudo thread stage2.\n");
     264        printf("Pseudo thread stage%d.\n", -tls_prom);
     265        tls_prom = -3;
    261266        psthread_schedule_next();
    262         printf("Pseudo thread stage3.\n");
     267        printf("Pseudo thread stage%d\n", -tls_prom);
    263268        psthread_schedule_next();
    264269        printf("Pseudo thread stage4.\n");
     
    291296        if (futex_down(&ftx) < 0)
    292297                printf("Futex failed.\n");
    293 
     298/*
    294299        if ((tid = thread_create(utest, NULL, "utest")) != -1) {
    295300                printf("Created thread tid=%d\n", tid);
     
    299304                printf("Created thread tid=%d\n", tid);
    300305        }
    301 
     306*/
    302307        int i;
    303308       
     
    308313                printf("Futex failed.\n");
    309314
     315
     316        printf("Creating pathread\n");
     317        tls_prom = 1;
    310318        ptid = psthread_create(ptest, NULL);
    311         printf("Main thread stage1.\n");
     319        printf("Main thread stage%d\n",tls_prom);
     320        tls_prom = 2;
    312321        psthread_schedule_next();;
    313         printf("Main thread stage2.\n");
     322        printf("Main thread stage%d\n", tls_prom);
     323        tls_prom = 3;
    314324        psthread_schedule_next();;
    315         printf("Main thread stage3.\n");
     325        printf("Main thread stage%d\n", tls_prom);
    316326
    317327        psthread_join(ptid);
Note: See TracChangeset for help on using the changeset viewer.