Re: system call and SYSCALL macro

2000-11-08 Thread Terry Lambert
> I am not using kld to implement my system call. I am just using > the old way. > > But I tried using pointers also. But I am not getting the correct > returned values either... The correct return value is probably "-1", with the value of 'z' being undefined, for what you have now. If you a

RE: system call and SYSCALL macro

2000-11-08 Thread flaw
I am not using kld to implement my system call. I am just using the old way. But I tried using pointers also. But I am not getting the correct returned values either... >= Original Message From Terry Lambert <[EMAIL PROTECTED]> = >> I just try to add a simple system call for testing

Re: system call and SYSCALL macro

2000-11-08 Thread Terry Lambert
> I just try to add a simple system call for testing: > > int my_call(int x, int y) { >return (x + y); > } > > In my user program: > > int main(int argc, char ** argv) { >int x = 3; >int y = 8; >int z = 0; >z = syscall(SYS_my_call, x, y); >printf("%i + %i = %i\n", x, y,

system call and SYSCALL macro

2000-11-06 Thread Raymond Law
Hi: I am trying to implement a system call. I used the syscalls.master already. I know I have to modify libc, but this requires makeworld and all the binaries must be compiled again. If I don't want to modify libc, I know I have to use the SYSCALL macro or something like that. But I don't know