Linux-Development-Sys Digest #561, Volume #8     Mon, 12 Mar 01 20:13:09 EST

Contents:
  Locking SysV shared memory (Friedrich Seifert)
  Re: Can linux be trusted? (Richard Heathfield)
  Re: Can linux be trusted? (Erik Max Francis)
  Re: why is mmap() unhappy?? ([EMAIL PROTECTED])
  Re: why is mmap() unhappy?? ([EMAIL PROTECTED])
  Re: Why won't RedHat 7.0 run a binary which worked in RedHat 6.x? (Dmitri A. 
Sergatskov)
  Block driver and /proc/partitions ("Mike Austin")
  The kernel equivalent of _enable() & _disable() (Matt)
  Re: How to use C++ to develope the linux driver module? (Joe Pfeiffer)
  Re: How to use C++ to develope the linux driver module? (Kaz Kylheku)
  Re: Private functions in shared library? (Roger Leigh)
  Kapm-idled doesn't reduce power consumption. (Lostsoul)
  Re: Kernel 2.4.2: aic7xxx trouble (bill davidsen)
  Re: Which m/b for Athlon SMP (bill davidsen)
  Re: The kernel equivalent of _enable() & _disable()
  AT&T vs Intel x86 asm format ("D. Stimits")
  Re: Processor ID (bill davidsen)
  Setting Linux Disk Buffer Cache (Andries Engelbrecht)
  Re: C language
  Re: Processor ID (bill davidsen)
  Re: C language (Aminudin Khalid)
  Re: pci devices
  Re: C language

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

From: Friedrich Seifert <[EMAIL PROTECTED]>
Subject: Locking SysV shared memory
Date: Mon, 12 Mar 2001 16:14:48 +0100

Hi,

after looking over the shmem code in the 2.4.x kernels I have doubts if
SysV shared memory is really locked by shmctl(shmid, SHM_LOCK, buf);. It
is true that sys_shmctl() sets the "locked" flag in the corresponding
struct shmem_inode_info, but IMO that flag is never tested in the
swapping code. There is no special swap function for shmem areas, nor
does swap_out_vma() [vmscan.c] care if it is a shared area.

Is this a bug or did I just miss something?

Regards,
        Friedrich

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

