Linux-Development-Sys Digest #207, Volume #7     Sat, 18 Sep 99 14:13:53 EDT

Contents:
  Re: write / writev guaranteed autonomous? ("Glen Parker")
  Re: Adding swap space to drive with data... easy? (Artur Swietanowski)
  ATI FB and Intel/Rage LT Pro? (Bjoern Giesler)
  Re: Heads up: Mandrake Linux, bad compiler. (Klea Dzonsons)
  where are process-table, region-table, inode-table? ([EMAIL PROTECTED])
  Re: Heads up: Mandrake Linux, bad compiler. (mlw)
  Re: What are "do { something } while(0) #defines for??? (Gregory Hayrapetian)
  Probelm with kernel ([EMAIL PROTECTED])
  Re: Using kerneld for demand loading a device driver? (Frodo Looijaard)
  Re: Problem with device driver. HELP ([EMAIL PROTECTED])
  Re: Request for bug tracking software (J.H.M. Dassen (Ray))
  Re: beginning unix programmer, please help ("Ashutosh S. Rajekar")
  Re: What are "do { something } while(0) #defines for??? (Frodo Looijaard)
  Re: Linux SMP (Konrad Mierendorff)
  Re: Heads up: Mandrake Linux, bad compiler. (NF Stevens)
  Re: Machine won't utilize swap space (NF Stevens)
  Serial Port Snooping (Rudy Moore)
  Re: Heads up: Mandrake Linux, bad compiler. (Bruce Scott TOK)
  Re: What are "do { something } while(0) #defines for??? (Olav Woelfelschneider)
  Re: Using kerneld for demand loading a device driver? (Mario Klebsch)

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

From: "Glen Parker" <[EMAIL PROTECTED]>
Subject: Re: write / writev guaranteed autonomous?
Date: Sat, 18 Sep 1999 01:35:59 -0700

Well, after a little more thought and the many helpful answers, I now see
how silly the question was...  The whole idea really falls apart as the data
sizes get larger ;-)

Thanx all for the help.

Glen




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

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: Sat, 18 Sep 1999 13:09:43 +0200

Mark D'Ascenzo wrote:
> I have a plan to reformat my partition table to add swap space.  

My notes:
(a) after you delete the Win partition, you'll have three primary 
    partitions to use,
(b) you want to have 3 partitions, so why not make them primary? 
(c) unless you have a 2.0.x kernel, your swap partitions need not 
    be bounded by the 127MB limit (I have a 1G swap on one 
    partition),
(d) so you really need only 2 partitions.

To summarize, it's probably possible to do *exactly* what you 
outlined, but it's less dangerous and experimental, and quicker 
to simply use 2 primary partitions.

HTH,
=====================================================================
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: Bjoern Giesler <[EMAIL PROTECTED]>
Subject: ATI FB and Intel/Rage LT Pro?
Date: 18 Sep 1999 12:28:08 GMT

Hi,

I've tried (again) to get the ATI (or as the source has it, "aty"...??)
frame buffer running on my laptop (ATI Rage LT Pro). Result: Funny blue
vertical lines and a hanging system.

I've got VESA FB up and running, works great, it's just a bit slow, and I'd
hoped the ATI code would help remedy that... Anybody got this running?

TIA,
                --Bjoern
-- 
================================/\==One OS to rule them all===Windows NT=====
Bjoern Giesler                 /  \  One OS to find them           
<[EMAIL PROTECTED]>    / <> \  One OS to bring them all    
=============================/______\==And in the Darkness bind them=========
    Thank you for your time, worship the Antichrist, and have a nice day.

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

From: Klea Dzonsons <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Re: Heads up: Mandrake Linux, bad compiler.
Date: Sun, 19 Sep 1999 10:16:32 +0930



mlw wrote:

> Just as a heads up for anyone that is interested.
>
> The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
> correctly. And it fails in the oddest way.
>
> If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
> The standard X apps seem to work OK. The instant you run a kde app, the
> X session gets nuked to a black screen and hangs. You can switch to a
> different vconsole and most of the time you can kill it with a -9.
>
> To make a long story short, I removed Mandrake's pgcc and installed
> RedHat's build of egcs, rebuilt the code, and had no problems.
>
> Has anyone else seen this problem. I sure hope I am not the only one.

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"
Im still, working on it now.
K.Dzonsons

