process: minor format/style cleanup

This commit is contained in:
Steve Reinhardt 2010-07-05 21:39:38 -07:00
parent 66f0d26059
commit 2c2f956060

View file

@ -327,6 +327,7 @@ Process::sim_fd_obj(int tgt_fd)
return &fd_map[tgt_fd];
}
bool
Process::checkAndAllocNextPage(Addr vaddr)
{
@ -355,7 +356,8 @@ Process::checkAndAllocNextPage(Addr vaddr)
// find all offsets for currently open files and save them
void
Process::fix_file_offsets() {
Process::fix_file_offsets()
{
Process::FdMap *fdo_stdin = &fd_map[STDIN_FILENO];
Process::FdMap *fdo_stdout = &fd_map[STDOUT_FILENO];
Process::FdMap *fdo_stderr = &fd_map[STDERR_FILENO];
@ -371,7 +373,7 @@ Process::fix_file_offsets() {
else if (in == "None")
stdin_fd = -1;
else {
//OPEN standard in and seek to the right location
// open standard in and seek to the right location
stdin_fd = Process::openInputFile(in);
if (lseek(stdin_fd, fdo_stdin->fileOffset, SEEK_SET) < 0)
panic("Unable to seek to correct location in file: %s", in);
@ -441,13 +443,16 @@ Process::fix_file_offsets() {
//Seek to correct location before checkpoint
if (lseek(fd,fdo->fileOffset, SEEK_SET) < 0)
panic("Unable to seek to correct location in file: %s", fdo->filename);
panic("Unable to seek to correct location in file: %s",
fdo->filename);
}
}
}
}
void
Process::find_file_offsets(){
Process::find_file_offsets()
{
for (int free_fd = 0; free_fd <= MAX_FD; ++free_fd) {
Process::FdMap *fdo = &fd_map[free_fd];
if (fdo->fd != -1) {
@ -460,7 +465,8 @@ Process::find_file_offsets(){
}
void
Process::setReadPipeSource(int read_pipe_fd, int source_fd){
Process::setReadPipeSource(int read_pipe_fd, int source_fd)
{
Process::FdMap *fdo = &fd_map[read_pipe_fd];
fdo->readPipeSource = source_fd;
}