Changeset 520492a in mainline for init/init.c


Ignore:
Timestamp:
2006-03-24T13:57:43Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c4c5de5
Parents:
4f2c821
Message:

Improve comments in psthread.c
Rename pt→list to pt→link.
Rename ps_preempt() to psthread_schedule_next().
Rename ps_join() to psthread_join().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    r4f2c821 r520492a  
    256256static int ptest(void *arg)
    257257{
    258         printf("Pseudo thread-1\n");
    259         ps_preempt();
    260         printf("Pseudo thread-2\n");
    261         ps_preempt();
    262         printf("Pseudo thread-3\n");
    263         ps_preempt();
    264         printf("Pseudo thread-4\n");
    265         ps_preempt();
    266         printf("Pseudo finish\n");
     258        printf("Pseudo thread stage1.\n");
     259        psthread_schedule_next();
     260        printf("Pseudo thread stage2.\n");
     261        psthread_schedule_next();
     262        printf("Pseudo thread stage3.\n");
     263        psthread_schedule_next();
     264        printf("Pseudo thread stage4.\n");
     265        psthread_schedule_next();
     266        printf("Pseudo thread exiting.\n");
    267267        return 0;       
    268268}
     
    309309
    310310        ptid = psthread_create(ptest, NULL);
    311         printf("main thread-1\n");
    312         ps_preempt();
    313         printf("main thread-2\n");
    314         ps_preempt();
    315         printf("main thread-3\n");
    316 
    317         ps_join(ptid);
    318         printf("Main exiting\n");
     311        printf("Main thread stage1.\n");
     312        psthread_schedule_next();;
     313        printf("Main thread stage2.\n");
     314        psthread_schedule_next();;
     315        printf("Main thread stage3.\n");
     316
     317        psthread_join(ptid);
    319318
    320319        printf("Main thread exiting.\n");
Note: See TracChangeset for help on using the changeset viewer.