Changeset 0319a8f6 in mainline for init/init.c
- Timestamp:
- 2006-04-05T12:10:53Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a7818c26
- Parents:
- 8fe1cdb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
init/init.c
r8fe1cdb r0319a8f6 40 40 atomic_t ftx; 41 41 42 int __thread tls_prom;42 int __thread stage; 43 43 44 44 extern void utest(void *arg); … … 258 258 static int ptest(void *arg) 259 259 { 260 tls_prom = -1;261 printf("Pseudo thread stage%d.\n", -tls_prom);262 tls_prom = -2;260 stage = 1; 261 printf("Pseudo thread stage%d.\n", stage); 262 stage++; 263 263 psthread_schedule_next(); 264 printf("Pseudo thread stage%d.\n", -tls_prom);265 tls_prom = -3;264 printf("Pseudo thread stage%d.\n", stage); 265 stage++; 266 266 psthread_schedule_next(); 267 printf("Pseudo thread stage%d \n", -tls_prom);267 printf("Pseudo thread stage%d.\n", stage); 268 268 psthread_schedule_next(); 269 printf("Pseudo thread stage4.\n"); 269 stage++; 270 printf("Pseudo thread stage%d.\n", stage); 270 271 psthread_schedule_next(); 271 272 printf("Pseudo thread exiting.\n"); … … 296 297 if (futex_down(&ftx) < 0) 297 298 printf("Futex failed.\n"); 298 /* 299 299 300 if ((tid = thread_create(utest, NULL, "utest")) != -1) { 300 301 printf("Created thread tid=%d\n", tid); … … 304 305 printf("Created thread tid=%d\n", tid); 305 306 } 306 */ 307 307 308 int i; 308 309 … … 314 315 315 316 316 printf("Creating p athread\n");317 tls_prom= 1;317 printf("Creating pseudo thread.\n"); 318 stage = 1; 318 319 ptid = psthread_create(ptest, NULL); 319 printf("Main thread stage%d \n",tls_prom);320 tls_prom = 2;320 printf("Main thread stage%d.\n", stage); 321 stage++; 321 322 psthread_schedule_next();; 322 printf("Main thread stage%d \n", tls_prom);323 tls_prom = 3;323 printf("Main thread stage%d.\n", stage); 324 stage++; 324 325 psthread_schedule_next();; 325 printf("Main thread stage%d \n", tls_prom);326 printf("Main thread stage%d.\n", stage); 326 327 327 328 psthread_join(ptid);
Note:
See TracChangeset
for help on using the changeset viewer.