Linux-Development-Sys Digest #210, Volume #7     Sun, 19 Sep 99 14:14:15 EDT

Contents:
  Re: What are "do { something } while(0) #defines for??? (Villy Kruse)
  Re: Statically linked binaries - why so big? (Peter Samuelson)
  Re: kernel_lock (David Lee)
  Re: kernel_lock (Peter Samuelson)
  Start X and Halfing System ("Anonymous")
  Re: Using kerneld for demand loading a device driver? (Peter Samuelson)
  Re: LILO source code (Peter Samuelson)
  What does the kernel do right after being loaded by lilo? ([EMAIL PROTECTED])
  Re: Start X and Halfing System (Peter Samuelson)
  Re: Adding swap space to drive with data... easy? (Artur Swietanowski)
  Re: X Windows developement (Tim Smith)
  Re: Serial Port Snooping (Chris Wagner)
  2.2.x single CPU is ok, SMP crashes
  Re: 2.2.x single CPU is ok, SMP crashes ([EMAIL PROTECTED])
  Re: Probelm with kernel ("Ashutosh S. Rajekar")
  Re: Serial Port Snooping (Rudy Moore)
  "error C++ compiler cannot create executables" (J.H.M. Dassen (Ray))
  Re: setsockopt() error? (Nicholas Dronen)

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

From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: What are "do { something } while(0) #defines for???
Date: 19 Sep 1999 10:36:44 +0200


Frodo Looijaard <[EMAIL PROTECTED]> wrote:



>This is a tricky way to define blocks in macros. If you just said:
>#define STMNT { something }
>you would have a problem with calling it as
>STMNT ;
>which would expand to
>{ something } ;
>which is a syntax error (semicolon after the closing brace of a compound
>statement is not permitted).

Actualy it is a syntax error only on some contexts.  In normal context
the trailing semicolon terminates an empty statement after the closing '}'.

if ( condition ) 
        { something } ;
else 
        somethingelse;


This is problematic, though.

-- 
Villy




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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Statically linked binaries - why so big?
Date: 19 Sep 1999 03:23:09 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[Todd Knarr <[EMAIL PROTECTED]>]
> The problem is getting it used. The dynamic loader normally uses it's
> own paths as determined by ldconfig

...and as overridden by the rpath you compile with.  rpath is an evil
feature, usually, but "deliberately set in stone" binaries are a great
use for it.

At some point, though, you're right: there aren't really any
disadvantages to just using static binaries, if you can afford the few
extra megs of disk -- increasingly a non-issue.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED] (David Lee)
Subject: Re: kernel_lock
Date: 19 Sep 1999 07:50:54 GMT

Peter Samuelson ([EMAIL PROTECTED]) wrote:
: [David Lee <[EMAIL PROTECTED]>]
: > Does anyone know the purpose of kernel_lock().  It is used for
: > pervent task switching in kernel or to prevent other processes to
: > enter kernel.

: Hmmmm, my 2.2 source tree does not have a kernel_lock().  Perhaps you
: meant lock_kernel()?  (Or is kernel_lock() something that 2.0 used?)

        
        Yeah. I meant lock_kernel(). I am looking at the 2.2 
        source tree. Are they different in purpose?

        --david

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: kernel_lock
Date: 19 Sep 1999 03:51:01 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[David Lee <[EMAIL PROTECTED]>]
> Yeah. I meant lock_kernel().

There was a really good explanation on linux-kernel (I think) a week or
so ago about exactly what lock_kernel() does.  Briefly, IIRC (and I'm
fuzzy on the exact details), lock_kernel() grabs a spinlock which
prevents any other CPUs from entering kernel mode, and keeps the
current CPU from servicing any interrupts other than the timer.  A
process with the kernel lock can call schedule(), upon which the lock
is automatically released and reacquired when the process runs again.

> I am looking at the 2.2 source tree. Are they different in purpose?

2.0 and 2.2 are *very* different with regard to SMP locking.  2.0 has
implicit one-CPU locking whenever it enters kernel mode.  2.2 does not,
so you have to take responsibility for serializing your own critical
sections by use of appropriate spinlocks and semaphores.  The paradigm
shift was not accomplished quickly or easily, and in fact is not
finished.  That is why lock_kernel() and unlock_kernel() exist: mainly
for those sections of the kernel which have not been converted to use
finer-grained locking yet.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: "Anonymous" <[EMAIL PROTECTED]>
Subject: Start X and Halfing System
Date: 19 Sep 1999 09:14:30 GMT


Hi,

