Linux-Development-Sys Digest #741, Volume #7      Wed, 5 Apr 00 01:13:19 EDT

Contents:
  Re: To core or not to core - You tell me (mike burrell)
  recompiling with onboard NIC !!!!! help meeee plz
  Re: To core or not to core - You tell me (Joe Pfeiffer)
  Re: Getting IP address of self in C? ([EMAIL PROTECTED])
  Re: SMP Hang, please help (ravi Venkat)
  Re: SMP Hang, please help (ravi Venkat)
  Re: no swap (Paul Kimoto)
  FB foolin around (Stephen)
  Re: To core or not to core - You tell me (Kaz Kylheku)
  Linking error with thread program (Chuck Winters)
  Re: Random system hangs on Compaq P166/2.2.14 (Bill Hayles)
  Re: pthread lib ? (nilesh patel)
  Re: Bootdisks, rdev, and root filesystems...aargh! ("Michael Westerman")
  Re: TCP_KEEPALIVE and TCP_MAXRT (Manjunatha M S)

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

From: mike burrell <[EMAIL PROTECTED]>
Subject: Re: To core or not to core - You tell me
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.lang.c++,comp.unix.programmer
Date: Wed, 05 Apr 2000 01:10:49 GMT

In comp.unix.programmer David Williams <[EMAIL PROTECTED]> wrote:
>   a) 0 == NULL (an integral constant expression with value 0...
>      converted by comparsion...this produces a null pointer..)
>      ^^^^^^^^^^^^^^^^^^^^^^^
>      ??? are they the same or not?? NB A conversion could be taking
>      place implying that they are not.

okay what this means is that:

a) NULL must evaluate to the null pointer
b) the 0 constant, when assigned to a pointer, must evaluate to the null
pointer
c) the null pointer cannot compare equal to a pointer to any valid object
d) any two null pointers must compare equal

basically what this says is that NULL and 0 may be completely different, but
0 must == NULL.  also, neither of them can point to anything valid.  i
should hope that any sane implementor would just set NULL to 0 or (void *)0
(as most do).

theoretically, though, you could have something like this:

printf("%p %p %p\n", NULL, 0, (void *)0);

and it would print out three completely different numbers (though passing
the unadorned NULL and unadorned 0 would cause implementation-defined
behaviour, but we'll ignore that for now).

for all well-defined practices, though (e.g. not doing the above), NULL and
0 will always be effectively synonymous wrt pointers.

-- 
              /"\                              m i k e    b u r r e l l
              \ /     ASCII RIBBON CAMPAIGN             [EMAIL PROTECTED]
               X        AGAINST HTML MAIL      http://mikpos.dyndns.org
              / \

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

From: <[EMAIL PROTECTED]>
Subject: recompiling with onboard NIC !!!!! help meeee plz
Date: Wed, 05 Apr 2000 01:30:03 GMT

i need to recompile manrake 6.1 kernel with an onborad NIC 
how do i do that ?

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

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

From: Joe Pfeiffer <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.lang.c++,comp.unix.programmer
Subject: Re: To core or not to core - You tell me
Date: 04 Apr 2000 19:50:34 -0600

David Williams <[EMAIL PROTECTED]> writes:
> 
>   a) 0 == NULL (an integral constant expression with value 0...
>      converted by comparsion...this produces a null pointer..)
>      ^^^^^^^^^^^^^^^^^^^^^^^
>      ??? are they the same or not?? NB A conversion could be taking
>      place implying that they are not.

This is a subtle point, and you've picked up on it perfectly.  It is
possible, in principle, for the conversion to take place so that
(void *) 0 is not a word full of all zeroes, and NULL need not be
represented as all zeroes.

Having said that, I don't know of any actual implementation using
anything other than all zeroes for NULL.

>   b) A null pointer is not equal to any pointer to an object. Hence
>      deferencing a null pointer to get an object is not valid here!!

Right.
-- 
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
VL 2000 Homepage:  http://www.cs.orst.edu/~burnett/vl2000/

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

Subject: Re: Getting IP address of self in C?
From: [EMAIL PROTECTED]
Date: 05 Apr 2000 02:40:22 +0200

