process.cc (3114:7a4771b9b720) process.cc (3311:7eb47a60dbd4)
1/*
2 * Copyright (c) 2001-2005 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;

--- 226 unchanged lines hidden (view full) ---

235Process::sim_fd(int tgt_fd)
236{
237 if (tgt_fd > MAX_FD)
238 return -1;
239
240 return fd_map[tgt_fd];
241}
242
1/*
2 * Copyright (c) 2001-2005 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;

--- 226 unchanged lines hidden (view full) ---

235Process::sim_fd(int tgt_fd)
236{
237 if (tgt_fd > MAX_FD)
238 return -1;
239
240 return fd_map[tgt_fd];
241}
242
243void
244Process::serialize(std::ostream &os)
245{
246 SERIALIZE_SCALAR(initialContextLoaded);
247 SERIALIZE_SCALAR(brk_point);
248 SERIALIZE_SCALAR(stack_base);
249 SERIALIZE_SCALAR(stack_size);
250 SERIALIZE_SCALAR(stack_min);
251 SERIALIZE_SCALAR(next_thread_stack_base);
252 SERIALIZE_SCALAR(mmap_start);
253 SERIALIZE_SCALAR(mmap_end);
254 SERIALIZE_SCALAR(nxm_start);
255 SERIALIZE_SCALAR(nxm_end);
256 SERIALIZE_ARRAY(fd_map, MAX_FD);
243
257
258 pTable->serialize(os);
259}
244
260
261void
262Process::unserialize(Checkpoint *cp, const std::string &section)
263{
264 UNSERIALIZE_SCALAR(initialContextLoaded);
265 UNSERIALIZE_SCALAR(brk_point);
266 UNSERIALIZE_SCALAR(stack_base);
267 UNSERIALIZE_SCALAR(stack_size);
268 UNSERIALIZE_SCALAR(stack_min);
269 UNSERIALIZE_SCALAR(next_thread_stack_base);
270 UNSERIALIZE_SCALAR(mmap_start);
271 UNSERIALIZE_SCALAR(mmap_end);
272 UNSERIALIZE_SCALAR(nxm_start);
273 UNSERIALIZE_SCALAR(nxm_end);
274 UNSERIALIZE_ARRAY(fd_map, MAX_FD);
275
276 pTable->unserialize(cp, section);
277}
278
279
245//
246// need to declare these here since there is no concrete Process type
247// that can be constructed (i.e., no REGISTER_SIM_OBJECT() macro call,
248// which is where these get declared for concrete types).
249//
250DEFINE_SIM_OBJECT_CLASS_NAME("Process", Process)
251
252

--- 287 unchanged lines hidden ---
280//
281// need to declare these here since there is no concrete Process type
282// that can be constructed (i.e., no REGISTER_SIM_OBJECT() macro call,
283// which is where these get declared for concrete types).
284//
285DEFINE_SIM_OBJECT_CLASS_NAME("Process", Process)
286
287

--- 287 unchanged lines hidden ---