thread_context.hh (2875:9b6f6b75b187) | thread_context.hh (2972:f84c6c5309ce) |
---|---|
1/* 2 * Copyright (c) 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; --- 17 unchanged lines hidden (view full) --- 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Kevin Lim 29 */ 30 31#ifndef __CPU_THREAD_CONTEXT_HH__ 32#define __CPU_THREAD_CONTEXT_HH__ 33 | 1/* 2 * Copyright (c) 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; --- 17 unchanged lines hidden (view full) --- 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Kevin Lim 29 */ 30 31#ifndef __CPU_THREAD_CONTEXT_HH__ 32#define __CPU_THREAD_CONTEXT_HH__ 33 |
34#include "arch/types.hh" 35#include "arch/regfile.hh" 36#include "arch/syscallreturn.hh" |
|
34#include "config/full_system.hh" 35#include "mem/request.hh" 36#include "sim/faults.hh" 37#include "sim/host.hh" 38#include "sim/serialize.hh" 39#include "sim/byteswap.hh" 40 41// @todo: Figure out a more architecture independent way to obtain the ITB and --- 207 unchanged lines hidden (view full) --- 249 virtual Counter readFuncExeInst() = 0; 250 251 // This function exits the thread context in the CPU and returns 252 // 1 if the CPU has no more active threads (meaning it's OK to exit); 253 // Used in syscall-emulation mode when a thread calls the exit syscall. 254 virtual int exit() { return 1; }; 255#endif 256 | 37#include "config/full_system.hh" 38#include "mem/request.hh" 39#include "sim/faults.hh" 40#include "sim/host.hh" 41#include "sim/serialize.hh" 42#include "sim/byteswap.hh" 43 44// @todo: Figure out a more architecture independent way to obtain the ITB and --- 207 unchanged lines hidden (view full) --- 252 virtual Counter readFuncExeInst() = 0; 253 254 // This function exits the thread context in the CPU and returns 255 // 1 if the CPU has no more active threads (meaning it's OK to exit); 256 // Used in syscall-emulation mode when a thread calls the exit syscall. 257 virtual int exit() { return 1; }; 258#endif 259 |
257 virtual void changeRegFileContext(RegFile::ContextParam param, 258 RegFile::ContextVal val) = 0; | 260 virtual void changeRegFileContext(TheISA::RegContextParam param, 261 TheISA::RegContextVal val) = 0; |
259}; 260 261/** 262 * ProxyThreadContext class that provides a way to implement a 263 * ThreadContext without having to derive from it. ThreadContext is an 264 * abstract class, so anything that derives from it and uses its 265 * interface will pay the overhead of virtual function calls. This 266 * class is created to enable a user-defined Thread object to be used --- 166 unchanged lines hidden (view full) --- 433 { actualTC->setSyscallArg(i, val); } 434 435 void setSyscallReturn(SyscallReturn return_value) 436 { actualTC->setSyscallReturn(return_value); } 437 438 Counter readFuncExeInst() { return actualTC->readFuncExeInst(); } 439#endif 440 | 262}; 263 264/** 265 * ProxyThreadContext class that provides a way to implement a 266 * ThreadContext without having to derive from it. ThreadContext is an 267 * abstract class, so anything that derives from it and uses its 268 * interface will pay the overhead of virtual function calls. This 269 * class is created to enable a user-defined Thread object to be used --- 166 unchanged lines hidden (view full) --- 436 { actualTC->setSyscallArg(i, val); } 437 438 void setSyscallReturn(SyscallReturn return_value) 439 { actualTC->setSyscallReturn(return_value); } 440 441 Counter readFuncExeInst() { return actualTC->readFuncExeInst(); } 442#endif 443 |
441 void changeRegFileContext(RegFile::ContextParam param, 442 RegFile::ContextVal val) | 444 void changeRegFileContext(TheISA::RegContextParam param, 445 TheISA::RegContextVal val) |
443 { 444 actualTC->changeRegFileContext(param, val); 445 } 446}; 447 448#endif | 446 { 447 actualTC->changeRegFileContext(param, val); 448 } 449}; 450 451#endif |