From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078728412250.tru64-unix-managers.marc@archive.invalid> From: "Per Boussard, ERA/T/VU" Date: Sun, 29 Nov 1998 17:36:59 +0000 To: tru64-unix-managers Subject: syscall() on dunix X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078728412250 Hello, I sincerely hope I'm not annoying somebody with this question which may be considered a bit off-topic. However, it's concerned with a problem which is a major stumbling-block to me in my sysadmin-chores. I've spent several hours searching the net for information, so I'll give this a shot. If somebody has a suggestion for a better list for this question I'll be grateful. I'm writing a loadable kernel module which installs a syscall into the sysent[]. I've guessed (with the aid of some source which does stuff of this kind) the interface to be such that I can say rc = syscall(int syscall_number, int arg); in userland. In the kernel this is matched by int my_modules_syscall(struct proc *p, void *v, int *i); In this case, the returned valued sets errno, p is a pointer to my process and I should set *i to what I want my syscall to return. I can get arg by saying local_arg = *(int *)v; So far, so good. The problem is that I'm trying to pass a second argument to syscall (to the kernel) but I can't seem to make it work, and I feel that I lack documentation. I can't find any documentation about the syscall() in the man-page. It says syscall() is dated and an alternative interface is documented in chmod(2). Looking in chmod(2) I don't see any alternative interface documented. None of the two obvious generalisations of the successful formula for the one-parameter case seems to work, although I may be mistaken there. Does somebody have a clue? Thanks for your time. //Per ---- Per Boussard, KI/ERA/T/VU Office: +46 8 404 55 11 UNIX System Administrator Fax: +46 8 757 55 50 Ericsson Radio Systems AB Home: +46 8 570 349 67 S-164 80 STOCKHOLM, SWEDEN Email: Per.Boussard@era-t.ericsson.se