Combine syscall code with final stack initialization code #32

Merged
td1223 merged 27 commits from read-only-exec into userprog-merge 2024-11-11 22:23:20 +00:00
4 changed files with 126 additions and 17 deletions
Showing only changes of commit 3cfbe198e0 - Show all commits

View File

@@ -249,9 +249,15 @@ syscall_write (int fd, const void *buffer, unsigned size)
} }
static void static void
syscall_seek (int fd UNUSED, unsigned position UNUSED) syscall_seek (int fd, unsigned position)
{ {
//TODO struct open_file *file_info = fd_get_file (fd);
if (file_info != NULL)
{
lock_acquire (&filesys_lock);
file_seek (file_info->file, position);
lock_release (&filesys_lock);
}
} }
static unsigned static unsigned