David
David

Reputation: 753

How to pass arguments to system call at xv6?

I am trying to implement a new system call at xv6. Had some trouble to pass arguments. Lets say this is my system call.

sys_mySystemcall(int* x ,struct myStruct * y);

How do I get these 2 pointers at sysproc.c? Thanks,

Upvotes: 1

Views: 5299

Answers (1)

David
David

Reputation: 753

The helper functions argint, argptr, argstr,and argfd retrieve the n’th system call argument, as either an integer, pointer, a string,or a file descriptor.

Upvotes: 2

Related Questions