Date: Mon, 12 Mar 2001 15:07:35 +0000
From: Richard Heathfield <[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
Subject: Re: Can linux be trusted?

Kasper Dupont wrote:
> 
<snip>
> 
> This is the standard library implementation of
> strdup().

There is no strdup() in the standard library if, by that term, you mean
the library defined by the standard. I suspect the crosspost (which is
*huge*) is beginning to bite. I read your article in comp.lang.c. If
your reply was written in one of the other groups, then I certainly
understand what you're saying, but clc looks at the library from a
different angle.

> 
> char * __strdup (const char *s)

printf("%d\n", strcmp("strdup", "__strdup")); /* ;-) */

<snip>

-- 
Richard Heathfield
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R Answers: http://users.powernet.co.uk/eton/kandr2/index.html

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

From: Erik Max Francis <[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: Mon, 12 Mar 2001 09:05:49 -0800

pete wrote:

> Thanks for your thoughts.
> I've been considering a function called  strdup().
> One of my compilers just told me it was ANSI compatible,
> but the other says that it isn't and I can't find it in K&R2,
> so I think it isn't.

It isn't.

> Both compilers are familiar with it though,
> so I think it's just a common extension, like kbhit().

kbhit is a DOSism; it's extremely unportable.

> Both compilers say that stdrup() uses a call to malloc(), internally.
> I used the same syntax for calling and freeing,
> as was shown by one of my compilers usage examples.

Allocating a new buffer for each call isn't very appealing, either.  As
I said, it would be a better idea for the caller to supply the buffer
themselves.

-- 
 Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ All generalizations are dangerous, even this one.
\__/ Dumas Fils
    Polly Wanna Cracka? / http://www.pollywannacracka.com/
 The Internet resource for interracial relationships.

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

From: [EMAIL PROTECTED]
Subject: Re: why is mmap() unhappy??
Date: Mon, 12 Mar 2001 20:11:11 -0000

On Mon, 12 Mar 2001 14:43:37 +0000 Kasper Dupont <[EMAIL PROTECTED]> wrote:

| In my first posting in this thread I already said that
| would be a nice feature.

Right.  I just went into more detail.  I've found that way too
many times people misunderstand things described briefly.  Even
very smart people do, too.  I suspect its not lack of knowledge
that causes this, but rather, they "snap" to some particular
concept they know well and miss what I intended, which they may
even know as well, but assumed no one would refer to it because
it is rare.  Basically, I'm learning with many of these people
you have to get very precise in description, quite over being
what others see as overly redundant.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: [EMAIL PROTECTED]
Subject: Re: why is mmap() unhappy??
Date: Mon, 12 Mar 2001 20:12:45 -0000

On 12 Mar 2001 09:55:00 -0500 Dragan Cvetkovic <[EMAIL PROTECTED]> wrote:
| [EMAIL PROTECTED] writes:
|
|> On 12 Mar 2001 09:03:38 -0500 Dragan Cvetkovic <[EMAIL PROTECTED]> wrote:
|> | Well, at least Solaris' mmap(2) has a MAP_NORESERVE option telling
|> | operating system not to reserve swap space for the mapped pages. I am not
|> | sure about the others though.
|> 
|> That's the opposite of what I want.  I want program virtual memory to be
|> backed to swap space by default (I can make it be backed to somewhere else
|> by option in the program and/or environment easily enough).  And I want it
|> to function without particular actions by the system administrator who
|> could very well just install a stock system of any BSD flavor, any Linux
|> distribution, or any commercial vendor UNIX.
|
| Oops my bad. But what are you asking for _is_ the default with mmap(). Here
| is the rest of the text from Solaris mmap(3C) man page about MAP_NORESERVE:

But I also need to make 2 mappings of the same thing and have the data
be present in both.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: [EMAIL PROTECTED] (Dmitri A. Sergatskov)
Subject: Re: Why won't RedHat 7.0 run a binary which worked in RedHat 6.x?
Date: 12 Mar 2001 20:14:35 GMT

On 9 Mar 2001 02:16:43 GMT, Leonid A. Broukhis <[EMAIL PROTECTED]> wrote:
>
>>*Why* on earth would this happen?
>>I've never seen anything like it!  This happens with both kernel 2.4.2
>>and 2.2.16.
>
>Do
>strace ./lmgrd
>
>and see for yourself.

Will not work -- he needs ld.so.1.x.x 

>
>       Leo

Regards,

Dmitri.


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

From: "Mike Austin" <[EMAIL PROTECTED]>
Subject: Block driver and /proc/partitions
Date: Mon, 12 Mar 2001 15:47:02 -0500

Greetings!
    I'm trying to get my partitionable block driver (a module) to show up in
/proc/partitions.  Reading Rubini's books lead me to believe that
resetup_one_dev would accomplish this.  However, it doesn't seem to be
effective.  How would you get a modular partitionable block device listed in
proc partitions?

Thanks in advance!
Michael Austin



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

From: Matt <[EMAIL PROTECTED]>
Subject: The kernel equivalent of _enable() & _disable()
Date: Mon, 12 Mar 2001 20:56:29 GMT

I'm porting some Windows driver code and I've come across these little
blocks of code every so often:

#ifndef WIN32
_disable();
#endif

#ifndef WIN32
_enable();
#endif

Am I correct in assuming they are to do with interrupts? They are
wrapped around some I/O port accesses, but AFAIK the card doesn't
generate any interrupts. Are cli() and sti() the kernel equivalents? And
do I need to use them, seems as WIN32 platforms don't either?

Thanks

Matt


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

From: Joe Pfeiffer <[EMAIL PROTECTED]>
Subject: Re: How to use C++ to develope the linux driver module?
Date: 12 Mar 2001 14:01:41 -0700

"Peter T. Breuer" <[EMAIL PROTECTED]> writes:

> <[EMAIL PROTECTED]> wrote:
> >   Can  C++  be used in developing kernel module? and if yes, how
> 
> No (short answer).

The answer I prefer is ``Yes, but you *really* don't want to.''

You have to use a subset of C++ that basically does without all the
reasons most people would want to use C++ (as Peter points out, though
he does so by saying you have to implement those things in the
kernel), so you've lost all the advantages of using C++.  Also, kernel
headers use C++ key words as parameters, so you have to #define your
way around those.
-- 
Joseph J. Pfeiffer, Jr., Ph.D.       Phone -- (505) 646-1605
Department of Computer Science       FAX   -- (505) 646-1002
New Mexico State University          http://www.cs.nmsu.edu/~pfeiffer
SWNMRSEF:  http://www.nmsu.edu/~scifair

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: How to use C++ to develope the linux driver module?
Reply-To: [EMAIL PROTECTED]
Date: Mon, 12 Mar 2001 21:34:58 GMT

On 12 Mar 2001 14:01:41 -0700, Joe Pfeiffer <[EMAIL PROTECTED]> wrote:
>"Peter T. Breuer" <[EMAIL PROTECTED]> writes:
>
>> <[EMAIL PROTECTED]> wrote:
>> >   Can  C++  be used in developing kernel module? and if yes, how
>> 
>> No (short answer).
>
>The answer I prefer is ``Yes, but you *really* don't want to.''
>
>You have to use a subset of C++ that basically does without all the
>reasons most people would want to use C++ (as Peter points out, though

Actually that is false; you can use templates, operator overloading,
multiple inheritance, virtual functions, abstract base classes etc.
Global construction and exception handling, the two things you can't
use, are *not* all the reasons people use C++.

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

From: [EMAIL PROTECTED] (Roger Leigh)
Subject: Re: Private functions in shared library?
Date: Mon, 12 Mar 2001 21:43:43 +0000
Reply-To: [EMAIL PROTECTED]

On 10 Mar 2001 20:14:54 +0000, Nix <$}xinix{[email protected]> wrote:
>On Wed, 7 Mar 2001, Roger Leigh spake:
>> There is a libtool option to select which symbols to export:
>> '-export-symbols-regex stp_', seems to work, but when the information
>> is passed to the linker with
>> '-Wl,-retain-symbols-file -Wl,.libs/libgimpprint.exp' nothing actually
>> changes. Only the stp_* functions are listed in the symbol file, nothing
>> else (which is what should happen).
>
>What version of binutils do you have? Some versions (around early 2.10
>IIRC) had trouble getting ELF visibility limitations right (and made
>everything visible always, just as you're experiencing); versions before
>2.10 didn't know about it at all.

roger@whinlatter:~$ dpkg -s binutils | grep Version
Version: 2.9.5.0.37-1

I'm possibly affected then. In the end, to ensure compatibility across
most systems, I'm ditching the static library, and putting everything
that should be there in the core library code, surrounded by #defines
and declared static if used, so it's not externally visible on any
platform, regardless of what the native linker is capable of.

Thanks,
Roger

-- 
Roger Leigh ** Registration Number: 151826, http://counter.li.org **
Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/
For GPG Public Key: finger [EMAIL PROTECTED] or see public keyservers.

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

From: Lostsoul <[EMAIL PROTECTED]>
Crossposted-To: uk.comp.os.linux
Subject: Kapm-idled doesn't reduce power consumption.
Date: Mon, 12 Mar 2001 23:28:32 +0000

Kapm-idled doesn't cool down my CPU at all. I've been monitoring CPU core 
temperature with lm-sensors for my abit kt7a motherboard the temperatures 
remain pretty much constant even when kapm-idled is at 98% (ie in single 
user mode, nothing running except my shell). I would even go as far as 
saying that it actually increases CPU temperatures since mild processing, 
(eg running KDE, surfing, listening to mp3s)  in which kapm-idled is 
sleeping, consistently produces lower temps compared to idling in single 
user mode.

The upsetting thing is that WinME's idle thread on the same dual boot box 
manages to reduce the core cpu temp by a whopping 15degrees.  The temps I'm 
seeing are like this:

        Linux load (kernel builds, setiathome) - 48C
        Linux idle (single user mode) - 46C
        Linux low load (surfing, mp3 pb) - 45C
        Bios idle (looking at health status) - 45C
        WinME load - 46C
        WinME idle - 30C
        Case temp - 26C

All temps are read off the same via686a chip and everything looks properly 
calibrated. Why doesn't kapm-idled appear to reduce power consumption as 
it's supposed to?  Is it possibly an APM (linux) vs ACPI (WinME) thing?

--
ls

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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Kernel 2.4.2: aic7xxx trouble
Date: 12 Mar 2001 23:43:51 GMT

Has anyone but me tried to compile the pcmcia support for 2.4.2? Seems
to be looking in all the wrong places for its include files. I was using
3.1.23, I see that 3.1.25 is out, but I can't easily try it until
Thursday night due to other stuff happening.

However, a quick peek at the code didn't seem to address the problem.

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

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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Which m/b for Athlon SMP
Date: 13 Mar 2001 00:00:57 GMT

In article <ZRnp6.177$[EMAIL PROTECTED]>,
Chris Liddell <[EMAIL PROTECTED]> wrote:
| > AFAIK, there is no SMP chipset available for the AMD CPUs yet.
| > An article in the German c't magazine claimed that a Biathlon chipset
| > will come next summer.
| 
| AMD have been sampling/testing a bi-athlon chipset for a few months now. I
| guess summer/autumn sounds about the right time for it to hit the market.

  Guess Alpha is the way to go, then. I'm looking for at least a factor
of three faster than the 2x500 I have now, and I just don't see doing it
cheaply with Intel. I can get about 2x faster, and that's marginal,
while a dual 1.2GHz 266FSB would probably be close to 3x what I'm using
for this app.

  Yes it does SMP nicely, I could use a four way Xeon setup if it didn't
cost the earth...

  Thanks to all who gave me feedback, I think the fixes in the 2.4
kernel are against a real prototype board, but I don't have one. And
Abit sent back a nice response to my Email, saying it was very hard, and
when they got one stable they would announce it. Based on past
experience with SMP boards, I would like Abit, Tyan or $uperMicro,
but it looks grim.

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

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

From: [EMAIL PROTECTED] ()
Subject: Re: The kernel equivalent of _enable() & _disable()
Date: Tue, 13 Mar 2001 00:23:04 -0000

In article <[EMAIL PROTECTED]>,
Matt  <[EMAIL PROTECTED]> wrote:
>I'm porting some Windows driver code and I've come across these little
>blocks of code every so often:
>
>#ifndef WIN32
>_disable();
>#endif
>
>#ifndef WIN32
>_enable();
>#endif
>
>Am I correct in assuming they are to do with interrupts? They are
>wrapped around some I/O port accesses, but AFAIK the card doesn't
>generate any interrupts. Are cli() and sti() the kernel equivalents? And
>do I need to use them, seems as WIN32 platforms don't either?

Take a look at /usr/src/linux/Documentation/spinlocks.txt

--
http://www.spinics.net/linux

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

Date: Mon, 12 Mar 2001 17:24:10 -0700
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: AT&T vs Intel x86 asm format

I'm looking for a URL or other reference that will give me a cross
reference between nasm/Intel syntax asm versus AT&T/as syntax for x86
Linux.

Also, if I use gcc or g++ and compile with a -S to generate assembler,
and I end up with a "movl" line, e.g.:
movl -8(%ebp),%eax

Can someone tell me on this specific movl which exact mov instruction
this corresponds to in x86 assembler under Intel pneumonics? There is a
sizeable family of movl... instructions, but none simply named "movl"
(at least not in the Intel asm reference).

D. Stimits, [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID
Date: 13 Mar 2001 00:24:43 GMT

In article <[EMAIL PROTECTED]>,
Bruce E. Varney <[EMAIL PROTECTED]> wrote:
| The Pentium III (and the Celeron?) supports a processor ID. Is there a
| system
| call in Linux which queries this value?

No, there's an optional /dev/cpu which has /dev/cpu/0/cpuid as a char
file, and which seems to return the same value for all CPUs in the
system, so I don't know how valid this stuff is. It certainly seems to
be the same info as is in /proc/cpuinfo, in an outstandingly obscure
format.

Since Linux is about choices, I would certainly like to see an option to
put this in a safe place, like /dev/cpu/#/serial readable *only* by
root, and optional in the kernel. That would make it available, but only
to root, only with a custom kernel.

Ex:

  bilbo:davidsen> uname -a
  Linux bilbo 2.4.2-ac17 #14 SMP Sat Mar 10 12:38:22 EST 2001 i686 unknown


  bilbo:davidsen> cat /dev/cpu/0/cpuid | dd bs=1024 count=1 | md5sum
  1+0 records in
  1+0 records out
  1d6470ad8a3c7201ad150abbd1f31da8  -
  bilbo:davidsen> cat /dev/cpu/1/cpuid | dd bs=1024 count=1 | md5sum
  1+0 records in
  1+0 records out
  1d6470ad8a3c7201ad150abbd1f31da8  -

Doesn't look as if the CPUid is really there, but what do I know?

Anyway, that's the info you wanted, I compiled it in but didn't play
with it until now. BTW, in ASCII:

  bilbo:davidsen> cat /dev/cpu/0/cpuid | dd bs=64 count=1 | od -xc
  1+0 records in
  1+0 records out
  0000000 0002 0000 6547 756e 746e 6c65 6e69 4965
          002  \0  \0  \0   G   e   n   u   n   t   e   l   i   n   e   I
  0000020 0665 0000 0000 0000 0000 0000 fbff 0183
            e 006  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 377 373 203 001
  0000040 0101 0302 0000 0000 0000 0000 0841 0c04
          001 001 002 003  \0  \0  \0  \0  \0  \0  \0  \0   A  \b 004  \f
  *
  0000100
  bilbo:davidsen> cat /dev/cpu/1/cpuid | dd bs=64 count=1 | od -xc
  1+0 records in
  1+0 records out
  0000000 0002 0000 6547 756e 746e 6c65 6e69 4965
          002  \0  \0  \0   G   e   n   u   n   t   e   l   i   n   e   I
  0000020 0665 0000 0000 0000 0000 0000 fbff 0183
            e 006  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 377 373 203 001
  0000040 0101 0302 0000 0000 0000 0000 0841 0c04
          001 001 002 003  \0  \0  \0  \0  \0  \0  \0  \0   A  \b 004  \f
  *
  0000100

Hope any of this is useful.

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


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

From: Andries Engelbrecht <[EMAIL PROTECTED]>
Subject: Setting Linux Disk Buffer Cache
Date: Tue, 13 Mar 2001 00:30:05 -0000

Is it possible to set Linux to use a certain amount of RAM for disk buffer 
cache or a percentage of total RAM for this purpose?

If so, how can I do it?

I am currently using Red Hat 7 (Wolverine Beta) and is experiencing very 
good disk performance on ATA/100 disks, but as I increase block size the 
performance drops and CPU utilization increase dramatically. I believe it 
might be the disk buffer cache that is not set correctly.

Thanx

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

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

From: [EMAIL PROTECTED] ()
Subject: Re: C language
Date: Tue, 13 Mar 2001 00:30:26 -0000

In article <[EMAIL PROTECTED]>,
Aminudin Khalid  <[EMAIL PROTECTED]> wrote:

>Please explain the following C language statement.Thank you.
>
>  //declaration
>
>  typedef BOOLEAN (*Open)(void, unsigned long , int);
>
>
>  //execute
>
>  ((Open)(buffer->port_open))(buffer->context, 1,port_number);

Homework?

--
http://www.spinics.net/linux

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

From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID
Date: 13 Mar 2001 00:32:03 GMT

In article <[EMAIL PROTECTED]>,
Dave Blake <[EMAIL PROTECTED]> wrote:

| Presumably because things like flex license manager work
| by querying the MAC address. Making the MAC address
| inaccessible by default would disable lots of functionality.

Connecting computers by network for one.

| I would assume having a queryable MAC address is also part of
| network protocols.

The MAC address is used for level 2 (from memory) routing, etc. The ARP
protocol depends on this, and all packets sent to any machine are really
sent to the MAC address regardless of the IP. This is how alias works,
by associating the same MAC with multiple IPs.

| In linux there are command line options to fake the MAC address
| when you load a module for an ethernet card. So it is really
| quite trivial to be whatever MAC address you like, as long as
| your network device is loaded as a module. 

Dave, I'm unsure of this being the case. At least the last time I
looked, the 'ethers' option actually loaded the MAC address into some
memory on the card, normally set with the default. Cards (or drivers)
which didn't support this capability did not allow this. I think it's
done at a hardware level, so the card can compare the MAC in a packet
with the address before accepting the packet. Promiscuous mode bypasses
this.

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

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

From: Aminudin Khalid <[EMAIL PROTECTED]>
Subject: Re: C language
Date: Tue, 13 Mar 2001 16:37:23 +0800
Reply-To: [EMAIL PROTECTED]


==============DD33108CC06C8F2DDE4B9B97
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

It's not my homework . I am trying  to understand a device driver source
code .

Thanx ........... :-)

[EMAIL PROTECTED] wrote:

> In article <[EMAIL PROTECTED]>,
> Aminudin Khalid  <[EMAIL PROTECTED]> wrote:
>
> >Please explain the following C language statement.Thank you.
> >
> >  //declaration
> >
> >  typedef BOOLEAN (*Open)(void, unsigned long , int);
> >
> >
> >  //execute
> >
> >  ((Open)(buffer->port_open))(buffer->context, 1,port_number);
>
> Homework?
>
> --
> http://www.spinics.net/linux



==============DD33108CC06C8F2DDE4B9B97
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<p>It's not my homework . I am trying&nbsp; to understand a device driver
source code .
<p>Thanx ........... :-)
<p>[EMAIL PROTECTED] wrote:
<blockquote TYPE=CITE>In article &lt;[EMAIL PROTECTED]>,
<br>Aminudin Khalid&nbsp; &lt;[EMAIL PROTECTED]> wrote:
<p>>Please explain the following C language statement.Thank you.
<br>>
<br>>&nbsp; //declaration
<br>>
<br>>&nbsp; typedef BOOLEAN (*Open)(void, unsigned long , int);
<br>>
<br>>
<br>>&nbsp; //execute
<br>>
<br>>&nbsp; ((Open)(buffer->port_open))(buffer->context, 1,port_number);
<p>Homework?
<p>--
<br><a 
href="http://www.spinics.net/linux">http://www.spinics.net/linux</a></blockquote>

<pre></pre>
&nbsp;</html>

==============DD33108CC06C8F2DDE4B9B97==


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

From: [EMAIL PROTECTED] ()
Subject: Re: pci devices
Date: Tue, 13 Mar 2001 00:35:42 -0000

In article <z9Dq6.3922$[EMAIL PROTECTED]>,

Moe <[EMAIL PROTECTED]> wrote:
>I am looking for information containing PCI device class/subclass codes.
>How do I detect weather device is MEM, NETWORK, MULTIMEDIA, DISPLAY, BRIDGE?
>I found code for concrete venors and devices i.e. 3com and 3c509c, but not
>classes.

There's a list in Pci Hardware and Software by Ed Solari:

  http://www.amazon.com/exec/obidos/ASIN/0929392639/ricksphotograpag/

--
http://www.spinics.net/linux/

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

From: [EMAIL PROTECTED] ()
Subject: Re: C language
Date: Tue, 13 Mar 2001 00:53:14 -0000

In article <[EMAIL PROTECTED]>,
Aminudin Khalid  <[EMAIL PROTECTED]> wrote:

>It's not my homework . I am trying  to understand a device driver source
>code .
>
>Thanx ........... :-)

Oh, sorry.  The homework thing happens all too often here ;)

>[EMAIL PROTECTED] wrote:
>
>> In article <[EMAIL PROTECTED]>,
>> Aminudin Khalid  <[EMAIL PROTECTED]> wrote:
>>
>> >Please explain the following C language statement.Thank you.
>> >
>> >  //declaration
>> >
>> >  typedef BOOLEAN (*Open)(void, unsigned long , int);
>> >
>> >
>> >  //execute
>> >
>> >  ((Open)(buffer->port_open))(buffer->context, 1,port_number);

Ok, buffer->port_open is a pointer to a function that
returns BOOLEAN.

--
http://www.spinics.net/linux

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


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

Reply via email to