Linux-Development-Sys Digest #341, Volume #8 Tue, 12 Dec 00 10:13:10 EST
Contents:
Re: sound recording problem (Arne Driescher)
Re: Linux GUI programming ("Surinder Kumar")
Re: c++ in linux kernel (c++ exceptions) ("O.Petzold")
looking for SCSI Domex DMX 1391D driver ([EMAIL PROTECTED])
Re: Kernel symbols unavailable to my module ("Geoffroy Vallee")
Re: help : assembler & linux kernel ("Geoffroy Vallee")
Command named "shell" in toplevel kernel makefile (David Thor Bragason)
Re: How to optimize the Kernel-Compile ([EMAIL PROTECTED])
Re: Compiling C++ programs with GCC --> no GPL license implications (Pete Becker)
Re: Linux GUI programming ([EMAIL PROTECTED])
Crystal Reports.............. ("A. Groeneveld")
Source navigator cursor colour ([EMAIL PROTECTED])
imaginary complex value (Dr. Unk)
Re: Zombie processes? (bugz)
----------------------------------------------------------------------------
From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: sound recording problem
Date: Tue, 12 Dec 2000 09:23:40 +0100
Kaz Kylheku wrote:
>
> On Tue, 12 Dec 2000 12:11:07 +0530, Subhash Chandra <[EMAIL PROTECTED]> wrote:
> >Hi,
> >
> >I have sb pci 128 sound card (ES1371) on red hat 6.2 (2.2.14).
> >All the playback is taking place properly. But I am unable to record from
> >the micro phone.
>
> Perhaps the microphone input is not enabled or the gain is too low or muted.
> Use a mixer program like aumix to enable recording and adjust the gain.
I had a similar problem and found out that the only problem is
to define the microphone as recording source. If you are using KDE
and kmix as mixer use the _right_ mouse button to activate the recording
source.
-Arne
------------------------------
From: "Surinder Kumar" <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.development
Subject: Re: Linux GUI programming
Date: Tue, 12 Dec 2000 02:01:32 +0530
===== Original Message =====
From: Joshua Schaeffer <[EMAIL PROTECTED]>
Newsgroups: comp.os.linux.development.system,linux.redhat.development
Sent: Tuesday, December 12, 2000 7:07 AM
Subject: Re: Linux GUI programming
> > I would like to write a GUI based application, just like I can with
> > Windows. As an application and device driver writer, I have been forced
> > to use Windows because of the GUI. In all other respects, Linux is
> > superior.
>
> As an honest question and not flamebait, why do you feel Linux is superior
> to Windows as far as architecture is concerned?
>
>
Sir I am very new to Linux world but have you ever seen that "Program
performed illegal operation"
error in Linux and it will close. I haven't.
Have you ever waited for some task to finish in Linux. No I never. Those
virtual console we get are of real help.
and one more thing only "C-Z" is enough.
How many times you press that "CAD" hot key in a day?
Why is it that the Windows Millenium takes less space than Windows 1998 ?
Do you know the MS's remedy for "CAD" key. The Windows Me reboots
automatically whenever it sees that
the user will have to keep on pressing that "CAD" without any use.
( How many times we press that "CAD" key and then we turn towards that
on/off switch.)
What is that architecture you are talking about ?
If you cannot work happily in an enviornment than it is the fault of
Architecture. Isn't it correct ?
( This is my first mail to the news group. If I am wrong somewhere.
Please let me know ? )
*****************************
The information provided here may be incorrect.
I am a learner and I am bound to make mistakes.
****SKR***
*******************************
------------------------------
From: "O.Petzold" <[EMAIL PROTECTED]>
Subject: Re: c++ in linux kernel (c++ exceptions)
Date: Tue, 12 Dec 2000 10:36:49 +0100
>
> >code for calling dtors (__do_global_Xtors_aux) and for stack unwinding
>
> Don't bother trying to use global constructors or destructors. There is no
> provision in the module loading and unloading mechanism to have these called.
Yes, this I have to call it by hand.
> An unhandled exception is a serious problem in a C++ program. In the kernel,
> right thing to do would be to call panic() to bring the whole thing down,
> sicne the default response in hosted C++ is to terminate the program abnormally
> when there is an unhandled exception.
>
> A kernel module is not like a process. It's just a piece of code that is
> loaded into the kernel. You can't just terminate it the way you kill a process.
Well, to this relate the "real" problems, I guess.
>
> In order to remove a module, you must ensure that it's no longer in use, which
> means that there are no more dynamic resources associated with it and that it's
> not registered anywhere to be called. If it has resources, they will be leaked.
> If it's still registered somewhere, then the call will blow up when the code is
> no longer present.
At clean/good code, all resources will be deregistered by the destructors. That is
the
same problem as we have with "normal" C. So it is on our own responsibility...
Using auto_ptr gives us the power 8) for this this.
> >The best solution would be the call all destructors and "auto
> >cleanup_module"
> >for this imo. Or are here better solutions (maybee I'm wrong ?).
>
> The better solution is to avoid declaring any objects at file scope so that you
> don't need global constructors. Allocate everything you need dynamically.
> You can also use placement new to explicitly call the constructors of any
> file scope objects. Another solution may be to declare them within functions;
> code emitted by g++ constructs static objects within a statement block
> the first time that block is executed. But watch it: this mechanism isn't
> thread safe; it's based on testing a hidden flag. It should be okay if you do
> it inside the function init_module(). Then set some globally visible pointers
> to refer to these objects. In cleanup_module() you can call their destructors
> explicitly using the standard C++ syntax for doing that.
Well, this is the way which I do at moment. Good to see that you agree. I use
placement new. The most problems are start with the init_module constructor
calls, if a constructor fails - there is a thread problem not yet. This comes
later where I can use mutex (especially from realtime linux /rtai ) and than
accourcs an exception ( a real one or an emulated one).
> >The next is the .init section of user space programms. Is there for
> >kernel space
> >as well? What did I have forgotten ????
>
> You have forgotten that the kernel is written using C, and that any support
> for other languages is something you have to roll yourself.
At moment I check up what I have to do and have only a small look to the
"engine room" of c/c++ and the kernel. The question is, what do I have to
roll myself?
As I wrote, my solution would be to write a install_module/cleanup_module
wrapper for c++ code, which calls __do_global_xtor... Thats all at moment.
> >Porting code the other problem, but without exceptions, porting is very
> >heavy.
>
> Why did you write, in C++ with exceptions, code that is targetted at operating
> systems? What environments do you expect this to port to? One must be
> conservative when doing embedded work, not rely on the latest gadgets. If you
> want maximum portability, write it in C.
Yep, I agree. My first start was with C. My problem is I write C++ code inside
user space (Qt) wich communicates with the kernel using fifo devices and shared
memory. Therefor I share code in user and kernel space. Before using C++ in kernel
I wrote the code twice which makes a lot of work on each change (sometimes
faults etc.). Next, with the same language I can use the same abstraction for
user and kernel space. At last, C++ ist only a wrapper for offered kernel
functions.
thanks
Olaf
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware
Subject: looking for SCSI Domex DMX 1391D driver
Date: Tue, 12 Dec 2000 10:19:21 GMT
The Mustek SCSI scanner I use comes with a SCSI device called "Domex
DMX 1391D" which has a chip denoted as "DOMEX 536", sublined "9827".
I had a look at the scsi low level drivers in the kernel 2.2.17
xconfig app, some denoted with "53" at the beginning but non which
would really shout out -" take me"! I didn't expect to find
"DOMEX_xxx" but some chip should be compatible to the one on the Domex
controler - assuming it would be to expensive to design one from the
ground up.
Any suggestions or help?
Robert
------------------------------
From: "Geoffroy Vallee" <[EMAIL PROTECTED]>
Subject: Re: Kernel symbols unavailable to my module
Date: Tue, 12 Dec 2000 14:12:25 +0100
Hi,
You need to add this symbol to the TABLE_SYMBOL of Linux because do_fork is
not a function what you can't use in "normal" programmation.
A lot of kernel function are like do_fork and if you want to use them, you
must add them in the table of symbol.
In order to do that, edit the kernel/ksyms.c and add the following line :
EXPORT_SYMBOL(do_fork);
GV
Mansoor Peerbhoy <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi
>
> I dunno if this is the right place for this question, however, I have a
> problem.
>
> I am running Redhat 7.0 ( kernel version 2.2.16-22 ) and I have written
> a module, which needs to make a call to do_fork which is defined in
> /usr/src/linux/kernel/fork.c
>
> I dont want to go through the sys_call_table, but I want to call this
> function directly.
>
> in my module, I have declared the function prototype for do_fork as
>
> extern int do_fork ( unsigned long, unsigned long, struct pt_regs *);
>
> But still, when I am linking the module to the kernel via insmod, I get
> an error 'do_fork' unresolved external symbol.
>
> Can anybody tell me why this is so ?
>
> Any help will be appreciated
>
> Mansoor
>
> (PS - why is it that even the 'ksyms -a' command does not list do_fork
> ??? )
>
------------------------------
From: "Geoffroy Vallee" <[EMAIL PROTECTED]>
Subject: Re: help : assembler & linux kernel
Date: Tue, 12 Dec 2000 14:20:53 +0100
Thanks for your help! :)
Gordon McNutt <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> vallee geoffroy wrote:
>
> > Hello,
> >
> > I have a problem with an assembler code of the Linux kernel.
> > I don't understand the instruction .previous
> > Someone can help me?
> >
> > thanks.
> > GV
>
> Mysterious little fellow, isn't it? Not that I've ever managed to find
> it written down anywhere, but .previous tells the assembler to go back
> and start working in the section previously being written to prior to
> the last .section directive. If you have a macro which inserts a symbol
> in a special section, then you typically follow this pattern:
>
> asm( ".section <my_section> <code to put in that section> .previous");
>
> If you didn't have the .previous, the assembler would keep generating
> code in <my_section>, instead of wherever it was generating code before
> it encountered your macro.
>
> Hope this helps.
>
> --Gordon
>
------------------------------
From: [EMAIL PROTECTED] (David Thor Bragason)
Subject: Command named "shell" in toplevel kernel makefile
Date: 12 Dec 2000 11:50:48 GMT
Hello,
I just had a kernel build (2.2.18) fail for the first time. The compiler is gcc 2.97
snapshot 20001127, which could cause
problems, but however compiled 2.2.17 without problems. I noticed that the toplevel
makefile tries to get information about
my system using some "shell" command, which doesn't exist on my system, example:
*****
CC =$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)gcc; else \
$(CONFIG_SHELL) scripts/kwhich gcc272 2>/dev/null || $(CONFIG_SHELL)
scripts/kwhich kgcc 2>/dev/null || echo cc;
fi) \
-D__KERNEL__ -I$(HPATH)
Indeed, make zImage consequently calls my compiler as "cc" and not "gcc". "cc" did not
exist on my system either, so I just
made it a symlink to gcc. Eventually, the build fails.
I have, since my last compile of 2.2.17, thrown out some rpm packages that I didn't
think I needed (SuSE 6.4), I just have
no idea which one could possibly have had a program/script named "shell". Maybe just a
symlink to /bin/bash? I would
appreciate any tips. Thanks!
--
David Bragason, <bragason at uni-freiburg dot de>
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: How to optimize the Kernel-Compile
Date: Tue, 12 Dec 2000 14:36:58 +0100
Robert Resch wrote:
>
> juergen Heinzl wrote:
> >
> > In article <[EMAIL PROTECTED]>, Robert Resch wrote:
> > >Hi!
> > >
> > >I want to use a 486 DX-2-66 as a router. For a little more performance i
> > >want to compile the Kernel for 486.
> > >I've modified all Makefile 's from '-O2' to '-O9 -march=i486 -mcpu=i486'
> > >but the kernel doesn't start.
> > [-]
[...]
>
> I use the GCC 2.95.2. The Compiler recognizes the flags but the kernel
> won't boot...
> Optimizing in the 'make menuconfig' Script does only use the
> '-mcpu='-flag in the shorter Version '-m486'
> but i want to optimize for my 486 in everything and not only the
> scheduler as the -m486 does.
There were many groups with different opinions what optimal code for
i386 and descendants is, there is the gcc crowd, the pgcc crowd, the
kernel hackers, and other people. They didn't come to the same
conclusions, so there are different ways to get optimal results in
respect of one or another hacker crowd. The kernel is especially
difficult, since there is some assembler code in it, that has to be
compatible to the C part, which imposes some dependancies on what
machine code the compiler produces in the end. This in turn depends
highly on the optimization. AFAIK kernels without optimization (-O2)
won't run, as well as higher optimization levels have produced
non-running kernels when I tried it. Optimizing the kernel for a
particular machine by the means the compiler crowd provides will have
similar impacts on the machine code as those higher optimizations. This
would have to be tried out, if it runs at all, then it would have to be
carefully profiled, if it improves anything at all. If you followed this
NG, then you'd have seen that there are still no guarantees that the
kernel compiles with the latest gcc's, not to talk about other branches
of gcc, there really is some compiler dependancy, and it will be staying
forever. The means of optimization for a particular processor provided
in the kernel sources have been tested and verified that they somehow
give the best that can be achieved. So they are the way to go. Maybe
there are kernel-list archives with more information on that subject,
I'm sure it has been discussed to death sometimes.
In the case you fear the old hardware to be too slow, get decent
hardware. Linux will in my experience give you at least nearly the best
results compared to others in each case. Hope it's enough. I doubt that
more optimization could help here at all.
Bernd Strieder
------------------------------
From: Pete Becker <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c++,gnu.misc.discuss
Subject: Re: Compiling C++ programs with GCC --> no GPL license implications
Date: Tue, 12 Dec 2000 08:57:53 -0800
Kaz Kylheku wrote:
>
> On 12 Dec 2000 04:03:12 GMT, Sam Holden <[EMAIL PROTECTED]> wrote:
> >On Tue, 12 Dec 2000 02:57:13 +0000, E. Robert Tisdale <[EMAIL PROTECTED]> wrote:
> >>to exploit your own source code. The court will decide.
> >>And, until some court does decide such a case,
> >>Richard Stallman is just expressing his opinion
> >>about what the GPL and the LGPL mean.
> >
> >The FSF owns the copyright (I believe). RMS's opinion in this
> >case can presumably be taken to be the FSF opinion.
> >
> >If the copyright holder says that the special exception clause
> >applies, then it applies...
>
> Tisdale is a known troll. Save your keystrokes.
Bad idea. He happens to be right. Rights under copyright law are decided
by statues and by courts, not by public announcements. Legal opinions
that you get through newsgroups aren't worth the paper they're printed
on.
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Contributing Editor, C/C++ Users Journal (http://www.cuj.com)
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Linux GUI programming
Date: Tue, 12 Dec 2000 14:29:38 GMT
"Surinder Kumar" <[EMAIL PROTECTED]> writes:
> ----- Original Message -----
> From: Joshua Schaeffer <[EMAIL PROTECTED]>
> Newsgroups: comp.os.linux.development.system,linux.redhat.development
> Sent: Tuesday, December 12, 2000 7:07 AM
> Subject: Re: Linux GUI programming
>
> > > I would like to write a GUI based application, just like I can with
> > > Windows. As an application and device driver writer, I have been forced
> > > to use Windows because of the GUI. In all other respects, Linux is
> > > superior.
> >
> > As an honest question and not flamebait, why do you feel Linux is superior
> > to Windows as far as architecture is concerned?
>
> Sir I am very new to Linux world but have you ever seen that
> "Program performed illegal operation" error in Linux and it will
> close. I haven't.
You haven't been around _quite_ long enough then; you are liable to
run into "Segmentation fault: Core dumped" at _some_ point.
Mind you, when this happens, since buggy software _does_ exist, it
doesn't have the "Windows side-effect" of doing one or more of:
- Corrupting shared memory
- Leaking overall system memory
- Leaving some "droppings" in the registry
- Breaking something in the GDI subsystem
Instead, the program crashes, memory is cleaned up, open files get
closed, and the likelihood of the system _not_ being ready for another
round in the right with the "Buggy Program" is pretty low.
Windows has something of a "glass jaw," in comparison; hit it with
problems and it's liable to go down badly.
--
(concatenate 'string "cbbrowne" "@hex.net") <http://www.ntlug.org/~cbbrowne/>
"The newsreader abuse likely stems from more fundamental, than merely
just the UI, design disagreements. Requests from Unix programmers to
replicate Free Agent rightfully so should trigger the throwing of
sharp heavy objects at the requesting party."
-- [EMAIL PROTECTED] (jedi)
------------------------------
From: "A. Groeneveld" <[EMAIL PROTECTED]>
Subject: Crystal Reports..............
Date: Tue, 12 Dec 2000 14:42:20 +0100
Hello, who know if there's an Crystal reports type -like program which i can
use under linux?
--
Andr� Groeneveld
Middelweg 11
3235 NM Rockanje NL
Telefoon: 0181 401544
Fax: 020 8688169
Homepagina: www.home.hccnet/a.groeneveld
------------------------------
From: [EMAIL PROTECTED]
Subject: Source navigator cursor colour
Date: Tue, 12 Dec 2000 14:26:09 GMT
I've been trying to setup the colour scheme for source navigator 4.5.2
with a traditional black background and green text, but I can't adjust
the colour of the cursor to be anything other than BLACK, which
obviously can't be seen on a black background.
Is anybody aware of this problem ?
Best Regards
--
JD
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Dr. Unk <[EMAIL PROTECTED]>
Subject: imaginary complex value
Date: Tue, 12 Dec 2000 14:40:37 GMT
While compiling glibc-2.2 I get an error, since I have little
programming experience (other than a few programming projects at
school) I cannot fix this myself. I suspect I might have something to
do with gcc, in the past I have come upon problems with "imaginary"
numbers while bootstrap compiling both GCC and EGCS. I'm totaly
confused and would like to know if there is a fix to this. Below is
the error output given to me while attempting to compile the math part
of glibc:
In file included from ../include/bits/cmathcalls.h:1,
from ../math/complex.h:81,
from ../include/complex.h:1,
from conj.c:21:
../math/bits/cmathcalls.h: In function `cimagf':
../math/bits/cmathcalls.h:139: Unable to access imaginary part of
complex value
in a hard register on this target
make[2]: *** [/opt/tmp/glibc-2.2/build/math/conj.o] Error 1
make[2]: Leaving directory `/opt/tmp/glibc-2.2/math'
make[1]: *** [math/others] Error 2
make[1]: Leaving directory `/opt/tmp/glibc-2.2'
make: *** [all] Error 2
Thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: bugz <bz@>
Subject: Re: Zombie processes?
Date: 12 Dec 2000 08:55:32 -0600
On Fri, 08 Dec 2000 16:29:39 +0500, "Daniel Lenski"
<[EMAIL PROTECTED]> wrote:
>Hi,
>I have this little server daemon program that does something like this:
>
>if (!fork()) {
> handle_incoming_connection(socket);
> close(socket);
> exit(0)
>}
>
>But it seems to leave me with a zombie process every time it forks and
>then exits. How can I get rid of these zombie processes? I don't want
>to have to do a wait() for the child processes to exit, since that would
>destroy the whole point of handling multiply client connections ...
>
>Any help will be appreciated.
try wait() or waitpid().
------------------------------
** 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
******************************