>
>
> --
> Mohawk Software
> Windows 95, Windows NT, UNIX, Linux. Applications, drivers, support.
> Visit http://www.mohawksoft.com


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

From: [EMAIL PROTECTED]
Subject: where are process-table, region-table, inode-table?
Date: 18 Sep 1999 03:38:11 GMT

Hi,
        Can anyone tell me where I can change the text table (the max # of 
executable that a system can run at any time) , region table , inode tables
and file table? I want to tune my kernel a bit, since it's running slow
w/ my 486 8M.. somehow the kernel is taking more than 10% of my total memory 
(624k for kernel code, 384k reserved, 376k data).... leaving me enough to
barely run a X... I read a book called "System Tuning" (base on System V)
which mentioned something about changing the text table , region table,
inode tables anf file table to tune the system. Anyone know where I should
change these defaults? Anyone think that the kernel configuration script
should allow us to estimate the # of users our system will be serving..and
then calculate(estimate) the size of these tables? Does these tables
exist in Linux?

Please enlighten me..

TIA

Dan

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

From: mlw <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Re: Heads up: Mandrake Linux, bad compiler.
Date: Sat, 18 Sep 1999 12:54:39 +0000

Klea Dzonsons wrote:
> 
> mlw wrote:
> 
> > Just as a heads up for anyone that is interested.
> >
> > The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
> > correctly. And it fails in the oddest way.
> >
> > If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
> > The standard X apps seem to work OK. The instant you run a kde app, the
> > X session gets nuked to a black screen and hangs. You can switch to a
> > different vconsole and most of the time you can kill it with a -9.
> >
> > To make a long story short, I removed Mandrake's pgcc and installed
> > RedHat's build of egcs, rebuilt the code, and had no problems.
> >
> > Has anyone else seen this problem. I sure hope I am not the only one.
> 
> 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"
> Im still, working on it now.
> K.Dzonsons

Are you using Mandrake? I think you have a different error.
-- 
Mohawk Software
Windows 95, Windows NT, UNIX, Linux. Applications, drivers, support. 
Visit http://www.mohawksoft.com

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

From: Gregory Hayrapetian <[EMAIL PROTECTED]>
Subject: Re: What are "do { something } while(0) #defines for???
Date: Sat, 18 Sep 1999 15:45:55 +0200



ULISES ALONSO CAMARO wrotes:

> Hi all,
>
> This defines appears in many headers of the kernel source, why are
> declared in this way???
>
> Please CC: your comments to [EMAIL PROTECTED]
>
> Thanks in advance,
>
>                 Ulisses
> ----------------------------------------------------------------------------
>         Debian/GNU Linux: a dream come true     http://www.debian.org


do { something }  while(0) in a define macro is a tricky way
to define a block. Because you can�t only use { }.

-- Greg


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

From: [EMAIL PROTECTED]
Subject: Probelm with kernel
Date: Sat, 18 Sep 1999 14:11:34 GMT

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. When
the kernel has been decompressed or loaded(for a boot floppy) the
kernel just sits there doing a lot of disk access. Later when i reboot
with the boot floppy that came with my dist i see that there has been
some damage on my root dev and even on some other partions i have
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?

- David Belius


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

From: [EMAIL PROTECTED] (Frodo Looijaard)
Subject: Re: Using kerneld for demand loading a device driver?
Date: 18 Sep 1999 14:34:51 GMT

In <[EMAIL PROTECTED]> [EMAIL PROTECTED] (W. Tucker) 
writes:

>I have written a device driver for a data acquisition board and have
>a question about loading it on demand rather than manually as I do
>now.  I am using the 2.0.36 kernel and the 2.1.85-9 modutils which
>are included in the Red Hat 5.2 distribution.

>What actions cause the kernel to send a load module request to
>kerneld?  Is it possible for a user program without root privileges
>to do any of them?  Should I give up on kerneld and instead try to
>restructure my driver so it doesn't reserve the memory and IO ports
>when it is loaded?

