Changeset 520492a in mainline for init/init.c
- Timestamp:
- 2006-03-24T13:57:43Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c4c5de5
- Parents:
- 4f2c821
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
init/init.c
r4f2c821 r520492a 256 256 static int ptest(void *arg) 257 257 { 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"); 267 267 return 0; 268 268 } … … 309 309 310 310 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); 319 318 320 319 printf("Main thread exiting.\n");
Note:
See TracChangeset
for help on using the changeset viewer.