Linux-Development-Sys Digest #395, Volume #8 Sun, 7 Jan 01 13:13:24 EST
Contents:
Re: #ifdef < You're compiling for Linux with g++ > ("Karl Heyes")
Re: Kernel2.4.0 - Unusual panic (Nic)
Re: #ifdef < You're compiling for Linux with g++ > (Larry Lindstrom)
Re: Library dependencies ("Fruitbat")
Re: Linux macro function copy_to_user(to, from, len). (Lu Yong)
C++ compilers other than g++. (Thaddeus L Olczyk)
CD-ROM Eject ("P.D. Lovelace")
Kernel 2.4.0 - build problem ("Go Hosohara")
Re: Assigning signals to IRQs ([EMAIL PROTECTED])
Re: task switch trick? (Andi Kleen)
Re: How Do I Compile C++ Code With pid_t? (Andries Brouwer)
Re: Signals and threads in Linux (Andi Kleen)
Re: C++ compilers other than g++. (Andi Kleen)
driver port 2.2 -> 2.4 ("Eric en Jolanda")
code language for Linux kernel
Re: code language for Linux kernel (Erik de Castro Lopo)
Re: #ifdef < You're compiling for Linux with g++ > (A. =?iso-8859-1?Q?Schr=F6der?=)
NVIDIA-9.0-5 + kernel 2.4.0 ("fszuper")
devfs / pts (Paul Sack)
GIve me a advice build enterprise linux system. ("junwon,Seo")
Re: Library dependencies (Nix)
Re: code language for Linux kernel (Paul Sack)
Re: code language for Linux kernel (Kaz Kylheku)
2.4.0 and sudden death in X? (Konstantinos Agouros)
----------------------------------------------------------------------------
From: "Karl Heyes" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,linux.redhat.misc
Subject: Re: #ifdef < You're compiling for Linux with g++ >
Date: Sat, 06 Jan 2001 23:54:34 +0000
In article <[EMAIL PROTECTED]>, "Larry Lindstrom"
<[EMAIL PROTECTED]> wrote:
> I'm porting some C++ to Linux.
>
> Are there compiler defined constants that I can use to ifdef
> around the inconsistencies? I can always use -DCOMPILING_FOR_LINUX,
> but I'd rather use facilities of the compiler.
>
try __linux__ and __cplusplus
karl.
------------------------------
From: Nic <[EMAIL PROTECTED]>
Subject: Re: Kernel2.4.0 - Unusual panic
Date: Sun, 07 Jan 2001 13:41:14 +1300
Kasper Dupont wrote:
>
> Nic wrote:
> >
> > Make sure whatever you're using for a root filesystem (ext2, reiser,
> > whatever) is compiled into the kernel, not as a module, or the
> > chicken-and-egg rule applies.
>
> Also remember the blockdevice. You need both blockdevice
> and filesystem to mount root.
Um, yeah. That too. I've been doing this too long - far too much of it
seems obvious to me ;-)
Regards,
Nic.
--
Nic Bellamy's non-official mailbox: < sky at wibble dot net >
IT Consultant, Asterisk Limited - http://www.asterisk.co.nz/
------------------------------
From: Larry Lindstrom <[EMAIL PROTECTED]>
Subject: Re: #ifdef < You're compiling for Linux with g++ >
Date: Sat, 06 Jan 2001 17:37:34 -0800
Karl Heyes wrote:
>
> In article <[EMAIL PROTECTED]>, "Larry Lindstrom"
> <[EMAIL PROTECTED]> wrote:
>
> > I'm porting some C++ to Linux.
> >
> > Are there compiler defined constants that I can use to ifdef
> > around the inconsistencies? I can always use -DCOMPILING_FOR_LINUX,
> > but I'd rather use facilities of the compiler.
> >
>
> try __linux__ and __cplusplus
>
> karl.
Thanks
Larry
------------------------------
From: "Fruitbat" <[EMAIL PROTECTED]>
Subject: Re: Library dependencies
Date: Sun, 07 Jan 2001 02:29:01 GMT
Peter thanx for that, I have just tried out V1.07 it's great!
> look for binstats. A useful program that shows you all that kind of
> info (bin <-> lib dependency summaries).
------------------------------
From: Lu Yong <[EMAIL PROTECTED]>
Subject: Re: Linux macro function copy_to_user(to, from, len).
Date: 7 Jan 2001 04:23:26 GMT
"Abel Gan" <[EMAIL PROTECTED]> writes:
Please make sure you compile the module with the -O2 switch.
Lu Yong
------------------------------
From: [EMAIL PROTECTED] (Thaddeus L Olczyk)
Subject: C++ compilers other than g++.
Date: Sun, 07 Jan 2001 04:20:22 GMT
Reply-To: [EMAIL PROTECTED]
Has anyone had experience with Compilers other than g++ on Linux?
I was wondering about KaiC++ and Comeau C++ and the
quality of other tools ( for example their debuggers, profiles
etc...).
------------------------------
From: "P.D. Lovelace" <[EMAIL PROTECTED]>
Subject: CD-ROM Eject
Date: Sat, 6 Jan 2001 23:10:39 -0600
Hello,
I'm trying to write an automount/unmount program for the cd-rom drive.
The automount I have found in a program already; would you believe the
program is called automounter? :) However, I would like for the cd-rom
drive to automatically unmount whenever the eject button is pressed. If
someone can point me to a routine that can monitor the CD-ROM for the
ejection request signal, or to the point in the source where mount locks the
cd drive, it would be greatly appreciated.
Thank you,
P.D.
------------------------------
From: "Go Hosohara" <[EMAIL PROTECTED]>
Subject: Kernel 2.4.0 - build problem
Date: Sun, 7 Jan 2001 14:55:33 +0900
I downloaded kernel 2.4.0 source.
In make menuconfig , I chose Athlon cpu option because my machine use Athlon
600 Mhz CPU.
When I compiled it,I got a error message like below and stop compiling.
scripts/split-include include/linux/autoconf.h include/config
gcc -D__KERNEL__ -I/usr/src/linux-2.4.0/include -Wall -Wstrict-prototypes -O
2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary
=2 -march=i686 -malign-functions=4 -c -o init/main.o init/main.c
In file included from /usr/src/linux-2.4.0/include/linux/irq.h:57,
from /usr/src/linux-2.4.0/include/asm/hardirq.h:6,
from /usr/src/linux-2.4.0/include/linux/interrupt.h:45,
from /usr/src/linux-2.4.0/include/asm/string.h:296,
from /usr/src/linux-2.4.0/include/linux/string.h:21,
from /usr/src/linux-2.4.0/include/linux/fs.h:23,
from /usr/src/linux-2.4.0/include/linux/capability.h:17,
from /usr/src/linux-2.4.0/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.0/include/linux/sched.h:9,
from /usr/src/linux-2.4.0/include/linux/mm.h:4,
from /usr/src/linux-2.4.0/include/linux/slab.h:14,
from /usr/src/linux-2.4.0/include/linux/malloc.h:4,
from /usr/src/linux-2.4.0/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.0/include/asm/hw_irq.h: In function `x86_do_profile':
/usr/src/linux-2.4.0/include/asm/hw_irq.h:198: `current' undeclared (first
use in this function)
/usr/src/linux-2.4.0/include/asm/hw_irq.h:198: (Each undeclared identifier
is reported only once
Is there anybody running into same kind of problem ?
My environment is
GCC version 2.95.3
GNU ld version 2.9.5
Could you go around it ?
Thanks
Go Hosohara
Tokyo Japan
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Assigning signals to IRQs
Reply-To: [EMAIL PROTECTED]
Date: 7 Jan 2001 06:32:34 +1100
[EMAIL PROTECTED] writes:
> I am trying to develop a program (a user-mode process, not a kernel
>driver) that works with ports. May I assign a signal (like SIGALRM or
>another one) to the interrupt of the serial port (IRQ4)? I think it is
>possible if this were a kernel driver, but I'm not sure with a user-mode
>process.
Do a web search with the keywords "irq" "Dmitry" and "Fedorov", and
you should find what you are looking for. The package was mentioned
in this group many moons ago, and I don't have the link at hand right now,
sorry.
Bernie
P.S.: I am not yet clear on what happens with level-triggered interrupts...
when the kernel IRQ handler exits, the user process won't have
had a chance to do whatever is needed to make the hardware deassert
the interrupt, so there should immediately be another, and so on.
I should soon find out, though :)
--
Never offend people with style when you can offend them with
substance.
Sam Brown
Washington Post, 26 January 1977
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: task switch trick?
Date: 07 Jan 2001 07:15:36 +0100
lavender <[EMAIL PROTECTED]> writes:
> Andi Kleen �g�D�G
>
> > lavender <[EMAIL PROTECTED]> writes:
> >
> > > I don't know why it's possible to reload all of them...
> > > we just changed esp0 pointer in TSS....
> > > but in intel manual, it doesn't say that change TSS will cause
> > > esp0,ldt,pbdr to be changed....
> >
> > esp0,ldt,etc. do only exist in the TSS, so a ltr implicitely
> > changes them.
>
> but in 2.4.0, it doesn't use ltr to do context switch....the comment told
> me that...
You were asking why esp0,ldt etc. aren't explicitely switched in 2.0 -- I told
you that they're implicitely switched by the LTR.
> but the question is here-- HOW to context switch?
> in __switch_to() function, the only code about changing PBDR, LDT is
> include in one COMMNET line...
> and all action I can see under this comment is changing to new process's
> kernel stack esp0...
The other registers are saved in the include/asm-i386/system.h:switch_to()
macro.
>
> of course, changing kernel stack meaning context switch
> but PBDR,LDTR...are not changed (manually)...
In 2.4 they are done in switch_mm(), to handle lazy memory context for kernel
threads running in other process' address space.
You could have found out yourself by grepping for load_LDT or cr2. Learn the power
of grep.
-Andi
------------------------------
From: Andries Brouwer <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.misc,comp.os.linux.development.apps
Subject: Re: How Do I Compile C++ Code With pid_t?
Date: Sun, 7 Jan 2001 07:29:29 GMT
[EMAIL PROTECTED] writes:
: Larry Lindstrom <[EMAIL PROTECTED]> wrote:
:: The man page for getpid() shows "#include <unistd.h>" as the
:: only required header.
: The man page is incorrect. <sys/types.h> and <unistd.h> are the
: required headers for getpid().
You must have an ancient man page.
A current one lists both.
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: Signals and threads in Linux
Date: 07 Jan 2001 08:28:39 +0100
Kaelin Colclasure <[EMAIL PROTECTED]> writes:
> How do POSIX signals interact with threads under Linux? Since each
> thread in a process has its own pid, does it have its own signal mask
> and sigaction set too? Or do all of the pids somehow share this state?
Each thread has an own signal mask/queue, but the handlers are normally shared
(when CLONE_SIGHAND is set, which LinuxThreads does)
> In general, I am assuming that a signal sent to a specific pid is
> delivered to that pid -- regardless if it's the main thread of a
> process or not.
That's ok on LinuxThreads, but it's non portable.
-Andi
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: C++ compilers other than g++.
Date: 07 Jan 2001 08:36:35 +0100
[EMAIL PROTECTED] (Thaddeus L Olczyk) writes:
> Has anyone had experience with Compilers other than g++ on Linux?
> I was wondering about KaiC++ and Comeau C++ and the
> quality of other tools ( for example their debuggers, profiles
> etc...).
Main advantage are much better error messages than g++ -- they're both based
on the EDG frontend which has excellent error reporting, while g++'s messages are
often unusable.
Debugging isn't so hot; they cannot emit debugging information directly because
they're compiling to C, which shows.
KAI C++ also generates better code in some cases, it's abstraction penalty is less
than g++'s. In the end the C is still compiled with gcc's backend, so the register
allocation, FP scheduling etc. isn't much better.
Their main drawback is that they aren't binary compatible to g++ -- you need to
recompile all external C++ libraries.
Hope it helps,
-Andi
------------------------------
From: "Eric en Jolanda" <[EMAIL PROTECTED]>
Subject: driver port 2.2 -> 2.4
Date: Sun, 7 Jan 2001 09:17:21 +0100
Hello,
Does anyone know: Is there already a porting guide for drivers from 2.2
kernel to a 2.4 kernel? At my work we have some hardware build, that
requires a driver we wrote for it. It works nice with a 2.2 kernel, but I
would like to port it to a 2.4 kernel. It's a PCI device, so any info
related on this subjects is welcome. If nothing else exists yet, I guess I
will have to struggle through the standard drivers that the 2.4 distribution
does include.
Eric
------------------------------
From: <[EMAIL PROTECTED]>
Subject: code language for Linux kernel
Date: Sun, 07 Jan 2001 08:30:04 -0000
Hi,
Is the Linux kernel written totally in C language OR some part in assembly
language also?
Someone please answer correctly becuase I asked this question to many
people but I could not get the proper answer.
Await the correct reply.
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: code language for Linux kernel
Date: Sun, 07 Jan 2001 09:43:04 GMT
[EMAIL PROTECTED] wrote:
>
> Hi,
>
> Is the Linux kernel written totally in C language OR some part in assembly
> language also?
The vast majority is written in C. There are some small processor
specific sections written in as,
> Someone please answer correctly becuase I asked this question to many
> people but I could not get the proper answer.
If you don't believe them you could always have a look for yourself.
The latest release is available here:
ftp://ftp.kernel.org/pub/linux/kernel/v2.4/
Erik
--
+----------------------------------------------------------+
Erik de Castro Lopo [EMAIL PROTECTED] (Yes its valid)
+----------------------------------------------------------+
Moore's Law: hardware speed doubles every 18 months
Gates' Law: software speed halves every 18 months
------------------------------
From: A. =?iso-8859-1?Q?Schr=F6der?= <[EMAIL PROTECTED]>
Subject: Re: #ifdef < You're compiling for Linux with g++ >
Reply-To: [EMAIL PROTECTED]
Date: Sun, 7 Jan 2001 12:33:01 +0100
Crossposted-To: comp.os.linux.development.apps,linux.redhat.misc
You can easily find out what the compiler predefines by running
g++ --verbose test.cc
having some "hello-world" test.cc lying around.
Here is what that usually does print out (at least on my box)
...
/usr/lib/gcc-lib/i386-linux/2.95.3/cpp0 -lang-c++ -v -D__GNUC__=2
-D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__
-Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux
-Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386
-D__i386__ test.cc
...
So, either linux, __linux__, or even __linux will do the job.
Regards
A. Schr�der
> I'm porting some C++ to Linux.
>
> Are there compiler defined constants that I can use to ifdef
> around the inconsistencies? I can always use -DCOMPILING_FOR_LINUX,
> but I'd rather use facilities of the compiler.
>
> Thanks
> Larry
>
------------------------------
From: "fszuper" <[EMAIL PROTECTED]>
Subject: NVIDIA-9.0-5 + kernel 2.4.0
Date: Sun, 7 Jan 2001 14:16:45 +0100
arg, i try to build a new driver for use with the release 2.4.0 of the
kernel
it say me :
[root@XIII-MAIN NVIDIA_kernel-0.9-5]# make all
rm -f nv.o os-interface.o os-registry.o Module-linux NVdriver
cc -c -Wall -Wunknown-pragmas -Wno-multichar -O -D__KERNEL__ -DMODULE -D_LOO
SE_KERNEL_NAMES -DUNIX -DLINUX -DNV4_HW -DNTRM -DRM20 -D_X86_=1 -Di386=1 -D_
GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -I. -I/usr/src/linux/include
nv.c
In file included from nv.c:52:
nv.h:131:6: warning: #warning This driver is not officially supported on
post-2.2 kernelsnv.c: In function `nv_lock_pages':
nv.c:556: warning: implicit declaration of function `mem_map_inc_count'
nv.c: In function `nv_unlock_pages':
nv.c:583: warning: implicit declaration of function `mem_map_dec_count'
nv.c: At top level:
nv.c:853: unknown field `unmap' specified in initializer
nv.c:853: warning: initialization from incompatible pointer type
make: *** [nv.o] Erreur 1
what's the problem?
------------------------------
From: [EMAIL PROTECTED] (Paul Sack)
Subject: devfs / pts
Reply-To: [EMAIL PROTECTED]
Date: Sun, 07 Jan 2001 14:01:12 GMT
I am using devfs and devfsd. This works fine. I want to move everything to use
the new devfs nodenames. This has not been a problem with the exception of the
use of pts's.
With devfsd, xterm's work fine in XF86 3.3. W/o them, I get an error message
that a pts couldn't be opened.
I am not mounting devpts (as the devfs docs suggest). I do *not* want to
upgrade to XF86 4.0 for a variety of unrelated reasons (as the docs do
suggest).
When I stop using devfsd, what do I need to mknod to get xterm's to work? (to
allocate a pts properly)
I am using glibc 2.1.3, BTW.
Thanks.
Paul Sack
--
Death is God's way of telling you not to be such a wise guy.
------------------------------
From: "junwon,Seo" <[EMAIL PROTECTED]>
Subject: GIve me a advice build enterprise linux system.
Date: Mon, 8 Jan 2001 00:44:16 +0900
Hi.
I have to build linux system.
Suppose that..
I have 10 TB NAS Storage, and 10 linux machine.
My puppose that each linux machine mount over network 10TB storage to local
mount point(ex. /home)
Maybe using NFS ...
Is possible?
And, I heard that ext2 fs's maximum file system is 4TB.
Well then, How much ReiserFS's maximum file system size?
And ReiserFS over the NFS is reliable?
Thanks
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: Library dependencies
Date: 07 Jan 2001 15:28:58 +0000
On Sat, 06 Jan 2001, Peter T. Breuer gibbered:
> look for binstats. A useful program that shows you all that kind of
> info (bin <-> lib dependency summaries).
Cool tool. Very cool tool. I shall be using it; thanks for the pointer.
Still, it doesn't do exactly what was asked, though; it says which
libraries are used and unused, but not what is (or is not) using each
one...
--
`Umbilical cords are weird squishy rubbery things.
Kinda like clams.' --- Dan Birchall in the Monastery
------------------------------
From: [EMAIL PROTECTED] (Paul Sack)
Subject: Re: code language for Linux kernel
Reply-To: [EMAIL PROTECTED]
Date: Sun, 07 Jan 2001 16:02:09 GMT
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
>Hi,
>
>Is the Linux kernel written totally in C language OR some part in assembly
>language also?
Most of it is in C. Some parts of it are in asm. If you want to end the
argument, do:
find /usr/src/linux -name '*.S'
--
Pascal Users:
To show respect for the 313th anniversary (tomorrow) of the
death of Blaise Pascal, your programs will be run at half speed.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: code language for Linux kernel
Reply-To: [EMAIL PROTECTED]
Date: Sun, 07 Jan 2001 18:01:04 GMT
On Sun, 07 Jan 2001 08:30:04 -0000, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>Is the Linux kernel written totally in C language OR some part in assembly
>language also?
How would you, for instance, save the registers of the running task and
restore ther registers of another task using only C?
>Someone please answer correctly becuase I asked this question to many
>people but I could not get the proper answer.
You don't suppose that taking a look at the actual code would reveal
anything?
------------------------------
From: [EMAIL PROTECTED] (Konstantinos Agouros)
Subject: 2.4.0 and sudden death in X?
Date: 7 Jan 2001 18:31:10 +0100
Hi,
I just tried out 2.4.0 and had some sudden deaths (machine just stood).
At the time of the deaths I had an ISDN-Line up. Otherwise nothing special.
System is a K6/2, SCSI (Adaptec), Teles 8-Bit-Card, USB-Support enabled.
Somebody has an idea about that?
Konstantin
P.S.: With 2.4 my harddisks are shown bigger than before (for example the
9GB-drive is now shown as 9.1 instead of 8.7). Has something changed here,
too?
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: [EMAIL PROTECTED]
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
============================================================================
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres
------------------------------
** 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
******************************