tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Per Boussard, ERA/T/VU" <per () era-t ! ericsson ! se>
To: tru64-unix-managers
Subject: syscall() on dunix
Date: Sun, 29 Nov 1998 17:36:59 +0000	[thread overview]
Message-ID: <96078728412250.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~1998-11-29 17:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox