Remove track mode argument from cpu_get_th_chan()
This commit is contained in:
		
							parent
							
								
									9a4a4a0005
								
							
						
					
					
						commit
						ad88e25278
					
				| @ -331,10 +331,7 @@ cpu_migrate_thread(struct cpu *cpu, struct thread *thread, struct cpu *newcpu) | ||||
| } | ||||
| 
 | ||||
| struct chan * | ||||
| cpu_get_th_chan(struct cpu *cpu, enum track_th trackmode) | ||||
| cpu_get_th_chan(struct cpu *cpu) | ||||
| { | ||||
| 	if (trackmode != TRACK_TH_RUN) | ||||
| 		die("cpu tracking must be running"); | ||||
| 
 | ||||
| 	return &cpu->chan[CPU_CHAN_THRUN]; | ||||
| } | ||||
|  | ||||
| @ -78,7 +78,7 @@ USE_RET int cpu_add_thread(struct cpu *cpu, struct thread *thread); | ||||
| USE_RET int cpu_remove_thread(struct cpu *cpu, struct thread *thread); | ||||
| USE_RET int cpu_migrate_thread(struct cpu *cpu, struct thread *thread, struct cpu *newcpu); | ||||
| 
 | ||||
| USE_RET struct chan *cpu_get_th_chan(struct cpu *cpu, enum track_th mode); | ||||
| USE_RET struct chan *cpu_get_th_chan(struct cpu *cpu); | ||||
| USE_RET struct pcf_value *cpu_add_to_pcf_type(struct cpu *cpu, struct pcf_type *type); | ||||
| 
 | ||||
| #endif /* CPU_H */ | ||||
|  | ||||
| @ -87,7 +87,12 @@ connect_cpu(struct emu *emu, struct cpu *scpu, int id) | ||||
| 		/* Choose select CPU channel based on tracking mode (only
 | ||||
| 		 * TRACK_TH_RUN allowed, as active may cause collisions) */ | ||||
| 		int mode = chan_spec->track[i]; | ||||
| 		struct chan *sel = cpu_get_th_chan(scpu, mode); | ||||
| 		if (mode != TRACK_TH_RUN) { | ||||
| 			err("only TRACK_TH_RUN allowed"); | ||||
| 			return -1; | ||||
| 		} | ||||
| 
 | ||||
| 		struct chan *sel = cpu_get_th_chan(scpu); | ||||
| 
 | ||||
| 		int64_t nthreads = emu->system.nthreads; | ||||
| 		if (track_set_select(track, sel, NULL, nthreads) != 0) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user