Linux-Development-Sys Digest #400, Volume #8 Tue, 9 Jan 01 09:13:09 EST
Contents:
Re: C++ compilers other than g++. (Greg Comeau)
Re: GCC help (Frank Sweetser)
Re: >1 processes on 1 file at same time ("Steven J. Hathaway")
Re: code language for Linux kernel ("Steven J. Hathaway")
$$$ MAKE A LOT OF MONEY EASY $$$ ([EMAIL PROTECTED])
how to get the pci device resources ("ShawnTsao")
UNIX98 Pty's ???? ("Morten B�hmer")
Re: two mice on a linux box (Anders =?iso-8859-1?Q?=D6stling?=)
Re: device driver programming (Red Hat 7.0) (Kasper Dupont)
Re: how to get the pci device resources (Josef Moellers)
Re: syncing fs from inside a kernel module (Kasper Dupont)
Re: In Kernel 2.4 cdrom mount.. (Kasper Dupont)
Re: CD-ROM Eject (Kasper Dupont)
Re: device driver dev (Kasper Dupont)
Re: code language for Linux kernel (Kasper Dupont)
Re: code language for Linux kernel (Robert Kaiser)
Re: In Kernel 2.4 cdrom mount.. (Chris Rankin)
Re: code language for Linux kernel (Kasper Dupont)
Re: In Kernel 2.4 cdrom mount.. (Kasper Dupont)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Greg Comeau)
Subject: Re: C++ compilers other than g++.
Date: 8 Jan 2001 22:04:50 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
Thaddeus L Olczyk <[EMAIL PROTECTED]> wrote:
>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...).
Various details on Comeau C++ can be found at our web site,
http://www.comeaucomputing.com , it doesn't come with a debugger,
but usually can be used with the one available with the C compiler
(name mangling many be different though). Doj't knwo what else
you're looking for...
- Greg
--
Comeau Computing / Comeau C/C++ "so close" 4.2.44 betas NOW AVAILABLE
TRY Comeau C++ ONLINE at http://www.comeaucomputing.com/tryitout
Email: [EMAIL PROTECTED] / WEB: http://www.comeaucomputing.com
------------------------------
From: [EMAIL PROTECTED] (Frank Sweetser)
Subject: Re: GCC help
Date: 9 Jan 2001 03:27:27 GMT
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>I have a stupid question that I am sure someone here could answer. I am
>completely new to Linux and I am trying to use Linux to assist me in
>learning to program (complete newbie here too). I've written a couple of
>very simple programs that just display test using printf statements. However
>whenever I compile them with gcc and try to execute them from the terminal I
>don't get anything but an error stating that Shared libraries are not
>supported. Yet when I click on the file in KDE nothing happens of course,
>but when I logout to the command line I see my intended output. Am I missing
>something here?
Sounds like you're doing something wrong. what do your programs do? how
are you compiling them? how are you running them?
--
Frank Sweetser rasmusin at wpi.edu, fs at suave.net | $ x 14
Full-time WPI Network Tech, Part time Linux/Perl guy |
You know, Hobbes, some days even my lucky rocketship underpants don't help.
-- Calvin
------------------------------
Date: Mon, 08 Jan 2001 20:21:17 -0800
From: "Steven J. Hathaway" <[EMAIL PROTECTED]>
Subject: Re: >1 processes on 1 file at same time
Kasper Dupont wrote:
> >
> > I would be very thankful for every information i can get from you.
> >
> > cheers Michael Palme
> >
> > Sent via Deja.com
> > http://www.deja.com/
>
> Every successfull call of open creates a new struct file.
> When a process calls fork the child will inherit pointers
> to theese structs, and the struct file will first be
> deleted when all references have been closed.
>
When a fork is issued, the associated files of the parent usually
are duplicated (see the man page for "dup" or "dup2" describing
this functionality.
- Steve Hathaway
>
> There can be more struct file refering to the same file
> if it has been opened by multiple calls to open by the
> same or different processes.
>
> --
> Kasper Dupont
------------------------------
Date: Mon, 08 Jan 2001 21:27:50 -0800
From: "Steven J. Hathaway" <[EMAIL PROTECTED]>
Subject: Re: code language for Linux kernel
[EMAIL PROTECTED] wrote:
> 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.
>
Most of the kernel is written in C. Small parts of architecture dependent
code
are written in assembler.
It is possible to write an entire programming system in C, including several
levels
of intermediate code and token processing, with the final interpretation
being
done to emit binary code that is optimized and tuned for a wide variety of
computing engines. This is how cross-compilers and cross-assemblers work.
The hardest part of code generation is for those systems that rely on
horizontal
(long-word) microcode instead of the more traditional vertical (short-word)
instruction sets common in most computers. The (long-word) horizontal
microcode is often for control-store memory that defines activities of shift
registers, accumulator and arithmetic unit processing. Assembly language
is often necessary for special drivers for digital signal processing (DSP).
Horizontal microcode (long-word) programming often is implemented in control
lengths of 128-256 bits, or some intermediate or process determined lengths.
In modern computers, the control store is implemented in silicon to give
users
the smaller and more compact binary programming language interface.
-Sincerely,
Steven J. Hathaway
------------------------------
From: [EMAIL PROTECTED]
Subject: $$$ MAKE A LOT OF MONEY EASY $$$
Date: Mon, 08 Jan 2001 15:26:26 GMT
lw
begin 644 cash.html
M/&AT;6P^#0H\:&5A9#X-"CQT:71L93Y5;G1I=&QE9"!$;V-U;65N=#PO=&ET
M;&4^#0H\;65T82!H='1P+65Q=6EV/2)#;VYT96YT+51Y<&4B(&-O;G1E;G0]
M(G1E>'0O:'1M;#L@8VAA<G-E=#UI<V\M.#@U.2TQ(CX-"CQS8W)I<'0@;&%N
M9W5A9V4](DIA=F%38W)I<'0B/@T*/"$M+0T*9G5N8W1I;VX@34U?;W!E;D)R
M5VEN9&]W*'1H95523"QW:6Y.86UE+&9E871U<F5S*2![("\O=C(N,`T*("!W
M:6YD;W<N;W!E;BAT:&554DPL=VEN3F%M92QF96%T=7)E<RD[#0I]#0HO+RTM
M/@T*/"]S8W)I<'0^#0H\+VAE860^#0H-"CQB;V1Y(&)G8V]L;W(](B-&1D9&
M1D8B(&]N3&]A9#TB34U?;W!E;D)R5VEN9&]W*"=H='1P.B\O=W=W+G!R:79A
M=&5G;VQD+F-O;2]J;VEN+G!H=&UL/W=M7VQO9VEN/71T8F]Y,C1F<29A;7`[
M=VU?<')O9W)A;3U40R9A;7`[=VU?<F5F=7)L/6AT='`E,T$O+W=W=RYM:6ME
M=FED+G1O<&UO9&5L+F-X+R<L)W1E<W0G+"=W:61T:#TQ+&AE:6=H=#TQ)RDB
M/@T*/'`@86QI9VX](F-E;G1E<B(^/&9O;G0@<VEZ93TB-2(^/&(^/&9O;G0@
M8V]L;W(](B,P,#`P,#`B/DY%140@0T%32"P@1D%35"!-3TY%62`-"B`@250@
M4D5!3$Q9(%=/4DM3(2$A(3PO9F]N=#X\+V(^/"]F;VYT/CPO<#X-"CQP/B`\
M82!H<F5F/2)H='1P.B\O;6]B>61I8VMS+F-O;2]C;VUM;VYS+U1O;4-L86YC
M>6AA;&PO;65S<V%G97,O.30N:'1M;"(^:'1T<#HO+VUO8GED:6-K<RYC;VTO
M8V]M;6]N<R]4;VU#;&%N8WEH86QL+VUE<W-A9V5S+SDT+FAT;6P\+V$^/"]P
5/@T*/"]B;V1Y/@T*/"]H=&UL/@T*
`
end
------------------------------
From: "ShawnTsao" <[EMAIL PROTECTED]>
Subject: how to get the pci device resources
Date: Tue, 9 Jan 2001 16:33:19 +0800
Hi,
I tried to write a device driver, but i have a probelm,
How to get the pci device resources in module about irq, memory map ....
Thanks for your help.
Shawn Tsao
------------------------------
From: "Morten B�hmer" <[EMAIL PROTECTED]>
Subject: UNIX98 Pty's ????
Date: Tue, 9 Jan 2001 09:58:51 +0100
How am I supposed to get 'em to work?
My first problem is the standard util-linux package, is there a patch to
make it support Unix98 pty's?
Agetty does not seem to support it out of the box, do anyone know of
any patches for programs like this?
--
Best Regards,
Morten B�hmer - [EMAIL PROTECTED]
AdCo Partner AS
Bjellandveien 14 - 3172 VEAR
[EMAIL PROTECTED]
http://www.veggers.no
------------------------------
From: Anders =?iso-8859-1?Q?=D6stling?= <[EMAIL PROTECTED]>
Subject: Re: two mice on a linux box
Date: Tue, 09 Jan 2001 09:51:56 -0500
Kasper Dupont wrote:
>
> David Baldwin wrote:
> >
> > Hi there, has anyone ever tried running two mice on a linux box at once?
How about three :-). I have a touchpad, a PS/2 and a USB mouse and all
three of
them works within X. You can have the console mouse (gpm) work with
multiple mice
using "chaining" (see the gpm man pages).
My X config for two mice (actually three since the touchpad and ps/2
both shares
the ps/2 driver) looks like this [Xfree 4.0.2]
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons"
Option "Emulate3Timeout" "50"
EndSection
Section "InputDevice"
Identifier "Mouse2"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
EndSection
Section "ServerLayout"
Identifier "layout1"
Screen "screen1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Mouse2" "SendCoreEvents"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
+------------------------------------------------------------+
| Anders �stling, IKEA Corporate Technology Group |
| E-mail: [EMAIL PROTECTED] |
| Voice: +46-42-26 43 45 |
+--"Freedom is just another word for nothing left to loose"--+
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: device driver programming (Red Hat 7.0)
Date: Tue, 09 Jan 2001 09:21:26 +0000
energon wrote:
>
> I've had the same problem and found out that after
> installing Redhat 7.0 with kernel sources, an RPM
> package called kernel-headers-2.4.0-0.26 is installed.
>
> Now, isn't that a sin to install 2.4.0 kernel headers
> for 2.2.16 kernel sources ? :)
>
> Try
> rpm -q -a | grep kernel
>
> on Redhat 7.0 systems to find out more.
>
> Hope this helps.
> -energon
>
[...]
I don't know what Redhat has been thinking,
I cannot see any reason why that would be a
good idea.
--
Kasper Dupont
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: how to get the pci device resources
Date: Tue, 09 Jan 2001 10:28:43 +0100
ShawnTsao wrote:
> =
> Hi,
> =
> I tried to write a device driver, but i have a probelm,
> How to get the pci device resources in module about irq, memory map ...=
=2E
UTSL
There are more than enough examples in the linux/drivers subtree.
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: syncing fs from inside a kernel module
Date: Tue, 09 Jan 2001 09:58:19 +0000
Robert Redelmeier wrote:
>
> Mario Kemper wrote:
> >
> > i have written a kernel module that switches the PC off, when an interrupt
> > arrives at the parallel port. Now i want to sync the file systems before
> > i switch off to avoid data loss. I haven't found any way to do this.
> > No userland interaction is allowed so that's no option.
>
> The appropriate sync syscall should be allowed in a module.
> Have a look at MagicSysRequest key sources.
>
> -- Robert
It is probably better to just call sys_sync() directly.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: In Kernel 2.4 cdrom mount..
Date: Tue, 09 Jan 2001 10:07:03 +0000
Chris Rankin wrote:
>
> Kasper Dupont wrote:
> > Normally /dev/cdrom is a symbolic link to the device driver
> > for cdrom. Check that the link exists and points to the
> > correct device.
> Agreed...
>
> > What the correct device is depends on system configuration.
> > With ATAPI drives you have two different options, I think
> > IDE-SCSI is the best.
> But it is *not* the easiest to setup! Since the guy has an IDE cdrom,
> all that is *really* necessary is to point /dev/cdrom to /dev/hdc (most
> likely):
>
> # cd /dev; ln -s hdc cdrom
>
> "hdc" assumes that the CDROM is the master on the second IDE controller.
>
> This is a lot more straightforward than loading a SCSI emulation layer
> and then pretending that your IDE CDROM is SCSI.
>
> Please do not confuse the newbies!
> Cheers,
> Chris
What is easiest depends on what the system looks like
at the moment. Both require kernel arguments to be
correct, drivers must be compiled into the kernel or
loaded as modules, device special file and link must
exist and be correct.
I know systems that configure the old style IDE driver
at installation. There might also exist systems
configuring ide-scsi at installation, it is a good
idea since that does allow you to do more with the
drive.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: CD-ROM Eject
Date: Tue, 09 Jan 2001 10:20:15 +0000
P.D. Lovelace wrote:
>
> The program I have mount the cdrom in the directory /mnt/<volume name>
> whenever a cd is inserted. I have it setup to detect when the tray is open,
> then unmount it. I tryed unlock the tray after the mount command with
> ioctl(cdromfd, CDROM_LOCKDOOR) which should toggle the lock status. This
> causes a whole slew of problems in that after the filesystem is unmounted,
> the cd tray remains locked.If I eject the CD-ROM manually by sticking a
> paper clip in the litte hole, it unmounts the file system properly and
You can disable the locking with the command:
printf 0 > /proc/sys/dev/cdrom/lock
> works. I know that the cdrom issues an ejection request when the button is
> push with a locked tray, because in Windows, if I have the try locked and
> push the eject button, it says "Are you sure you wish to eject?"
Then it must be possible, if nobody can tell how to get the
information I would consider inserting a few printk in the
cdrom system to see if anything happens when the button is
pressed. I how looked at the code without finding anything
that would obviously work.
>
> I did try using the automounter that is already developed, but for the
> application I'm creating, I don't need most of the features in it, I just
> need mount/umount.
>
> Thank You,
> P.D.
>
[...]
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: device driver dev
Date: Tue, 09 Jan 2001 10:24:31 +0000
[EMAIL PROTECTED] wrote:
>
> Ionel GARDAIS wrote:
>
> > I have a Canon LBP 460 Laser printer.
> >
> > I'm looking for some sample code to develop a kind of device driver to
> > emulate the windows drivers that shape datas before to send them to the
> > printer.
> >
> > Is this idea suitable ?
> > Do you have some infos ?
>
> The first problem will be to find out what the data to be sent to the
> printer needs to look like. If it just accepts data from the printer
> port like a normal printer, you might be able to integrate this code
> with say gimp-print.
>
> It might also turn out that the printer needs some form of real time
> control from the parallel port, with stringent timing or other stuff. In
> that case you might need a real device driver as well.
>
> But in any case the problem will most likely be to find out what to send
> to the printer, not creating the data: that will be mostly
> straightforward mangling of bits, that only gets to be really
> interesting if you care about quality.
>
> Thomas
Ten years ago you would always be able to find the information
in the printer manual. But unfortunately manuals are not what
they used to be. If the manual is not good enough you could
consider writing an email to Canon asking for the information
you need.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: code language for Linux kernel
Date: Tue, 09 Jan 2001 10:30:20 +0000
Kaz Kylheku wrote:
>
> On Mon, 08 Jan 2001 09:05:35 +0000, Kasper Dupont <[EMAIL PROTECTED]> wrote:
> >Kaz Kylheku wrote:
> >>
> >> 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?
> >
> >That could be possible, I once wrote a scheduler in Turbo Pascal
> >using as litle as three inline assembler instructions.
>
> In other words, you weren't programming in Pascal.
No, but I could store the entire state using Pascal,
and I could restore the entire state except from SS
using Pascal. If Borland had allowed me to write
sseg=<exp>; then I could have done it. What I'm
saying is just that there could exist high level
languages where it can be done.
--
Kasper Dupont
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: code language for Linux kernel
Date: 9 Jan 2001 11:12:13 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Kaz Kylheku) writes:
> How would you, for instance, save the registers of the running task and
> restore ther registers of another task using only C?
You could do it with setjmp()/longjmp(), but of course these
functions themselves need to be implemented in assembler.
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH http://www.elinos.com
Klein-Winternheim / Germany http://www.sysgo.de
------------------------------
From: Chris Rankin <au.com.zipworld@{no.spam}rankinc>
Subject: Re: In Kernel 2.4 cdrom mount..
Date: Tue, 09 Jan 2001 11:50:58 +0000
Kasper Dupont wrote:
> What is easiest depends on what the system looks like
> at the moment. Both require kernel arguments to be
> correct, drivers must be compiled into the kernel or
> loaded as modules, device special file and link must
> exist and be correct.
The drivers for an IDE-CDROM are usually already set-up and ready to go.
It's a good bet that THAT is what most out-of-the-box systems look like.
The guy just wanted to use his CD-ROM. Telling someone that they can
make their IDE drive look like a SCSI drive doesn't address that issue,
no matter how many spiffy features it might offer down the road.
Chris
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: code language for Linux kernel
Date: Tue, 09 Jan 2001 13:26:18 +0000
Robert Kaiser wrote:
>
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Kaz Kylheku) writes:
> > How would you, for instance, save the registers of the running task and
> > restore ther registers of another task using only C?
>
> You could do it with setjmp()/longjmp(), but of course these
> functions themselves need to be implemented in assembler.
Some implementations of setjmp() and lngjmp() might be
able to do that but you cannot be sure that all will.
I don't think you could actually create a task using
theese two functions, but if you knew the internal
structure sigjmp_buf you perhaps could.
Every feature in a programing environment either have
to be implemented in assembler or the compiled into
assembler from a higher level language. The difference
is not that important, what's important is that you
will always need some architecure specific code, and
you have to place it somewhere.
>
> ----------------------------------------------------------------
> Robert Kaiser email: rkaiser AT sysgo DOT de
> SYSGO RTS GmbH http://www.elinos.com
> Klein-Winternheim / Germany http://www.sysgo.de
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: In Kernel 2.4 cdrom mount..
Date: Tue, 09 Jan 2001 13:40:58 +0000
Chris Rankin wrote:
>
> Kasper Dupont wrote:
> > What is easiest depends on what the system looks like
> > at the moment. Both require kernel arguments to be
> > correct, drivers must be compiled into the kernel or
> > loaded as modules, device special file and link must
> > exist and be correct.
>
> The drivers for an IDE-CDROM are usually already set-up and ready to go.
> It's a good bet that THAT is what most out-of-the-box systems look like.
But that was obviously not the case here. It was not
setup and ready to go. Why do you expect most systems
not to use IDE-SCSI when it is the best solution?
>
> The guy just wanted to use his CD-ROM. Telling someone that they can
> make their IDE drive look like a SCSI drive doesn't address that issue,
> no matter how many spiffy features it might offer down the road.
>
> Chris
--
Kasper Dupont
------------------------------
** 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
******************************