Let's say you use major device number 99 for a character device, and
your module is called mod; then add to your /etc/modules.conf
(or /etc/conf.modules):

alias char-major-99 mod

If you check the output of `dmesg', you will see that if you try to
access the device file without having loaded the module, it says it
can't find something like the above, with the exact name you can
insert here.

After adding the above line, the module will be loaded when the device
file is opened, and unloaded when the file has not been used for some
minutes.

Remember to do a `killall -HUP kerneld' to make it reread /etc/modules.conf!

Good luck,
Frodo
--
Frodo Looijaard <[EMAIL PROTECTED]>  PGP key and more: http://huizen.dds.nl/~frodol
  At my homepage you will also find a guide for installing glibc under Linux.
  New: Linux hardware monitoring kernel modules (LM78/79/80, Winbond etc.)
  

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

From: [EMAIL PROTECTED]
Subject: Re: Problem with device driver. HELP
Date: Sat, 18 Sep 1999 14:11:28 GMT

On Tue, 17 Aug 1999 00:04:22 GMT, [EMAIL PROTECTED] (Kaz
Kylheku) wrote:

>On Mon, 16 Aug 1999 21:49:45 GMT, Peter Pointner <[EMAIL PROTECTED]> wrote:
>>[EMAIL PROTECTED] wrote:
>>> When i try to compile this charter device driver i get this error:
>>> pbus.c: In function `pb_open':
>>> pbus.c:70: wrong type argument to bit-complement
>>
>>> Here is the code:
>>>     while((lock[dev] >> func) & 1) {
>>>             interruptible_sleep_on(&pb_WaitQ);
>>> line 70->   if(current->signal & ~current->blocked) {
>>>                     MOD_DEC_USE_COUNT;
>>>                     return -EINTR;
>>>             }
>>>     }
>>> What is wrong?
>>
>>You are using a 2.2.x kernel? Then use 
>>  if (signal_pending(current)) 
>>instead of your code. AFAIK current->blocked has been changed
>>to an array to make more than 32 signals possible, and ~ can't
>>be used on that.
>
>Also, what about the possible race between testing the condition and sleeping?
>I.e. what if the condition ``(lock[dev] >> func) & 1'' becomes false after it
>is tested but before suspension? What then?  The problem is that
>interruptible_sleep_on both enqueues the task and calls the scheduler in one
>operation. If the wake up goes off before the task is enqueued, it will be
>missed.

But wake_up can't be called before the schedule() call because this
code is running in kernel mode, right?

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

From: [EMAIL PROTECTED] (J.H.M. Dassen (Ray))
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Request for bug tracking software
Date: Fri, 17 Sep 1999 22:45:21 +0200

[F'up set]

Anthony Di Paola <[EMAIL PROTECTED]> wrote:
>Can anyone recomend a decent bug tracking tool that will work with a Linux
>server and NT client systems?

Check out http://linas.org/linux/pm.html . There are several tools whose
client-side is handled via e.g. email (e.g. Debian BTS) or web stuff (e.g.
jitterbug); they should be usable from just about any type of system.

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

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

From: "Ashutosh S. Rajekar" <[EMAIL PROTECTED]>
Subject: Re: beginning unix programmer, please help
Date: Sat, 18 Sep 1999 20:04:38 -0500

On Sat, 18 Sep 1999, isaac1 wrote:
> hi,
>     i just started reading adv. programming int the unix enviorment and am
> trying to compilie some of the examples but am having troubles. im using
> suse6.1 linux w/ gcc i typed in the following (straight fromt the book)
> i downloaded the header from ftp site stated in the book. anwya the errors i
> get are:
> /tmp/ccPamEpP.o: in function 'main':
> /tmp/ccPamEpP.o: (.text+0x12): undefined refrence to 'err_quit'
> /tmp/ccPamEpP.o: (.text+0x44):undefined refrence to  'err_sys'
> collect2: ld returned 1 exit status
> 
        As is cleanly evident, the functions "err_quit" and "err_sys" have
been declared, but not defined. You can write your own functions with the
same names inside "ourhdr.h", using simple fprintf(stderr, " ...");. 

You have indeed downloaded the sources, but have not followed W. Richard
Stevens' instructions: read them on how to compile them. But those sources
won't work under Linux, since they were written for Solaris and 4.2BSD,
and also a lot of features from those OSes are not found in Linux. I am
working on the port of these programs to Linux, but I am too busy, I can't
promise anything. All is not lost, though; one reader has already ported
the progs to Linux, check out http://www.kohala.com/~rstevens.

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


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

From: [EMAIL PROTECTED] (Frodo Looijaard)
Subject: Re: What are "do { something } while(0) #defines for???
Date: 18 Sep 1999 14:27:26 GMT

In <[EMAIL PROTECTED]> ULISES ALONSO CAMARO 
<[EMAIL PROTECTED]> writes:


>This defines appears in many headers of the kernel source, why are
>declared in this way???

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

In
#define STMNT do { something } while 0
This would expand to
do { something } while 0 ;
which is perfectly legal.

The loop will be executed exactly once (not zero times, as you might
think; the `while' is only evaluated AFTER the exectution of the block!).