1. Could anyone tell me how to make it automatically starting X-windows ?
(if I put in startx in rc.loca, it is not right and login dialog doesn't
come out)

2. What command to shutdown linux and half (not reboot) ? either in system
command
    or through our own program ?

Thank.






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Using kerneld for demand loading a device driver?
Date: 19 Sep 1999 04:07:52 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[Frodo Looijaard <[EMAIL PROTECTED]>]
> Remember to do a `killall -HUP kerneld' to make it reread /etc/modules.conf!

Is that so?  My understanding was that kerneld just calls modprobe when
it gets an event, and modprobe then reads /etc/modules.conf.  I know
that's how kmod (the 2.1.79+ replacement for kerneld) works.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: LILO source code
Date: 19 Sep 1999 04:16:23 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[EddieC <[EMAIL PROTECTED]>]
> Is the LILO source code under the GNU agreement?

No, it has its own license:

  LILO program code, documentation and auxiliary programs are
  Copyright 1992-1998 Werner Almesberger.
  All rights reserved.

  Redistribution and use in source and binary forms of parts of or the
  whole original or derived work are permitted provided that the
  original work is properly attributed to the author. The name of the
  author may not be used to endorse or promote products derived from
  this software without specific prior written permission. This work is
  provided "as is" and without any express or implied warranties.

> Where can I get the code? I would like to play around with it a bit.

http://http.us.debian.org/debian/dists/stable/main/source/base/lilo_21.orig.tar.gz
ftp://ftp.us.debian.org/debian/dists/stable/main/source/base/lilo_21.orig.tar.gz

Substitute your own country code for ".us.".  Alternatively substitute
your own distribution's distribution mechanism for Debian's....

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED]
Subject: What does the kernel do right after being loaded by lilo?
Date: Sun, 19 Sep 1999 09:33:30 GMT

What does the kernel do right after being loaded by lilo?
I have a problem with kernel 2.2..11. After being decompressed
and started(or loaded if it is on a floppy). It stops printing
anything to the screen and just accesses the harddrives in
my computer. If i reboot with a bootdisk with the kernel from
my dist(slackware 3.6) i see that the my ext2fs partions are
messed up. I have asked this question in a lot of other places
before comeing here and no one could answer. What is the
problem? Which of to .S files are run first in the arch/i386 dir?
It has to have something with them to do.

- David Belius

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Start X and Halfing System
Date: 19 Sep 1999 04:21:55 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[Anonymous <[EMAIL PROTECTED]>]
> 1. Could anyone tell me how to make it automatically starting X-windows ?

Ask your distribution about xdm.

> 2. What command to shutdown linux and half (not reboot) ? either in system
> command or through our own program ?

shutdown

Most likely it will need some flags and a time.  But since I have yet
to see two versions of Unix that use the same shutdown flags, I won't
assume all Linux distributions standardize on one set either, so you
can look up the flags yourself.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: Artur Swietanowski <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc,alt.os.linux,comp.os.linux.setup
Subject: Re: Adding swap space to drive with data... easy?
Date: Sun, 19 Sep 1999 13:59:26 +0200

Chris Gregory wrote:
> did you consider using a swap file?

Swap files are slower to use. There's no need in this case (see my 
other reply in this thread).

Regards,
=====================================================================
Artur Swietanowski                         http://swietano.spedia.net
Institut f�r Statistik,  Operations Research  und  Computerverfahren,
Universit�t Wien,     Universit�tsstr. 5,    A-1010 Wien,     Austria
tel. +43 (1) 427 738 620                     fax  +43 (1) 427 738 629
=====================================================================

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

From: Tim Smith <[EMAIL PROTECTED]>
Subject: Re: X Windows developement
Date: Sun, 19 Sep 1999 05:13:30 -0700



Tranceport wrote:
[CHOP]
> I came to realize that. I think I'm gonna steer my interests toward
> something a little different (and more useful for myself): how to make
> my Viper 770 or/and my Voodoo3 3000 work with the new version of xfree
> (and would help me play Q3 on linux!!!!).
> 

You're a little late here...The Voodoo3 already has good Linux drivers
:-)

www.glide.xxedgexx.com

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

From: [EMAIL PROTECTED] (Chris Wagner)
Subject: Re: Serial Port Snooping
Date: 19 Sep 1999 12:09:50 GMT

In article <7s0grh$[EMAIL PROTECTED]>,
        Rudy Moore <[EMAIL PROTECTED]> writes:
> 
> I'd like to do some protocol analysis between a device connected to
> one of my serial ports and the application that is interacting with
> it.  The goal is to record both the TX and the RX data with some
> conception of ordering - so I can piece backwards what TX caused what
> RX and vice-versa.
> 

I can't help with the linux driver (my device driver days are pre
linux), but as far as the snoop goes I think you need two serial
ports, "daisy chained" with your device and driver computer.  Your
linux box sits in the middle, passing stuff thru the ports, and of
course, recording it.  This would allow you to know the ordering.

-- 
Recreational Calculus - Just For Fun!
P.S. "From" header is bogus, use below email address.
--
Chris Wagner
[EMAIL PROTECTED]

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

From: <[EMAIL PROTECTED]>
Subject: 2.2.x single CPU is ok, SMP crashes
Date: Sun, 19 Sep 1999 14:39:23 +0200

I have got the following System:

System  : 2* Pentium 200 MMX
Board   : Gigabyte 586DX512 (a Intel-HX chipset; SCSI on board)
RAM     : 64 MB EDO
OS      : Suse Linux 6.0, updated to 6.1, completly new kernel from kernel.org (now 
2.2.12)

If I compile a kernel of the 2.2.x series (up to 2.2.12) for SMP (real time support 
included) everything seems to work. I have used e.g.:
xeamcs , Netscape, g++, latex


But if I start one of the following programs:

Adobe Acrobat Reader 4.0 (acroread)
Ghostview (gv or ghostview)

my system will freeze sooner or later. I will give a descriptions here what usually 
happens:

I use e.g. ghostview to read more than 20 Pages of a document (but normally the system 
crashes much earlier, about 2 minutes after starting)

Than the mouse freezed; of couse I knew what I had to expect and pressed 
CRTL-ALT-Backspace; 
Possibility 1: Even this doesn't work, RESET
Possibility 2: Freeze during server-shutdown (fvwm2 already shut down, but still in 
graphicy mode)
Possibility 3: I get back to the shell, the systems starts beeping and I still can use 
the console; but if I type 'shutdown -h now' I get 'SENDING ALL PROCESSES THE TERM 
SIGNAL...' and thats it, nothing more happens.If I change to another Login via ALT-F2 
I can login normally, but if I type again 'shutdown -h now' i get something like 
'ALREADY SHUTTING DOWN' (I don't remember the exact words). Thats it. Now I can change 
to the next shell and the game goes on...
Once I even got a reboot (of course without shutting down correctly) during this 
shutdown.



This crashes happpens with KDE as well as using fvwm2. I tested both, just to make 
sure.

I have not found anything in /var/log that could help. All I found is a message like
unexpected interrupt vector 71 on cpu1 

(I think it was int 71, but this message is not the lastest one in the log-files, 
sometimes this event happens more than 30 minutes before the crash. I only mention it 
because it may be another problem or indicate something else.)


The 2.0.x series SMP was stable. But I think that doesn't help much since a lot of 
changed.


At the moment my kernel works in single mode and everything is fine. I can use all 
apps I want to without any problems. Infact I can live with that, but I think SMP it 
should work.


PS: This is the first time I use News. I hope this is the right newsgroup. If 
something is not ok, please don't blame. I think I should NOT wait reporting this 
until there is a new stable linux release (2.4), only because I may know more about 
news than.

Thanks, Ralf

PS: I just saw that some lines are a bit to long. Sorry, but tin gabe me a vi to write 
this message. Can I tell vi to braak after may be 72 lines?









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

From: [EMAIL PROTECTED]
Subject: Re: 2.2.x single CPU is ok, SMP crashes
Date: Sun, 19 Sep 1999 13:04:28 GMT

[EMAIL PROTECTED] wrote:

> I use e.g. ghostview to read more than 20 Pages of a document (but normally the 
>system crashes much earlier, about 2 minutes after starting)

> Than the mouse freezed; of couse I knew what I had to expect and pressed 
>CRTL-ALT-Backspace; 

Sounds like a problem in X-windows.  What you seem to be saying is that 
the X-windows hangs up, but linux keeps running.  I would expect it is
some sort of timing problem with X-windows and the applications you are
running.

> Possibility 1: Even this doesn't work, RESET
> Possibility 2: Freeze during server-shutdown (fvwm2 already shut down, but still in 
>graphicy mode)
> Possibility 3: I get back to the shell, the systems starts beeping and I still can 
>use the console; but if I type 'shutdown -h now' I get 'SENDING ALL PROCESSES THE 
>TERM SIGNAL...' and thats it, nothing more happens.If I change to another Login via 
>ALT-F2 I can login normally, but if I type again 'shutdown -h now' i get something 
>like 'ALREADY SHUTTING DOWN' (I don't remember the exact words). Thats it. Now I can 
>change to the next shell and the game goes on...
> Once I even got a reboot (of course without shutting down correctly) during this 
>shutdown.

Try finding a killing the rouge processess.  You may find the system is
still running stablely.






-- 
Best regards,

Stephen Jenuth
([EMAIL PROTECTED])

Quidquid latine dictum sit, altum viditur.

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

From: "Ashutosh S. Rajekar" <[EMAIL PROTECTED]>
Subject: Re: Probelm with kernel
Date: Sun, 19 Sep 1999 19:47:42 -0500

On Sat, 18 Sep 1999 [EMAIL PROTECTED] wrote:

> I have asked this question to a lot of regular linux help places but i
> have had no luck so please dont flame me for being oftopic.
> I am using kernel 2.2.11 to setup a masq box on a 486. The root dev
> has less that 1023 cylinders. I have tried to recompile it 6 times now
> with make zlilo, zImage, bzImage, zdisk, but the problem remains.

        Did you run the "rdev" command after the kernel got compiled ?

> mount as /usr/local and /home. I have tried with LBA mode on and of. I
> have had linux on the same hardware setup before and it worked
> perfect. Nothing seems to work. What is the problem? Is it 2.2.11
> specific?

        Turn the LBA mode ON and OFF, and you are dead.

===================
Ashutosh S. Rajekar
http://i.am/asr


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

From: Rudy Moore <[EMAIL PROTECTED]>
Subject: Re: Serial Port Snooping
Date: 19 Sep 1999 16:23:44 GMT

Chris Wagner <[EMAIL PROTECTED]> wrote:
> In article <7s0grh$[EMAIL PROTECTED]>,
>       Rudy Moore <[EMAIL PROTECTED]> writes:
> > 
> > I'd like to do some protocol analysis between a device connected to
> > one of my serial ports and the application that is interacting with
   ...

> I can't help with the linux driver (my device driver days are pre
> linux), but as far as the snoop goes I think you need two serial
> ports, "daisy chained" with your device and driver computer.  Your
> linux box sits in the middle, passing stuff thru the ports, and of
> course, recording it.  This would allow you to know the ordering.


There's actually a web page that I found that describes this, but my
computer only has two serial ports.  Since the application that I want
to run is on the linux box, I'm still a port short to do the output-to-
input-to-output method.  So I was hoping to do the same thing in software
by putting a layer between the application and its serial port.

Thanks,
Rudy

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

From: [EMAIL PROTECTED] (J.H.M. Dassen (Ray))
Crossposted-To: comp.os.linux.development.apps
Subject: "error C++ compiler cannot create executables"
Date: Sat, 18 Sep 1999 17:14:06 +0200

Klea Dzonsons <[EMAIL PROTECTED]> wrote:
>I have something of a similar prob with the compiler too.When trying to run
>configure when installing Licq I get "error C++ compiler cannot create
>executables"

Run configure with a "-v" argument, and check out the "config.log" generated
for clues. Typically this is caused by not having the C++ library's
development files installed.

HTH,
-- 
Ray Dassen <[EMAIL PROTECTED]>

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

From: [EMAIL PROTECTED] (Nicholas Dronen)
Subject: Re: setsockopt() error?
Date: Sun, 19 Sep 1999 17:01:59 GMT

Grith ([EMAIL PROTECTED]) wrote:
:     A'ight, I'm pretty new to this whole  programming thing, but I'm trying
: to get a MUD up and running on Slackware 4.0. Kernel version 2.2.12, GCC
: 2.8.1 and er, some other junk that I don't think is relevant (ie, can't
: remember right now, if more info is needed let me know;)). Anyway, the MUD
: compiles with nothing but a couple of warnings in irrelevant areas, I know
: what they refer to, and they have nothing to do with the socket handling.
:     The problem is that I'm a rookie when it comes to coding period, and
: I've never even come anywhere near socket/stream handling code, so when I
: see something like this... I mean, I know what it means... basicly, but I
: have no idea how to resolve it. The error in question is:

:             setsockopt: SNDTIMEO: Protocol not available.

:     Now, I understand of course that every piece of code does its error
: handling differently and all that, but it seems to me that ya'll have to
: have at least /some/ idea maybe?:)

>From the setsockopt man page:

SO_SNDTIMEO
               get timeout value for output (get only)

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


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