Changeset c4c5de5 in mainline for init/init.c
- Timestamp:
- 2006-03-24T14:29:19Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8fe1cdb
- Parents:
- 520492a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
init/init.c
r520492a rc4c5de5 40 40 atomic_t ftx; 41 41 42 int __thread tls_prom; 43 42 44 extern void utest(void *arg); 43 45 void utest(void *arg) … … 256 258 static int ptest(void *arg) 257 259 { 258 printf("Pseudo thread stage1.\n"); 260 tls_prom = -1; 261 printf("Pseudo thread stage%d.\n", -tls_prom); 262 tls_prom = -2; 259 263 psthread_schedule_next(); 260 printf("Pseudo thread stage2.\n"); 264 printf("Pseudo thread stage%d.\n", -tls_prom); 265 tls_prom = -3; 261 266 psthread_schedule_next(); 262 printf("Pseudo thread stage 3.\n");267 printf("Pseudo thread stage%d\n", -tls_prom); 263 268 psthread_schedule_next(); 264 269 printf("Pseudo thread stage4.\n"); … … 291 296 if (futex_down(&ftx) < 0) 292 297 printf("Futex failed.\n"); 293 298 /* 294 299 if ((tid = thread_create(utest, NULL, "utest")) != -1) { 295 300 printf("Created thread tid=%d\n", tid); … … 299 304 printf("Created thread tid=%d\n", tid); 300 305 } 301 306 */ 302 307 int i; 303 308 … … 308 313 printf("Futex failed.\n"); 309 314 315 316 printf("Creating pathread\n"); 317 tls_prom = 1; 310 318 ptid = psthread_create(ptest, NULL); 311 printf("Main thread stage1.\n"); 319 printf("Main thread stage%d\n",tls_prom); 320 tls_prom = 2; 312 321 psthread_schedule_next();; 313 printf("Main thread stage2.\n"); 322 printf("Main thread stage%d\n", tls_prom); 323 tls_prom = 3; 314 324 psthread_schedule_next();; 315 printf("Main thread stage 3.\n");325 printf("Main thread stage%d\n", tls_prom); 316 326 317 327 psthread_join(ptid);
Note:
See TracChangeset
for help on using the changeset viewer.