comparison TaskManager/Cell/SpeThreads.cc @ 194:b56fb6ac2fc4 draft

fix
author gongo@localhost.localdomain
date Tue, 20 Jan 2009 14:50:41 +0900
parents 18c42658e0e7
children e9735a64cd90
comparison
equal deleted inserted replaced
193:1ff24ca2f016 194:b56fb6ac2fc4
41 spe_context_run(arg_t->ctx, &entry, 0, (void*)arg_t->speid, NULL, &stop_info); 41 spe_context_run(arg_t->ctx, &entry, 0, (void*)arg_t->speid, NULL, &stop_info);
42 42
43 status = ((stop_info.result.spe_exit_code & 0xff) << 8) 43 status = ((stop_info.result.spe_exit_code & 0xff) << 8)
44 | (stop_info.result.spe_signal_code & 0xff); 44 | (stop_info.result.spe_signal_code & 0xff);
45 45
46 printf("[SPE %d] ", arg_t->speid);
47 switch(stop_info.stop_reason) { 46 switch(stop_info.stop_reason) {
48 case SPE_EXIT: 47 case SPE_EXIT:
49 printf("SPE_EXIT stop_info.result.stop_exit_code=0x%x\n", stop_info.result.spe_exit_code); 48 //printf("SPE_EXIT stop_info.result.stop_exit_code=0x%x\n", stop_info.result.spe_exit_code);
50 break; 49 break;
51 case SPE_STOP_AND_SIGNAL: 50 case SPE_STOP_AND_SIGNAL:
52 printf("SPE_STOP_AND_SIGNAL stop_info.result.stop_signal_code=%d\n", stop_info.result.spe_signal_code); 51 printf("[SPE %d] SPE_STOP_AND_SIGNAL stop_info.result.stop_signal_code=%d\n", arg_t->speid, stop_info.result.spe_signal_code);
53 break; 52 break;
54 case SPE_RUNTIME_ERROR: 53 case SPE_RUNTIME_ERROR:
55 printf("SPE_RUNTIME_ERROR stop_info.result.spe_runtime_error=%d\n", stop_info.result.spe_runtime_error); 54 printf("[SPE %d] SPE_RUNTIME_ERROR stop_info.result.spe_runtime_error=%d\n", arg_t->speid, stop_info.result.spe_runtime_error);
56 break; 55 break;
57 case SPE_RUNTIME_EXCEPTION: 56 case SPE_RUNTIME_EXCEPTION:
58 printf("SPE_RUNTIME_EXCEPTION stop_info.result.spe_runtime_exception=%d\n", stop_info.result.spe_runtime_exception); 57 printf("[SPE %d] SPE_RUNTIME_EXCEPTION stop_info.result.spe_runtime_exception=%d\n", arg_t->speid, stop_info.result.spe_runtime_exception);
59 break; 58 break;
60 } 59 }
61 60
62 pthread_exit(NULL); 61 pthread_exit(NULL);
63 } 62 }
101 #if 0 100 #if 0
102 pthread_create(&threads[i], NULL, 101 pthread_create(&threads[i], NULL,
103 &frontend_thread_run, (void*)&args[i]); 102 &frontend_thread_run, (void*)&args[i]);
104 #else 103 #else
105 pthread_create(&threads[i], NULL, 104 pthread_create(&threads[i], NULL,
106 //&spe_thread_run, (void*)spe_ctx[i]);
107 &spe_thread_run, (void*)&args[i]); 105 &spe_thread_run, (void*)&args[i]);
108 #endif 106 #endif
109 } 107 }
110 } 108 }
111 109