ahmad
ahmad

Reputation: 11

Implementing vfork() in xv6

If I want to add my system call vfork(copy on write) what exactly need to be edited in syscall.c? Where would I add my fragment of vfork's code. In short, how would I implement vfork in xv6?

Upvotes: 1

Views: 593

Answers (1)

suneet saini
suneet saini

Reputation: 610

For adding the system call in xv6's shell; amend the following files:

  • sysproc.c add the real implementation of your method here
  • syscall.h define the position of the system call vector that connect to your implementation
  • user.h define the function that can be called through the shell
  • syscall.c external define the function that connect the shell and the kernel, use the position defined in syscall.h to add the function to the system call vector
  • usys.S use the macro to define connect the call of user to the system call function

Also you can check the following link.

Upvotes: 1

Related Questions