thread_context.hh (5595:6ebdae3f619b) | thread_context.hh (5668:5b5a9f4203d1) |
---|---|
1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 267 unchanged lines hidden (view full) --- 276 virtual void setNextNPC(uint64_t val) 277 { 278#if THE_ISA == ALPHA_ISA 279 panic("Not supported on Alpha!"); 280#endif 281 this->cpu->setNextNPC(val, this->thread->readTid()); 282 } 283 | 1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 267 unchanged lines hidden (view full) --- 276 virtual void setNextNPC(uint64_t val) 277 { 278#if THE_ISA == ALPHA_ISA 279 panic("Not supported on Alpha!"); 280#endif 281 this->cpu->setNextNPC(val, this->thread->readTid()); 282 } 283 |
284 virtual void changeRegFileContext(TheISA::RegContextParam param, 285 TheISA::RegContextVal val) 286 { 287#if THE_ISA != SPARC_ISA 288 panic("changeRegFileContext not implemented."); 289#endif 290 } 291 292 | |
293 /** This function exits the thread context in the CPU and returns 294 * 1 if the CPU has no more active threads (meaning it's OK to exit); 295 * Used in syscall-emulation mode when a thread executes the 'exit' 296 * syscall. 297 */ 298 virtual int exit() 299 { 300 this->deallocate(); 301 302 // If there are still threads executing in the system 303 if (this->cpu->numActiveThreads()) 304 return 0; // don't exit simulation 305 else 306 return 1; // exit simulation 307 } 308}; 309 310#endif | 284 /** This function exits the thread context in the CPU and returns 285 * 1 if the CPU has no more active threads (meaning it's OK to exit); 286 * Used in syscall-emulation mode when a thread executes the 'exit' 287 * syscall. 288 */ 289 virtual int exit() 290 { 291 this->deallocate(); 292 293 // If there are still threads executing in the system 294 if (this->cpu->numActiveThreads()) 295 return 0; // don't exit simulation 296 else 297 return 1; // exit simulation 298 } 299}; 300 301#endif |