[EMAIL PROTECTED] (Pete Cavender) writes:

Hi
> 
> How can I get my IP address from C?  I used to use gethostid() but with
> newer kernels that doesn't seem to work...I can run ifconfig and dig
> through the text and look for it, bu there has to be a C way...  Thanks!

may be http://ivs.cs.uni-magdeburg.de/~elkner/tilo/if2ip.c helps ...

Have fun,
jens.
-- 
+---[ Jens Elkner ]--------------------------------------------------------+
| Walther-Rathenau-Str. 58                 [EMAIL PROTECTED]              |
| 39104 Magdeburg   GERMANY              http://www.linofee.org/           |
+--------------------------------------------------------------------------+

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

From: ravi Venkat <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux
Subject: Re: SMP Hang, please help
Date: Tue, 04 Apr 2000 18:50:41 -0700

bill davidsen wrote:

> In article <[EMAIL PROTECTED]>,
> ravi Venkat  <[EMAIL PROTECTED]> wrote:
> |
> | We are facing a hard hang on 2.2.14 SMP kernel (red hat) while doing
> | heavy
> | multi-threaded i/o using a software raid driver.
>
>   Is this a BP6 (dual Celeron socket 370) m/b by chance? If so you will
> need to wait for a 2.4 kernel, which has fixes for the problem.
>
> --
> bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
>   "Doing interesting things with little computers since 1979"(tm)
> The hardest test of maturity is knowing the difference between
> resisting temptation and missing a once-in-a-lifetime opportunity.

Thanks for the reply. Its not a dual celeron socket. ALso I tried couple
other
machines in the lab and I get the same behavior. One thing to note is that

it works fine on a single processor machine (on 2.2.X as well as 2.3.x)
The problem is seen only on SMP in 2.3.x, which we thought will increase
the
raid resyncs and parity calculations...

-- Ravi


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

From: ravi Venkat <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux
Subject: Re: SMP Hang, please help
Date: Tue, 04 Apr 2000 18:53:13 -0700

Bryan wrote:

