Linux-Development-Sys Digest #957, Volume #7     Fri, 16 Jun 00 18:13:22 EDT

Contents:
  Problem solved... ([EMAIL PROTECTED])
  Re: syscall (Michael F Gordon)
  Re: Device driver programming (John Gluck)
  is there anybody who has ever added a new system call???? ("Paolo Romano")
  What the difference between fork and thread? (Chan Chi Lung)
  Re: Pseudo terminals and PPP ("jj the bouncing fish")
  Re: Kernel memory and DMA (David Weis)
  Re: What the difference between fork and thread? (Greg Wimpey)
  R: syscall ("@LeX")
  R: syscall ("@LeX")
  VFS: grow_buffers: size=65536 (Gustavo)
  Re: VFS: grow_buffers: size=65536 (Gustavo)
  Re: Kernel memory and DMA (John Gluck)
  equivalent to NT registry ([EMAIL PROTECTED])
  kernel functions ([EMAIL PROTECTED])
  Re: equivalent to NT registry (Kaz Kylheku)
  Re: Good Basic compiler for linux? ("Michael Moll")
  Re: Venture Capital Available for Startups
  Tomcat/J2EE compatibility (Greg)
  Re: Pseudo terminals and PPP (Tim Morneau)
  Re: Kernel memory and DMA (Brett Johnson)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED]
Subject: Problem solved...
Date: Fri, 16 Jun 2000 13:20:14 GMT

I've found the answer to my question...
it was a problem of copy&paste and
read&understand :-( ...

By the way...
what is the meaning of the 4th parameter
in the file_operations-structure in read and write????

struct file_operations {
...
   ssize_t (*read) (struct file *, char *, size_t, loff_t *);
   ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
...
}

Anybody know this?


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED] (Michael F Gordon)
Subject: Re: syscall
Date: 16 Jun 2000 13:41:41 GMT

