Linux-Development-Sys Digest #567, Volume #8 Thu, 15 Mar 01 08:13:10 EST
Contents:
Linux device programming and control (Aminudin Khalid)
Re: problem using poll for multiple socket (Rud)
Re: kernel panic with IKD ("lfree")
Problem with rpc.lockd [lockd] process (Helmut Kreiser)
Re: Continuing NFS problems, thru Linux Kernel 2.4.2? (Stefaan A Eeckels)
Re: Continuing NFS problems, thru Linux Kernel 2.4.2? (Stefan Boresch)
Re: Kmalloc ("Mikael Chambon")
Re: Continuing NFS problems, thru Linux Kernel 2.4.2? (Peter Mardahl)
Re: Can linux be trusted? ("Tauno Voipio")
Tuning Java process running on Linux ("Nick Redshaw")
comps and hdlist in RH Linux CD. (Brian Lere)
Re: Linux 2.4 network performances (compared to 2.2) (Jerome Tollet)
Re: Can linux be trusted? ("Dik T. Winter")
Re: How to count a period of time? (Kasper Dupont)
Re: system call interface to insmod (Kasper Dupont)
Re: comps and hdlist in RH Linux CD. (Kasper Dupont)
Errno and kernel ("Mikael Chambon")
Re: syscall problem (Kasper Dupont)
----------------------------------------------------------------------------
From: Aminudin Khalid <[EMAIL PROTECTED]>
Subject: Linux device programming and control
Date: Thu, 15 Mar 2001 17:15:28 +0800
Reply-To: [EMAIL PROTECTED]
==============11A2EEB578017C30476F057B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have been asking around to get any information for AMR device programming
interface or may be something that is similar to PCI programming interface .
I think there is no such interface that has been developed in Linux
because AMR device is still new and there are only a few of AMR hardware in
the market.
What should I do to develop my AMR board ? Any suggestion would be
appreciated .
Thank you.
[EMAIL PROTECTED] wrote:
> In article <[EMAIL PROTECTED]>,
> Aminudin Khalid <[EMAIL PROTECTED]> wrote:
>
> >If we are developing a program that will control a PCI devices, normally
> >we use the "<linux/pci.h>" functions
> >and structs . What should I use if I want to control ISA device or AMR
> >devices ?Does linux provide any specific
> >library to control and access these kind of peripherals ?
>
> Have you looked at some sources yet? There are a lot of examples
> in the kernel distribution.
>
> --
> http://www.spinics.net/linux/
==============11A2EEB578017C30476F057B
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<br>I have been asking around to get any information for AMR device
programming interface or may be something that is similar to PCI programming
interface . I think there is no such interface that has been developed
in Linux because AMR device is still new and there are only a few
of AMR hardware in the market.
<p>What should I do to develop my AMR board ? Any suggestion would be appreciated
.
<p>Thank you.
<br>
<p>[EMAIL PROTECTED] wrote:
<blockquote TYPE=CITE>In article <[EMAIL PROTECTED]>,
<br>Aminudin Khalid <[EMAIL PROTECTED]> wrote:
<p>>If we are developing a program that will control a PCI devices, normally
<br>>we use the "<linux/pci.h>" functions
<br>>and structs . What should I use if I want to control ISA device
or AMR
<br>>devices ?Does linux provide any specific
<br>>library to control and access these kind of peripherals ?
<p>Have you looked at some sources yet? There are a lot of examples
<br>in the kernel distribution.
<p>--
<br><a
href="http://www.spinics.net/linux/">http://www.spinics.net/linux/</a></blockquote>
<pre></pre>
</html>
==============11A2EEB578017C30476F057B==
------------------------------
From: Rud <[EMAIL PROTECTED]>
Subject: Re: problem using poll for multiple socket
Date: Wed, 14 Mar 2001 23:25:59 -0800
The way I implement the poll(), I have too thread on is waiting for incoming
data the other is waiting to be signal
there is data do be send.. when I initialise my poll array I set my pipe in
the first fds then set the waiting socket on the second one ant set the
others to -1 to ignore any event
/* they all wait for a POLLIN*/
poll_array[0].fd = my_pipe[0];
poll_array[1].fd = my_sock;
while(index < max_index){poll_array[index].fd = -1;index++}
in the waiting thread I set my timeout to 60000
then I wait on the poll
ret = poll(poll_array,max_index ,timeout);
when poll return with a positive value I first look for the fds
in a for loop if it is a POLLIN I thren read the data and set it in a
incoming_queue
then the request is treated then I return to wait again and when the
request_is_treated it then set
data to be read in a to_send_queue then singal that data must be sent the
other thread wake up
an try to send the data if success it then return to sleep and wait to be
signal again if send failed and errno is set to
EAGAIN the sending thread then set the POLLOUT event for the fds write some
data to the pipe and return no data is send to the socket before the POLLOUT
event, if and when it is raise I try to send the data then remove the POLLOUT
event to avoid been call again for that event.
But what I found is sometimes I never get that event and I can not sent
anymore to any socket they all return with EAGAIN in errno if for example I
set a counter_try when the number of try equal max_try I close the socket and
delete the data and only then I 'm able to send again to the pending socket. I
was using fcntl with the set flag O_NONBLOKING I change that for ioctl() now I
dont get the EAGAIN anylonger I also set the setsockopt to redefine the send
and the rcv buffer... but I steel wonder How come sometimes I never get the
POLLOUT event
with the poll function because I will find my self in that situation again
when I lot of user are connected to the server
thanks
[EMAIL PROTECTED] wrote:
> On Tue, 13 Mar 2001 20:57:54 -0800 Rud <[EMAIL PROTECTED]> wrote:
>
> | I all I'm using the poll function to wait on multiple fd all fd are
> | non-blocking
> | when I try to send data to the socket and I get an error
> | and if errno is set to EAGAIN I set for my fd the POLLOUT flag
> | like this my_poll[i].events |= POLLOUT
> | and I have a pipe to force the poll to read again all descriptors
> | to do that I write to the pipe.
> | my question is sometimes I never get the POLLOUT event and no data can
> | be sent to the pending socket afer that since if I force it while not
> | having the POLLOUT event
> | I always get the EAGAIN set in errno if for example I close the socket I
> | can send again to the remaining socket
> | my bet is for reason All socket are block.
> | can some one help figure out what is going on since I dont want to have
> | to close the socket for all pending socket
> | when ever I get errno set to EAGAIN and I dont want to try to send
> | forever
> | if you need more information please let me know or if my problem is not
> | clear
>
> Some code would help to se what youa re doing wrong. But you should not
> need to close anything to use anything else.
>
> When poll() wakes up, it returns the number of fds which are aready.
> You can just test for a non-zero value and go on. If it is zero,
> then it was some other wakeup like a timeout or signal.
>
> Scan through the poll structure for ready fds and try again to write
> or read based on which are ready. It is possible to get EAGAIN yet
> again, and if that happens it should be treated the same as before.
> This might happen if resources are strained an not enough space is
> immediately available. If you had just written data to a previous
> fd this is slightly more likely now.
>
> Be sure to NOT list any fds in the struct for which your program has
> no current interest in writing (has nothing write right now) or in
> reading. You'd get false wakeups from poll() if you did that, when
> the fd is ready even if you have nothing to write. The same goes
> for read. If there is data ready to be read, but your program has
> no interest in reading it at the moment (maybe because the buffer
> to read it into is full because its waiting to write it out to some
> other fd) then don't give it to poll().
>
> If you successfully write or read any fd, poll() is pointless. Go
> back and write or read more, until either you do get EAGAIN, or the
> program no longer has interest in writing or reading. If you do
> call poll() it will most likely just return immediately because the
> fd you had success with most likely is still ready. Just assume it
> is ready until you find that it is not.
>
> --
> -----------------------------------------------------------------
> | Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
> | [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
> -----------------------------------------------------------------
------------------------------
From: "lfree" <[EMAIL PROTECTED]>
Subject: Re: kernel panic with IKD
Date: Thu, 15 Mar 2001 14:22:06 +0800
Your harddisk is SCSI harddisk,you must compile
scsi chip into kernel.
if you compile modules,you must create initrd.img ,
man mkinitrd .
"Omkar Sathe" <[EMAIL PROTECTED]> wrote in message
news:98ogvj$omq$[EMAIL PROTECTED]...
> Hello,
>
> I installed IKD patches today for 2.2.12 kernel,
>
> After I booted the machine with the new kernel, after LILO started loading
> the image, it gave the error:
>
> kernel panic: VFS: Unable to mount root fs on 08:01
>
> Any ideas ?
>
> TIA
>
> Omkar Sathe
------------------------------
From: Helmut Kreiser <[EMAIL PROTECTED]>
Subject: Problem with rpc.lockd [lockd] process
Date: Thu, 15 Mar 2001 08:35:44 +0100
Hi,
we have a cluster of some linux systems, which are connected via nfs
to a server. On this server the process [lockd] (rpc.lockd) doesn't
exist any more. After reboot, the process vanish. Now, mailing has problems
to send mail locally that serversystem.
does anybody no,
- what this process does
- why (perhaps) this process stops working
- and where some documantation exists ?
Thanks in advance
Helmut
--
========================================================================
G S I -- Gesellschaft fuer Schwerionenforschung
Dr. Helmut Kreiser e-Mail: [EMAIL PROTECTED]
-DV&EE- Computing
System Manager DEC/OpenVMS and Linux
========================================================================
------------------------------
From: [EMAIL PROTECTED] (Stefaan A Eeckels)
Subject: Re: Continuing NFS problems, thru Linux Kernel 2.4.2?
Date: Thu, 15 Mar 2001 00:54:18 +0100
In article <98oosa$1qh$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Peter Mardahl) writes:
> Yes, NFS server support is compiled into the kernel.
> I can mount the filesystem remotely AND I can read the
> files on it. However, Digital UNIX cannot lock files on it.
Have you considered that it might be a bug in Digital UNIX?
--
Stefaan
--
How's it supposed to get the respect of management if you've got just
one guy working on the project? It's much more impressive to have a
battery of programmers slaving away. -- Jeffrey Hobbs (comp.lang.tcl)
------------------------------
From: Stefan Boresch <[EMAIL PROTECTED]>
Subject: Re: Continuing NFS problems, thru Linux Kernel 2.4.2?
Date: 15 Mar 2001 09:28:15 +0100
> Have you considered that it might be a bug in Digital UNIX?
Possible, but unlikely. I have the same problem as the original
poster even between Linux machines.
The problem of the original poster arises when he tries to access a
remote mail spool directory. I have the same problem between linux
machines (mail programs such as mail, elm, mutt cannot lock the mail
spool); my solution is to mount the mail spool directory with the
'nolock' option on the clients. I am not satisfied, because I now can
read my mail simultaneously from two clients -- with occasional
unpredictable results (well, I get confused somewhere, and I am logged
on several machines at a time :-)
I think it is fairly common wisdom that NFS is *not* one of linux
strengths; if someone would enlighten me how I am supposed to export/mount
a central mail spool (for incoming mail!) from the clients to the
problems described, I would really appreciate it!
Stefan
PS: Problem arises between RH 6.2 server<->client, as well as
between RH 6.2 (server), and an experimental machine with kernel 2.4.2-ac3,
latest mount etc... Permissions are not the problem, all machines
are in the same NIS network!
------------------------------
From: "Mikael Chambon" <[EMAIL PROTECTED]>
Subject: Re: Kmalloc
Date: Thu, 15 Mar 2001 10:08:20 +0100
Thanks
--
Mikael Chambon
[EMAIL PROTECTED] || [EMAIL PROTECTED]
ICQ 10249913 || http://www.cronos.org
"Joseph A. Knapka" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Mikael Chambon wrote:
> >
> > Hi,
> >
> > Just a question, when you prpgram in the kernel,
> > when do you have to use kmalloc ?? Can't we use malloc ?
>
> No! None of your standard libc friends are avialable within
> the kernel. That's why printk(), kmalloc(), etc. exist.
>
> > In the case I must use kmalloc, which priority should I use ??
>
> Read the commentary in mm/slab.c re. kmalloc(). Probably you
> want GFP_ATOMIC if you're allocating within a device driver.
> Otherwise, just choose whatever is appropriate.
>
> HTH,
>
> -- Joe
>
> > Thanks for all,
> >
> > Best regards,
> >
> > Mikael Chambon
>
> -- Joe Knapka
> "It was just a maddened crocodile hidden in a flower bed. It could
> have happened to anyone." -- Pratchett
------------------------------
From: [EMAIL PROTECTED] (Peter Mardahl)
Subject: Re: Continuing NFS problems, thru Linux Kernel 2.4.2?
Date: 15 Mar 2001 09:25:21 GMT
>Have you considered that it might be a bug in Digital UNIX?
>Stefaan
No, because doing searches on Linux + locking has turned up
reports of problems.
Also, it's like the other poster said: NFS is *not* one of
Linux's strengths.
This is truly a pity: it's been hindering my use of Linux
in a production environment for a long time, and it just
gives Linux's detractors a big fat target.
PeterM
------------------------------
From: "Tauno Voipio" <[EMAIL PROTECTED]>
Crossposted-To:
comp.lang.c,comp.os.linux.development.apps,comp.sys.be.programmer,comp.sys.mac.programmer.misc,comp.unix.bsd.freebsd.misc,comp.unix.bsd.misc,gnu.gcc
Subject: Re: Can linux be trusted?
Date: Thu, 15 Mar 2001 09:28:18 GMT
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...
> In article <[EMAIL PROTECTED]>, Willam Hughes <me> wrote:
>
> >The question of how you store your floating point numbers
> >(e.g. implicit leading 1 or not) has nothing to do with
> >whether a given real number x has an exact binary
> >representation. (clearly all integers have an exact
> >binary representation).
>
> But we are not speaking of integers. How floating point represents
> a number is what is important here.
>
> How do you think 0.3 is represented in IEEE floating point?
>
The IEEE floating point is a binary representation. What matters here for
the discussion is whether the mantissa fraction is an unending binary
representation.
0.3 in binary = 0.010011001100110011001....
For IEEE representation it is normalised into the interval 0.5 <= x < 1.0,
which gives the representation of 0.6, but the result is still unending =>
10.0 / 3.0 cannot be represented exactly. If a dumb truncation to integer is
made, the result is either 2 or 3.
Tauno Voipio
tauno voipio @ iki fi
------------------------------
From: "Nick Redshaw" <[EMAIL PROTECTED]>
Subject: Tuning Java process running on Linux
Date: Thu, 15 Mar 2001 09:44:38 -0000
Hi
I've developed a high performance UDP packet reflector server in Java. My
target platform is a Linux Redhat (2.4). machine which will be dedicated to
running this one application.
I'm looking for any information regarding ways of tuning the server and how
best to run the process so that it can use as much of the machine's
resources (CPU, memory, I/O etc.) as possible.
I've already tried the heap size switches on the Java interpreter but these
don't seem to help.
Is there a way to run a Java application with real-time priority?
Regards,
Nick
------------------------------
From: Brian Lere <[EMAIL PROTECTED]>
Subject: comps and hdlist in RH Linux CD.
Date: Thu, 15 Mar 2001 10:29:24 GMT
Hi,
I updated RPMs and added more RPMs in RH Linux 7.0. I got a program
which update the RPM database file in CD.
(They're in $(CD_ROOT)/RedHat/base/{comps,hdlist})
But, you know there are two CDs in RH 7.0 or higher. I don't know
how to handle them when two CDs. How can I put some options on
``genhdlist'' program for two CDs? Or where can I get a program which
can control RPM files which is in 2 CDs?
Thanks for your reading/posting and sorry for bas English.
- Brian,.
------------------------------
From: Jerome Tollet <[EMAIL PROTECTED]>
Subject: Re: Linux 2.4 network performances (compared to 2.2)
Date: Thu, 15 Mar 2001 13:30:19 +0100
Thanks for your answer.
Parameters of /proc/sys/net/core/*mem* are the same in 2.2.18 and 2.4.2.
My NIC is an SMC 9432 TX using epic100 driver.
The strange fact is that my cpu is not under high load (both in 2.2 and
2.4.2).
I don't knwo what means the new /proc/sys/net/core/*cong* but those
parameters are the standards one fixed by the kernel!
I think that linux 2.4.2 limits the number of packets sent per second
over the network.
Thanks
bill davidsen wrote:
>
> In article <[EMAIL PROTECTED]>,
> Jerome Tollet <[EMAIL PROTECTED]> wrote:
> | Hello, i have written a program which only sends udp datagrams over the
> | network.
> | Under linux 2.2, i can send 12 Mbyte/s.
> | Under linux 2.4, i can only send 4Mbyte/s : but the cpu usage is very
> | low !
> | Is it a tuning problem ?
>
> Let us hope so! You might want to provide the NIC/driver info, and the
> tuning parameters you used in /proc/sys when you set it up.
>
> I'm hoping better drivers bail me out of some network issues, I sure
> hope 2.4 is faster. It seems to be from limited testing, but all I use
> hard is tcp, so I can't really compare to your case.
>
> --
> bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
> At LinuxExpo Sun was showing Linux applications running on Solaris.
> They don't get it, the arrow points the other way. There's a reason why
> there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
> religion, a way of life, and only incidentally an operating system.
--
========================
Jerome Tollet
[EMAIL PROTECTED]
www.qosmos.net
========================
------------------------------
From: "Dik T. Winter" <[EMAIL PROTECTED]>
Crossposted-To:
comp.lang.c,comp.os.linux.development.apps,comp.sys.be.programmer,comp.sys.mac.programmer.misc,comp.unix.bsd.freebsd.misc,comp.unix.bsd.misc,gnu.gcc
Subject: Re: Can linux be trusted?
Date: Thu, 15 Mar 2001 12:25:52 GMT
In article <[EMAIL PROTECTED]> [EMAIL PROTECTED] () writes:
> In article <[EMAIL PROTECTED]>, Willam Hughes <me> wrote:
> >The question of how you store your floating point numbers
> >(e.g. implicit leading 1 or not) has nothing to do with
> >whether a given real number x has an exact binary
> >representation. (clearly all integers have an exact
> >binary representation).
>
> But we are not speaking of integers. How floating point represents
> a number is what is important here.
But you responded to the line:
> >YES! 3d = 1.1b * 2^1b
which shows clearly that it was about integral values.
>
> How do you think 0.3 is represented in IEEE floating point?
That is irrelevant.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: How to count a period of time?
Date: Thu, 15 Mar 2001 12:36:25 +0000
Roland Smith wrote:
>
> Derek Viljoen <[EMAIL PROTECTED]> writes:
>
> > use gettimeofday().
> >
> > InterFan wrote:
> >
> > > I want to count a period of time in my program. I want the time be
> > > precise to 1/1000 seconds.
> > > I think the function "time()" can't be used to solve it. And I tried
> > > function "clock(()".
> > > But this function just return "0".
> > > How will I do?
> > > thanks.
> > >
> > >
> > > Best Regards,
> > > Chuan He
>
> On Linux, gettimeofday and other timers have a precision of 1/100 of a
> second (see /usr/include/bits/time.h).
>
> The only way of getting a higher timer resolution is accessing some
> machine-specific registers available on Pentium and newer processors.
>
> You can find them in the file msr.h in the kernel source code (in the
> include/asm-i386/ directory). Usage is something like:
>
> long long t0, t1; /* long long is a GNU extension! */
>
> rdtscll(t0);
> /* do something you want to time. */
> rdtscll(t1);
>
> printf ("%Ld clock ticks\n", t1-t0);
>
> Hope this helps,
>
> Roland
> --
> Roland Smith "When life hands you a lemon,
> r s m i t h @ x s 4 a l l . n l make lemonade."
> http://www.xs4all.nl/~rsmith/
If a TSC is present the precision of gettimeofday is not
1/100 second but 1/1000000 second. What is best of using
gettimeofday or using the TSC directly depends on your
needs.
TSC Is faster and give a a better resolution. But OTOH
gettimeofday knows how to handle SMP, and will convert
the values to microseconds for you.
On a 350MHz AMD K6/2 gettimeofday took approximately
one microsecond (320-360 cycles), while reading the TSC
took only 9 cycles.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: system call interface to insmod
Date: Thu, 15 Mar 2001 12:42:50 +0000
Derek Viljoen wrote:
>
> I would suspect that the "correct" way of acomplishing this is through
> depmod. But, AFAIK you wouldn't be able to pick and choose what module
> you want based on state within your dependent module. So, if you are
> making programatic choices on which module at runtime, then you could
> use these system calls.
>
> Kasper Dupont wrote:
>
> > Jothi P Neelamegam wrote:
> >
> >> Hi All,
> >>
> >> Is there a system call interface to insmod - i.e. can I insmod a module
> >> from inside a c program, rather than from console.
> >>
He didn't ask how to insert a module from the kernel.
He asked how to insert a module from a program.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: comps and hdlist in RH Linux CD.
Date: Thu, 15 Mar 2001 12:55:27 +0000
Brian Lere wrote:
>
> Hi,
>
> I updated RPMs and added more RPMs in RH Linux 7.0. I got a program
> which update the RPM database file in CD.
> (They're in $(CD_ROOT)/RedHat/base/{comps,hdlist})
>
> But, you know there are two CDs in RH 7.0 or higher. I don't know
> how to handle them when two CDs. How can I put some options on
> ``genhdlist'' program for two CDs? Or where can I get a program which
> can control RPM files which is in 2 CDs?
>
> Thanks for your reading/posting and sorry for bas English.
>
> - Brian,.
You can give multiple paths as argument to genhdlist.
If you run genhdlist without arguments it prints this
information:
genhdlist [--withnumbers] [--hdlist <path>] <paths>+
--
Kasper Dupont
------------------------------
From: "Mikael Chambon" <[EMAIL PROTECTED]>
Subject: Errno and kernel
Date: Thu, 15 Mar 2001 13:58:26 +0100
Hi everybody
Just a little question about errno, when I want to put a error message using
the errno
variable I just have to put the good code in sys_nerr that's it ??
And if the user call perror (in userland), he should has the error message
associated with the value of sys_nerr, that's it ?
As I am doing a syscall (so in the kernel), should I take some special
precautions??
thanks for all !!
--
Mikael Chambon
[EMAIL PROTECTED] || [EMAIL PROTECTED]
ICQ 10249913 || http://www.cronos.org
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: syscall problem
Date: Thu, 15 Mar 2001 12:59:50 +0000
Joseph A. Knapka wrote:
>
> SPM wrote:
> >
> > Hey - I did the same thing but can't get it to work either.
> > I keep getting 'unresolved symbol systest' when I compile the user-space app which
> > tries to call the new system call.
> > I did an 'nm' on libc and found that vfork, as an example, is a symbol in libc
>(vfork
> > is # 190 in the unistd.h file).
> > Do I need to recompile libc to contain this info?
>
> The libc code is not going to know anything about your new magic
> syscall. You will probably need to write a piece of code that
> supplies your arguments in the way that syscalls expect, and then
> does an "int 0x80" in inline assembler to enter kernel mode and
> execute the syscall. The syscall number should be in the EAX
> register before the interrupt is triggered, but I don't know
> for sure how other args are passed to syscalls. I think it's
> via registers, but Use the Source to be sure.
>
> HTH,
>
> -- Joe
>
> >
> > Mikael Chambon wrote:
> >
> > > Hi,
> > >
> > > I 've just put my new system call to a kernel 2.2.18 and I've got some
> > > problem with it now.
> > > As there is a printk inside, at boot and all the time my syscall is
> > > called each time that I executed a program
> > > I don't know what is going on, here is what I did:
> > >
> > > Here is my system call
> > >
> > > ==== systest.c ====
> > > #include <kernel.h>
> > >
> > > asmlinkage int sys_systest(int val)
> > > {
> > > printk("systest called with %d\n", val);
> > > return (0);
> > > }
> > > ==== end systest.c ====
> > >
> > > I went in arch/i386/kernel/entry.S (in your kernel tree) and add new entry:
> > >
> > > .long SYMBOL_NAME(sys_systest) /* 191 */
> > >
> > > and change .rept NR_syscalls-190 to .rept NR_syscalls-191
> > >
> > > And then I went in include/asm/unistd.h (in your kernel tree) and add a new
>entry:
> > >
> > > #define __NR_systest 191
> > >
> > > And when I rebooted on my new kernel I've got the problem,
> > >
> > > Did I miss something ??
> > >
> > > Thanls for all.
> > >
> > > --
> > > Mikael Chambon
> > > [EMAIL PROTECTED] || [EMAIL PROTECTED]
> > > ICQ 10249913 || http://www.cronos.org
>
> -- Joe Knapka
> "It was just a maddened crocodile hidden in a flower bed. It could
> have happened to anyone." -- Pratchett
You just have to write a few lines in the begining
of your program or in a header file.
This example shows how to access syscall number 166
which has 2 arguments.
#include <asm/unistd.h>
#define __NR_vm86new 166
static inline _syscall2(int,vm86new,unsigned long,
subfunction,struct vm86plus_struct*,info)
--
Kasper Dupont
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************