> is your motherboard chip (bx, I'm assuming) very hot?  I'd look to that first.
>
> In comp.os.linux.development.system ravi Venkat <[EMAIL PROTECTED]> wrote:
> : Hello all,
>
> : We are facing a hard hang on 2.2.14 SMP kernel (red hat) while doing
> : heavy
> : multi-threaded i/o using a software raid driver.
>
> --
> Bryan, http://Grateful.Net (ANTISPAM: email is my name at my web's domain)
>
> (c) 2000.  Publishing and/or relaying of this material on all forums other than
> USENET implies agreeing to a consultancy fee of US$150 per posting.  You must
> obtain a written permit before you publish.  Violators are subject to civil
> prosecution for Copyright Infringement as applicable.  Publication by C|NET
> and Microsoft Networks expressly prohibited.

I can't possibly tell, I am not supposed to open the  machine... Lab dudes will
kick me (or
worst case will kill me for that...) But if we are spinning on the cpu, my guess
would be
Yes, the chip would be hot as a frying pan

Rav


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

From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: no swap
Date: 4 Apr 2000 23:19:25 -0500
Reply-To: [EMAIL PROTECTED]

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> I'm preparing to set up a Linux system without swap space.  I know how to
> do this, so it's not a question for c.o.l.setup.  It was running just fine
> with 128meg RAM and 160meg swap and rarely got about about 8meg (as reported
> by "top") into the swap space.  I've now increased RAM to 384meg and I want
> to disable swap altogether.  But I notice that it has swapped about 2meg
> anyway, despite RAM usage not being above 100meg yet.  What I would like
> to know is why, and what the impact will be if there is no swap space at
> all (besides the fact that no confidential data will be on disk that was
> not written explicitely).

As I understand it, this is the expected behavior for 2.2.* (and,
presumably, later) kernels.  The kernel occasionally goes around
to look for pages to swap out even if there is no immediate need.
If you are not under any kind of memory pressure at all, these
are probably pages that you are unlikely ever to use.  You can
get top(1) to tell you which processes those swapped-out pages
belong to.

If you have no swap space at all, I believe that the kernel looks
for pages to swap out anyway.  This time it spends will be wasted.

-- 
Paul Kimoto             <[EMAIL PROTECTED]>

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

From: Stephen <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: FB foolin around
Date: Wed, 05 Apr 2000 03:23:47 GMT

Ok, I have been interested in this "frame buffer" support in the 2.2
kernels so I decided to see what I can do with it.  I set out to
basically switch to some graphic mode and set a pixel. This is not as
straight forward as I thought and need a little help.

I used ioctl FBIOGET_VSCREENINFO and it returned info for a mode
640x480x4 bits. This is fine for my doodling. However, I am unclear
about how to sucessfully switch to this mode. I used something like:
ioctl(tty, KDSETMODE, KD_GRAPHICS);
but this only puts me in a 640x480x1bit mode. Ok I can put a pixel on
the screen in this mode but monochrome is not what I'd like. Any ideas
out there on what I am screwing up.

Also, I have the fbvesa stuff compiled in. I'd love to be able to query
the card and see what modes it supports and then set one.

Any help is appreciated!!!

Stephen



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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.lang.c++,comp.unix.programmer
Subject: Re: To core or not to core - You tell me
Reply-To: [EMAIL PROTECTED]
Date: Wed, 05 Apr 2000 03:21:19 GMT

On Wed, 5 Apr 2000 00:32:37 +0100, David Williams <[EMAIL PROTECTED]>
wrote:
>In article <8cdmjd$15fv$[EMAIL PROTECTED]>, -hs-
><[EMAIL PROTECTED]> writes
>>Juergen Heinzl a �crit dans le message ...
>>[...] too...
>>>
>>>You should think of what the compiler is, probably, going to
>>>generate:
>>>
>>>ptr is NULL, so the base address is 0x00000000. a is an integer and
>>
>>
>>Wow ! In your machine perhaps, but the C-language does not guarantee a NULL
>>pointer to be at address 0.
>>
>
>  The C Programming Language Second Edition
>  Brian W. Kernigan
>  Dennis Ritchie
>  ISBN 0-13-110362-8
>
>  Page 102 Half way down...
>
>
>  "Pointers and integers are not interchangeable. Zero is the sole 
>   exception: the constant zero may be assigned to a pointer, and a 
>   pointer may be compared with the constant 0. The symbolic constant
>   NULL is often used in place of zero, as a mnemonic to indicate more
>   clearly that this is a special value for a pointer. NULL is defined
>   in <stdio.h>"

Note that this text is not the standard. The first edition of the book
served as the base document.

>  ?? Is NULL==0?? This says that it often is...

It says that the *constant zero* may be used in a pointer context.
The text is right, though not detailed.

An integral constant expression whose value is zero serves *is* in fact
a null pointer constant in the appropriate contexts.
In other words, it is just a semantic marker denoting a null pointer.

A null pointer's representation doesn't have be a zero address.

Thus on some peculiar system, the expression

    char *p = 0;

may result in p pointing to, say, the address 0x7FFFFFFF.  In effect,
0, or any constant expression with that value like 2 - 2, serves
in a way that is analogous to the ``nil'' keyword in Pascal.

The comp.lang.c FAQ contains an extended discussion of null pointers
which really drives the important points home.


-- 
#exclude <windows.h>

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

From: Chuck Winters <[EMAIL PROTECTED]>
Subject: Linking error with thread program
Date: Wed, 05 Apr 2000 03:34:02 GMT

Hello All,
        I am trying to create a small program using threads(I'm bored).  I was
wondering how to reconcile this linking error I am getting when I try to
compile and linke the program.  I am sure I will have to use a command line
option to redirect the compiler to the right library, but which library should
I point to?  Any help would be appreciated.  

Chuck Winters

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

From: Bill Hayles <[EMAIL PROTECTED]>
Crossposted-To: uk.comp.os.linux
Subject: Re: Random system hangs on Compaq P166/2.2.14
Date: Tue, 04 Apr 2000 19:37:11 +0200
Reply-To: [EMAIL PROTECTED]

On 4 Apr 2000 15:19:33 GMT, [EMAIL PROTECTED] (Stephen Marley)
wrote:

>Stephen Marley <[EMAIL PROTECTED]> wrote:
>> Thanks for the tips, Tim. APM is disabled in the bios and I didn't
>> compile support for it in my kernel. I've gone back to the SuSE 6.3
>> 2.2.13 kernel which doesn't have the Via udma support and I've removed
>> the older 16mb dimm. Hopefully one of these mods will make a difference.
>
>Well none of that worked and the system still hangs, apparently at
>random.
>
>Won't any of the kernel experts out there offer some insight on this?
>
>I'm reaching the conclusion that it's somehow hardware related and that
>I'm going to have to fork out for a new motherboard, case and CPU.
>
>Could it just be overheating? It's only a P166 but there's no fan, only
>a heatsink.

I'm running the same model (but with 32Mb and no ISDN card) as my server
here using SuSE 6.3 and it's been up for weeks.  I doubt it's
overheating - that's the way Compaq built the things, and there's a good
air flow around the processor.  As an off-the-wall diagnosis, I'd
suspect an iffy 64Mb RAM chip.

>From Benitachell, Alicante, Spain
Bill Hayles
[EMAIL PROTECTED]

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

From: nilesh patel <[EMAIL PROTECTED]>
Crossposted-To: comp.programming.threads
Subject: Re: pthread lib ?
Date: Wed, 05 Apr 2000 10:34:13 +0530

Fabrice Peix wrote:

> nilesh patel wrote:
> >
> > I wrote a simple program with pthread library.
> > I found that when you one create a thread you could see three entries in
> > ps .
> > What is the third entry for ?
> One thread is the thread manager,second is the primary thread and the
> last the thread you create

Please correct me if I am wrong..
I think there will only be one thread manager .
What are the responsibilty of the thread manager?
    Allocate thread stack  . (only one I could think of ).
The stack which is allocated is malloced () os any  address lower than the
current stack pointer is given as stack pointer to the newly created thread.
And as the thread page faults new page is allocated.



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

From: "Michael Westerman" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.misc
Subject: Re: Bootdisks, rdev, and root filesystems...aargh!
Date: Wed, 5 Apr 2000 15:04:11 +1000

hava look at tombst.

a single linux on a disk dist'n it even give instructions on customising it.
includes kernel and compressed ramdisk image chokablock with utils.

his web sight may help.

Neil Koozer <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Don Werve wrote:
> >
> > Ok.  After reading the Bootdisk-HOWTO and rdev manpages, I decided to
> > start on the path to true geekdom and make my own Linux bootdisk, so
> > that I could manually build a Linux system from the ground up on one of
> > my many spare computers.  I've been using Linux for about two years now,
> > but what better way to learn about the guts of the OS than to manually
> > build a full system?
> >
> > Anyways, I made a root filesystem that compressed takes up 900K, and
> > have a 460K kernel.  I used dd to copy the kernel image to the disk, and
> > then used `rdev /dev/fd0 /dev/fd0 ; rdev -R /dev/fd0 0` to set the disk
> > as it's own root device.  How do you tell the kernel where to look for a
> > compressed root filesystem, so that it can be uncompressed into a
> > ramdisk and booted...?
> >
> > Ideas?  Sorry about the cross-post, but it seemed applicable to each
> > newsgroup posted to.  Please reply via E-Mail, to hari AT iveleague.org
> >
> > Thanks in advance! :)
>
> This is in the "Setting the ramdisk word" section of the Bootdisk-HOWTO.
>
> For a 2-disk boot/root pair, you would use
> rdev -r /dev/fd0 49152
> 49152 is 0xc000
>
> For a single boot/root disk you would use 0x4000 + the offset to the
> start of the compressed ramdisk image.  The offset is the number of 1k
> blocks.
>
> Neil



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

From: Manjunatha M S <[EMAIL PROTECTED]>
Crossposted-To: comp.protocols.tcp-ip,comp.os.linux.networking
Subject: Re: TCP_KEEPALIVE and TCP_MAXRT
Date: Wed, 05 Apr 2000 10:28:47 +0530


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


In the BSD Implementations,TCP_KEEPALIVE timer is a combination of
TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT . Richard Stevens'
Illustrated TCP/IP VOl. 1 and Vol 2 has a detailed descrption of how
KEEPALIVE timer works. In brief
tcp_keepalive is the sum of tcp_keepidle and ( tcp_keepintvl *
tcp_keepcnt). default values for these are tcp_keepidle=2 Hrs,
tcp_keepintvl=75 Secs. and tcp_keepcnt=8. This means any TCP connection
which has turned  ON keepalive option on its socket, after an idle time
of  tcp_keepidle, starts sending keepalive probes. This probe will be
transmitted (tcp_keepcnt+1) no. of times in the interval of
tcp_keepintvl . If an ACK comes for the probe packet, then the
TCP_KEEPIDLE is reset and the connection will be alive for next
TCP_KEEPIDLE period. If there are no responses for any of the probes
sent, the connection will be dropped.

cheers
Manju


"J.P. Martin-Flatin" wrote:

> In "Unix Network Programming, Networking APIs: Sockets and
> XTI", Stevens mentions that Posix.1g defines two new TCP
> socket options:
>
>  - TCP_KEEPALIVE (p. 201)
>  - TCP_MAXRT     (p. 202)
>
> In Linux 2.3.99pre3, there are no such options defined in
> /var/k/linux/net/ipv4/tcp.c
>
> Instead, we find TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT to
> control per-socket keepalives, and nothing at all to control
> "the amount of time in seconds before a connection is broken
> once TCP starts retransmitting data".
>
> Does this mean that Linux 2.3.99pre3 is not Posix.1g compliant,
> or that Posix.1g has been superseded by a new version which
> Linux adheres to? I don't have access to Posix standards so I
> can't check this.
>
> Any help would be greatly appreciated.
>
> JP

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

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
&nbsp;
<br>In the BSD Implementations,TCP_KEEPALIVE timer is a combination of
TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT . Richard Stevens' Illustrated
TCP/IP VOl. 1 and Vol 2 has a detailed descrption of how KEEPALIVE timer
works. In brief
<br>tcp_keepalive is the sum of tcp_keepidle and ( tcp_keepintvl * tcp_keepcnt).
default values for these are tcp_keepidle=2 Hrs, tcp_keepintvl=75 Secs.
and tcp_keepcnt=8. This means any TCP connection which has turned&nbsp;
ON keepalive option on its socket, after an idle time of&nbsp; tcp_keepidle,
starts sending keepalive probes. This probe will be transmitted (tcp_keepcnt+1)
no. of times in the interval of tcp_keepintvl . If an ACK comes for the
probe packet, then the TCP_KEEPIDLE is reset and the connection will be
alive for next TCP_KEEPIDLE period. If there are no responses for any of
the probes sent, the connection will be dropped.
<p>cheers
<br>Manju
<br><font size=-1></font>&nbsp;
<p>"J.P. Martin-Flatin" wrote:
<blockquote TYPE=CITE>In "Unix Network Programming, Networking APIs: Sockets
and
<br>XTI", Stevens mentions that Posix.1g defines two new TCP
<br>socket options:
<p>&nbsp;- TCP_KEEPALIVE (p. 201)
<br>&nbsp;- TCP_MAXRT&nbsp;&nbsp;&nbsp;&nbsp; (p. 202)
<p>In Linux 2.3.99pre3, there are no such options defined in
<br>/var/k/linux/net/ipv4/tcp.c
<p>Instead, we find TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT to
<br>control per-socket keepalives, and nothing at all to control
<br>"the amount of time in seconds before a connection is broken
<br>once TCP starts retransmitting data".
<p>Does this mean that Linux 2.3.99pre3 is not Posix.1g compliant,
<br>or that Posix.1g has been superseded by a new version which
<br>Linux adheres to? I don't have access to Posix standards so I
<br>can't check this.
<p>Any help would be greatly appreciated.
<p>JP</blockquote>
</html>

==============EC8E939DB3B08764B243A8DE==


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


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