In <8Bb25.205970$[EMAIL PROTECTED]> "@LeX" <aleefaby*NOSPAM*@libero.it> 
writes:
>I'm tryin' to write a new syscall that makes atomic sys_lseek and sys_write
>(I'll call it atomic_read from here)

The kernel already has pread() and pwrite() - /usr/src/linux/fs/read_write.c
- but that doesn't really matter if you're just doing this to learn about
kernel programming.

>I've added a new entry for that in the entry.S  and <linux/unistd.h> files.
>I've also updated the counter in the entry.S file.
>I've placed the prototype for atomic_read in <unistd.h>.
>Ok... now that's the question :
>I've written a small program to test atomic read.
>I've compiled it with the follow string :
>$gcc -O2 -Wall my_read_test.c -o my_test
> the result is an error from the linker, which doesn't resolve the reference
>to atomic_read.

When compiling user-space programs the compiler doesn't link against
kernel code, just libc etc.  All the standard system calls have a 
stub routine in libc which puts the arguments and the system call
number into the right places and does an int 0x80 to jump into the
kernel - see .../sysdeps/unix/sysv/linux/i386/pwrite.c in the libc
source for the pwrite() stub.

You can use syscall() to access system calls that there isn't a stub
for in libc.


Michael
--
Quidquid latine dictum sit, altum viditur.

------------------------------

From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: Device driver programming
Date: Fri, 16 Jun 2000 09:41:17 -0400

Aside from published books (some others already responded with), there's
nothing better than looking at a driver for a similar device.
There is also http://www.linuxdoc.org and http://metalab.unc.edu/mdw/index.html

Also of interest http://linux.devx.com/ and
http://metalab.unc.edu/linux-source/

Hope it helps

"Joseph Lyman" wrote:

> I would like to start working on some abandoned and unfinished projects-
> specifically I would like to take over the Logitech scanner project (since I
> happen to have one floating around my house) as well as write some backends
> for the sane project.
>
> Programming is one of my passions, but I havent done any device drivers yet.
> any tips or places to start? All information would be greatly appreciated.
>
> Thanks in advance
>
> Joseph Lyman
> [EMAIL PROTECTED]

--
John Gluck  (Passport Kernel Design Group)

(613) 765-8392  ESN 395-8392

Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.




------------------------------

From: "Paolo Romano" <[EMAIL PROTECTED]>
Subject: is there anybody who has ever added a new system call????
Date: Fri, 16 Jun 2000 16:50:46 +0200





------------------------------

From: Chan Chi Lung <[EMAIL PROTECTED]>
Subject: What the difference between fork and thread?
Date: 16 Jun 2000 15:16:38 GMT

Dears,
        I want to ask what's the difference between fork and thread.

Moreover, I was find that the execution time of thread is far faster than
the execution time of fork.  I want to ask what's the reason about that.


Best Regards,

Jason Chan

------------------------------

From: "jj the bouncing fish" <[EMAIL PROTECTED]>
Subject: Re: Pseudo terminals and PPP
Crossposted-To: 
comp.os.linux.misc,comp.os.linux.development.apps,comp.os.linux.networking
Date: Fri, 16 Jun 2000 15:58:45 GMT

sounds like you want PPPoe (PPP over Ethernet).  It is used by ADSL users
in Ontario, Canada so bell can control their usage...  I have had two
streams running from the same computer before.

I know there is source out there for it.  

good luck

Craig Allan Jeffree <[EMAIL PROTECTED]> wrote in article
<[EMAIL PROTECTED]>...

>         If anyone can offer some suggestions it would be a great help.
> 
> Thanks for your advice

------------------------------

From: David Weis <[EMAIL PROTECTED]>
Subject: Re: Kernel memory and DMA
Date: Fri, 16 Jun 2000 10:58:44 -0500


I don't think you will have much luck with this under Linux. You could
check on the linux kernel mailing list. 

david

On Fri, 16 Jun 2000, Carlton Teel wrote:

> My company is currently using Solaris 7 on a project.  We have a
> PCI board that needs to allocate kernel memory to do DMA tasks.  With
> Solaris 7, our limit is 256 MB.  We have been told by Sun that Solaris 8
> will support 1 GB when Update 2 of Solaris 8 is released.  An
> application we plan on developing next year will need 3 GB of kernel
> memory locked down to do the DMA function.  Does Linux support this?  If
> so, is it different between the various distributions of Linux?
> 
> Thanks,
> Carlton
> 

-- 
David Weis                | 10520 New York Ave, Des Moines, IA 50322
[EMAIL PROTECTED]      | Voice 515-278-0133 Ext 231
                          | http://www.perfectionlearning.com/
When they took the Fourth Amendment, I was quiet because I didn't deal drugs.
When they took the Fifth Amendment, I was quiet because I was innocent.
When they took the Second Amendment, I was quiet because I didn't own a gun.
Now they've taken the First Amendment and I can't say anything.


------------------------------

From: Greg Wimpey <greg.wimpey@waii*removetomail*.com.invalid>
Subject: Re: What the difference between fork and thread?
Date: 16 Jun 2000 10:23:58 -0600

Chan Chi Lung <[EMAIL PROTECTED]> writes:

> Dears,
>       I want to ask what's the difference between fork and thread.
> 
> Moreover, I was find that the execution time of thread is far faster than
> the execution time of fork.  I want to ask what's the reason about that.
> 

A call to fork() causes the kernel to set up an entirely new process.
That is, a new address space must be set up, file descriptors
duplicated, etc.  A new thread, however, is part of the same process.
That is, it shares the memory address space, file descriptors, etc.,
with the other threads in the process.  In fact, if I recall, the term
"lightweight process" is a synonym for "thread".

I'm not an expert in these matters, but that's how I see it.  Someone
please correct me if I'm wrong.

-- 
Greg Wimpey greg.wimpey@westgeo*removetomail*.com Despam to reply.

------------------------------

From: "@LeX" <aleefaby*NOSPAM*@libero.it>
Subject: R: syscall
Date: Fri, 16 Jun 2000 16:40:04 GMT


V.Vijay Kumar <[EMAIL PROTECTED]> wrote in message
8icrjb$blu$[EMAIL PROTECTED]
> Have u recompiled the kernel? If u havent this is how u do it:
>
> Goto /usr/src/linux
> Place ur system call .c file in the kernel sub dir
> Then add the entry of .o file for OBJS in the Makefile
> Now for recompiling:
> make config
> make depend
> make
> make boot
>
> The new kernel is found as arch/i386/boot/zImage

Yes, I've done it just after writing my function...
I've also readed the man of syscalls...
I've included in my test-program the file <sys/syscall.h>
but... It doesn't works :-(((((((((((((((((((((((

Can you help me??

@LeX

#define __TRUE__ "C is Better"





------------------------------

From: "@LeX" <aleefaby*NOSPAM*@libero.it>
Subject: R: syscall
Date: Fri, 16 Jun 2000 16:42:13 GMT


Michael F Gordon <[EMAIL PROTECTED]> wrote in message
8idaql$ck5$[EMAIL PROTECTED]
> In <8Bb25.205970$[EMAIL PROTECTED]> "@LeX"
<aleefaby*NOSPAM*@libero.it> writes:
> >I'm tryin' to write a new syscall that makes atomic sys_lseek and
sys_write
> >(I'll call it atomic_read from here)
>
> The kernel already has pread() and pwrite() -
/usr/src/linux/fs/read_write.c
> - but that doesn't really matter if you're just doing this to learn about
> kernel programming.

Yes... It's only a programming exercise :-)
>
> >I've added a new entry for that in the entry.S  and <linux/unistd.h>
files.
> >I've also updated the counter in the entry.S file.
> >I've placed the prototype for atomic_read in <unistd.h>.
> >Ok... now that's the question :
> >I've written a small program to test atomic read.
> >I've compiled it with the follow string :
> >$gcc -O2 -Wall my_read_test.c -o my_test
> > the result is an error from the linker, which doesn't resolve the
reference
> >to atomic_read.
>
> When compiling user-space programs the compiler doesn't link against
> kernel code, just libc etc.  All the standard system calls have a
> stub routine in libc which puts the arguments and the system call
> number into the right places and does an int 0x80 to jump into the
> kernel - see .../sysdeps/unix/sysv/linux/i386/pwrite.c in the libc
> source for the pwrite() stub.
>
> You can use syscall() to access system calls that there isn't a stub
> for in libc.
>
Ok, thanx!!
But now, may you tell me how I must use that syscall() ??
Thanx a lot

@LeX

#define __TRUE__ "C is Better"
> Michael
> --
> Quidquid latine dictum sit, altum viditur.



------------------------------

From: Gustavo <[EMAIL PROTECTED]>
Subject: VFS: grow_buffers: size=65536
Date: Fri, 16 Jun 2000 09:35:43 -0700

Hi,

I'm trying to upgrade my linux box to kernel 2.2.16 and I'm
getting the following message at boot time (it keeps
scrolling on my screen):

VFS: grow_buffers: size=65536

What's going on?

My computer is a running slackware 7.0 on kernel 2.2.15. I
have two stripe sets (one is ~4GB and the other is ~7.3 GB).

TIA,

        Gustavo.


* Sent from AltaVista http://www.altavista.com Where you can also find related Web 
Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

------------------------------

From: Gustavo <[EMAIL PROTECTED]>
Subject: Re: VFS: grow_buffers: size=65536
Date: Fri, 16 Jun 2000 10:16:59 -0700

Hi,

Right after posting it I've found a patch on Alan Cox's
site. The url is:

http://www.linux.org.uk on the kernel info.

        Thanks,
                Gustavo.


* Sent from AltaVista http://www.altavista.com Where you can also find related Web 
Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

------------------------------

From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: Kernel memory and DMA
Date: Fri, 16 Jun 2000 13:42:26 -0400

Whoah that's a mighty powerful DMA buffer.

Are you using Sparcs or Intel??

The best thing to do is probably download the kernel and lookat the code.

I know the 2.4 kenel supports many gigs of RAM on the intel but whether on
not it's available for DMA I can't say. But it's Linux... If you want it
add it

Carlton Teel wrote:

> My company is currently using Solaris 7 on a project.  We have a
> PCI board that needs to allocate kernel memory to do DMA tasks.  With
> Solaris 7, our limit is 256 MB.  We have been told by Sun that Solaris 8
> will support 1 GB when Update 2 of Solaris 8 is released.  An
> application we plan on developing next year will need 3 GB of kernel
> memory locked down to do the DMA function.  Does Linux support this?  If
> so, is it different between the various distributions of Linux?
>
> Thanks,
> Carlton

--
John Gluck  (Passport Kernel Design Group)

(613) 765-8392  ESN 395-8392

Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.




------------------------------

From: [EMAIL PROTECTED]
Subject: equivalent to NT registry
Date: Fri, 16 Jun 2000 18:01:33 GMT

hi,
 I am new to linux drivers.
I would like to know if their is anything in linux, equivalent to
registry in NT,
I want to store some driver specific information across reboots.
The information should be accessible to user mode programs.


regards
jeseem


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED]
Subject: kernel functions
Date: Fri, 16 Jun 2000 18:20:45 GMT

Hi,
  I am new to linux drivers.
I want to know where i can find a basic listing of Kernel functions and
their documentation.

regards
jeseem


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: equivalent to NT registry
Reply-To: [EMAIL PROTECTED]
Date: Fri, 16 Jun 2000 18:46:19 GMT

On Fri, 16 Jun 2000 18:01:33 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>hi,
> I am new to linux drivers.
>I would like to know if their is anything in linux, equivalent to
>registry in NT,

Yes, a combination various text files in the /etc directory tree and
.* files in user home directories.

>I want to store some driver specific information across reboots.
>The information should be accessible to user mode programs.

You then should add a script, which runs when run level 6 is entered, which
deposits the information to a well-known text file.

This technique is already used by some Linux distributions to save the
random seed information across reboots.

-- 
#exclude <windows.h>

------------------------------

From: "Michael Moll" <[EMAIL PROTECTED]>
Subject: Re: Good Basic compiler for linux?
Date: Fri, 16 Jun 2000 19:40:26 +0200

Steven Yap <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
[EMAIL PROTECTED]
> "dave" <[EMAIL PROTECTED]> writes:
>
> > I manage a small team of VB programmers and I am looking for a Basic
> > Compiler and IDE for Linux. I have seen Xbasic and some others but
>
> There's XBasic at http://www.maxreason.com/software/xbasic/xbasic.html
> which you might want to check out.
>
You can't read! Steven writes, that he knows XBasic, but this do not compare
to VB!


--
Michael Moll

http://home.t-online.de/home/micha.moll
[EMAIL PROTECTED]




------------------------------

From: <[EMAIL PROTECTED]>
Subject: Re: Venture Capital Available for Startups
Date: Fri, 16 Jun 2000 20:30:07 GMT

Dear Mr.George Lechter,

My name is J.Jothiraja.

We are having a web site http://www.aghilham.com ,
which we want to develop and promote.

WE are looking for venture capital financing for the same.

Will you please guide and help?

Regards,
J.Jothiraja
===================================================
George Lechter wrote:
> 
>      Our fund manages eighty million dollars now available for venture
> capital financing.  This venture capital is available for Internet
> related companies, wireless projects, Palm OS, and other software
> programs.  We are interested in startups and in ongoing concerns.
> 
>      Angel projects (startups) are funded from $ 50,000 to $ 2,000,000.
> 
>      A team of MIT entrepreneurs manages our fund, with 20 years of
> experience in high technology.
> 
>       Please contact George Lechter at [EMAIL PROTECTED] or call
> 305-933-2026 or 1-800-222-3003.
> 


--
Posted via CNET Help.com
http://www.help.com/

------------------------------

From: Greg <[EMAIL PROTECTED]>
Subject: Tomcat/J2EE compatibility
Date: Fri, 16 Jun 2000 14:20:50 -0400
Reply-To: [EMAIL PROTECTED]

Now that Sun has released a J2EE (EJB-enabled) SDK for Linux, does
anyone know if it will integrate with Jakarta/Tomcat?


------------------------------

From: Tim Morneau <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.misc,comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Pseudo terminals and PPP
Date: Fri, 16 Jun 2000 15:10:27 -0600

A newer term PPPoe would be VPN or Virtual Private Network that uses an
NAS or Network Access Server to control multiple PPP sessions.  This is
a somewhat over simplified description but one that will serve for the
moment.

tim

jj the bouncing fish wrote:
> 
> sounds like you want PPPoe (PPP over Ethernet).  It is used by ADSL users
> in Ontario, Canada so bell can control their usage...  I have had two
> streams running from the same computer before.
> 
> I know there is source out there for it.
> 
> good luck
> 
> Craig Allan Jeffree <[EMAIL PROTECTED]> wrote in article
> <[EMAIL PROTECTED]>...
> 
> >         If anyone can offer some suggestions it would be a great help.
> >
> > Thanks for your advice

------------------------------

From: Brett Johnson <[EMAIL PROTECTED]>
Subject: Re: Kernel memory and DMA
Date: Fri, 16 Jun 2000 15:17:59 -0600
Reply-To: [EMAIL PROTECTED]

Carlton Teel wrote:
> 
> My company is currently using Solaris 7 on a project.  We have a
> PCI board that needs to allocate kernel memory to do DMA tasks.  With
> Solaris 7, our limit is 256 MB.  We have been told by Sun that Solaris 8
> will support 1 GB when Update 2 of Solaris 8 is released.  An
> application we plan on developing next year will need 3 GB of kernel
> memory locked down to do the DMA function.  Does Linux support this?  If
> so, is it different between the various distributions of Linux?

Wuf, that is one honkin' DMA buffer!  What platform are you wanting to
run Linux on?  Be aware that on the IA32 platform, you're restricted to
a maximum of 4gig physical RAM.

There are a couple of approaches to getting memory for a DMA buffer:

 1) you can call alloc_pages, but that's limited to 64k per allocation.
    So, if you want 3gig of contiguous memory, you'll have to call it a
    lot of times, and hope the memory is all allocated contiguously!

 2) you can tell the kernel not to use the upper 3gig of physical RAM
    before it boots, then map this memory into kernel space later.  This
    is done from the lilo prompt as you're booting up, i.e.:

    lilo: linux mem=1024M

    on a 4gig machine this will leave 3gigs of RAM unused by the kernel,
    then the driver for your card is free to map & use this memory.

Cheers!
-- 
Brett Johnson <[EMAIL PROTECTED]>
HP Technical Solutions Laboratory
     -  i  n  v  e  n  t  -

------------------------------


** 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 (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

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
******************************

Reply via email to