process.cc (8240:38befb82b2c9) process.cc (8324:aa7a67647c7b)
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;

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

308 fdo->readPipeSource = 0;
309}
310
311
312// look up simulator fd for given target fd
313int
314Process::sim_fd(int tgt_fd)
315{
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;

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

308 fdo->readPipeSource = 0;
309}
310
311
312// look up simulator fd for given target fd
313int
314Process::sim_fd(int tgt_fd)
315{
316 if (tgt_fd > MAX_FD)
316 if (tgt_fd < 0 || tgt_fd > MAX_FD)
317 return -1;
318
319 return fd_map[tgt_fd].fd;
320}
321
322Process::FdMap *
323Process::sim_fd_obj(int tgt_fd)
324{
317 return -1;
318
319 return fd_map[tgt_fd].fd;
320}
321
322Process::FdMap *
323Process::sim_fd_obj(int tgt_fd)
324{
325 if (tgt_fd > MAX_FD)
326 panic("sim_fd_obj called in fd out of range.");
325 if (tgt_fd < 0 || tgt_fd > MAX_FD)
326 return NULL;
327
328 return &fd_map[tgt_fd];
329}
330
331bool
332Process::checkAndAllocNextPage(Addr vaddr)
333{
334 // if this is an initial write we might not have

--- 398 unchanged lines hidden ---
327
328 return &fd_map[tgt_fd];
329}
330
331bool
332Process::checkAndAllocNextPage(Addr vaddr)
333{
334 // if this is an initial write we might not have

--- 398 unchanged lines hidden ---