Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Commit

Permalink
fix syscall tell
Browse files Browse the repository at this point in the history
  • Loading branch information
CCXXXI committed Jan 10, 2021
1 parent 318359d commit 14a73fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/userprog/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,10 @@ static unsigned tell(int fd)
struct open_file *f = get_file_by_fd(fd);

lock_acquire(&file_lock);
file_tell(f->file);
int ret = file_tell(f->file);
lock_release(&file_lock);

return ret;
}

/* Closes file descriptor FD. Exiting or terminating a process implicitly
Expand Down

0 comments on commit 14a73fb

Please sign in to comment.