Good luck,
Frodo
--
Frodo Looijaard <[EMAIL PROTECTED]>  PGP key and more: http://huizen.dds.nl/~frodol
  At my homepage you will also find a guide for installing glibc under Linux.
  New: Linux hardware monitoring kernel modules (LM78/79/80, Winbond etc.)
  

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

From: Konrad Mierendorff <[EMAIL PROTECTED]>
Subject: Re: Linux SMP
Date: Sat, 18 Sep 1999 17:04:59 +0200

Jeong Jin Guk wrote:
> 
> I have a question!!
> I did setting SMP in Linux OS..
> Linux version is 2.2.5...
> By the way, error is happened....
> Error is the contents about SCSI...
> And, sometimes, computer is downed...
> Why did this error happen?
> Possibly, which patch is needed??
> Please, give me an answer!!
> My computer have four cpu(Intel PentiumII XEON) and AIC 7890 ULTRA II
> SCSI
> 
> p.s. Possibly, if there is a man that patch "pset" in Linux, I ask that
> contact me.....

Don't you think that it might be a very very good idea to POST SOME
ERROR MESSAGES or at least to say HOW TO REPRODUCE THE ERROR or any
other information besides "I have a computer with an error" ????

- Konrad Mierendorff

P.S.: Possibly we could help you if you would give us some info.

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

From: [EMAIL PROTECTED] (NF Stevens)
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Re: Heads up: Mandrake Linux, bad compiler.
Date: Sat, 18 Sep 1999 15:18:48 GMT

mlw <[EMAIL PROTECTED]> wrote:

>Just as a heads up for anyone that is interested.
>
>The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
>correctly. And it fails in the oddest way.
>
>If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
>The standard X apps seem to work OK. The instant you run a kde app, the
>X session gets nuked to a black screen and hangs. You can switch to a
>different vconsole and most of the time you can kill it with a -9.
>
>To make a long story short, I removed Mandrake's pgcc and installed
>RedHat's build of egcs, rebuilt the code, and had no problems.
>
>Has anyone else seen this problem. I sure hope I am not the only one.

IIRC Mandrake uses pentium optimizations. I had problems with
the default egcs optimizations on my Cyrix 6x86L. Originally
I allowed egcs to select the default optimization level itself,
but this produced binaries which randomly crashed with sig 11
problems. Since forcing it to use i386 I haven't had any problems.

Norman

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

From: [EMAIL PROTECTED] (NF Stevens)
Crossposted-To: comp.os.linux.misc,comp.os/linux.setup
Subject: Re: Machine won't utilize swap space
Date: Sat, 18 Sep 1999 15:18:51 GMT

Wallace Barnes <[EMAIL PROTECTED]> wrote:

>I have PII 233Mhz system (multiple SCSI / IDE drives, 98MB RAM) running
>Slackware kernel 2.0.36. I've allocated a 120MB partition to as swap and
>have it automatically utilized a system bootup via the /etc/fstab entry.
>When my system gets tearing, it can really eat into the system memory.
>Sometimes it freeze or start running slowly because it never utilizes
>the swap space when it's used up the free memory. when I type the "free"
>command, it shows the though memory is used up and still the swap space
>( which regesters in the output of that same command ) nevers gets used.
>I utilized partitions on other drives, to ensure that the first was not
>bad, to no avail. Is there anything special I need to do get the swap to
>be utilized once physical memory is used up ? I've tried manually
>running the swapon/off commands also to no avail. Has anyone run into
>this ? If so, how did you fix it ? Thanks.

You did initialise the swap partition with mkswap?

Norman

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

From: Rudy Moore <[EMAIL PROTECTED]>
Subject: Serial Port Snooping
Date: 18 Sep 1999 17:06:57 GMT


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.

What I envision is an alternate serial port called /dev/snoopedserial.
/dev/snoopedserial would simply pass along the appropriate /dev/ttyS?
in both directions, but it would also store all data to a file.. or
perhaps pipe it out as two seperate data streams and rely on an external
program to actually write the file.

Does anyone know of an easy way to do this?  Is the only reasonable way
to write this imaginary device driver that I've supposed?  If so, could
someone point me in the right direction to get started writing device
drivers?

Thanks!
Rudy

-- 

[EMAIL PROTECTED]?
>Hi! I'm a replicative .signature transposon!  Copy me into your .signature!<


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

From: [EMAIL PROTECTED] (Bruce Scott TOK)
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Re: Heads up: Mandrake Linux, bad compiler.
Date: 18 Sep 1999 18:18:42 +0200

In article <[EMAIL PROTECTED]>,
mlw  <[EMAIL PROTECTED]> wrote:
>Just as a heads up for anyone that is interested.
>
>The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
>correctly. And it fails in the oddest way.
>
>If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
>The standard X apps seem to work OK. The instant you run a kde app, the
>X session gets nuked to a black screen and hangs. You can switch to a
>different vconsole and most of the time you can kill it with a -9.
>
>To make a long story short, I removed Mandrake's pgcc and installed
>RedHat's build of egcs, rebuilt the code, and had no problems.
>
>Has anyone else seen this problem. I sure hope I am not the only one.

Since when are they not using pure gcc as default (or are they, and it
is renamed)?

Hearing things like this and all the talk in other threads about bloated
windows type GUIs is cementing my decision to go for Slackware again,
when it comes time.

-- 
cu,
Bruce

drift wave turbulence:  http://www.rzg.mpg.de/~bds/

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

From: Olav Woelfelschneider <[EMAIL PROTECTED]>
Subject: Re: What are "do { something } while(0) #defines for???
Date: Sat, 18 Sep 1999 07:59:46 +0200

ULISES ALONSO CAMARO <[EMAIL PROTECTED]> wrote:
UAC> This defines appears in many headers of the kernel source, why are
UAC> declared in this way???

Try:

#define foo(xyzzy) bar(xyzzy); foozle(xyzzy);

Works well when used like this:

        if (frobozz) {
          foo(frobozz);
        }

Goes bang, however, in that way:

        if (frobozz) foo(frobozz);

But if you define it instead:

#define foo(xyzzy) do { bar(xyzzy); foozle(xyzzy); } while(0)

everything is fine, since the compiler optimizes away the do/while.

With gcc, there is a non-standard extension which does the same:

#define foo(xyzzy) ({ bar(xyzzy); foozle(xyzzy); })

This works with gcc ONLY!

-- 
Olav "Mac" W�lfelschneider                         [EMAIL PROTECTED]
PGP fingerprint = 06 5F 66 B3  2A AD 7D 2D  B7 19 67 3C  95 A7 9D AF
We are but packets in the internet of life. (Illiad)

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: Using kerneld for demand loading a device driver?
Date: Sat, 18 Sep 1999 09:12:45 +0200

[EMAIL PROTECTED] (W. Tucker) writes:

>What actions cause the kernel to send a load module request to
>kerneld? 

I never did it, but I would guess, you have to use a fixed major
device number and create the /dev entry manually. Then, when the user
process accesses the device, kerneld tries to load e.g. char-major-15
for a cahracter device with major device number 15. You can put a line
like "alias char-major-15 mydriver" into /etc/conf.modules.

> Is it possible for a user program without root privileges
>to do any of them?

Yew, when the device node does have the right permissions.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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


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