Linux-Development-Sys Digest #627, Volume #6 Thu, 15 Apr 99 17:14:19 EDT
Contents:
Re: Where to provide a driver? (Adrian 'Dagurashibanipal' von Bidder)
seek for files >2GB (Georg Ritter)
Re: Q: Is it possible to compile binaries for a different processor? (Timo
Biesenbach)
Re: threads, how????? (mack)
loading a driver twice without stacking (Eric Hegstrom)
Re: depend: how do I learn?? (Martin Recktenwald)
Re: Q: Is it possible to compile binaries for a different processor? (Jaap
Schellekens)
Re: depend: how do I learn?? (James Stevenson)
Re: Kernel problem (PANIC) ([EMAIL PROTECTED])
Re: seek for files >2GB (Andreas Dilger)
Re: tcp_send_skb() (Nitin Malik)
compile now yields 'conflicting types' (Jay Johnson)
Re: clone() creates zombies (Linus Torvalds)
Re: ISR: Kernel->User space call (Przemek Klosowski)
Re: Q: Is it possible to compile binaries for a different processor? (Serguei
Patchkovskii)
Re: threads, how????? (Przemek Klosowski)
Re: Scheduling for user-level threads (Artur Biesiadowski)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Adrian 'Dagurashibanipal' von Bidder)
Crossposted-To: comp.os.linux.misc
Subject: Re: Where to provide a driver?
Date: Wed, 14 Apr 1999 19:06:59 GMT
On Wed, 14 Apr 1999 14:05:48 +0200, Sven Bauhan <[EMAIL PROTECTED]>
wrote:
>Hello,
>
>I've developed a device driver for linux. Now I want to provide under
>the GPL.
[...]
>Can anyone tell me where to put the driver and how to make it known?
Hi!
uploaden: for instance to ftp://sunsite.unc.edu/pub/linux/Incoming
(with an accompying .lsm file)
Then post an announcement to comp.os.linux.announce [If your
Provider has configured his newsserver correctly, this should do.
Otherwise you should mail the moderator - www.usenet.org to find out
who - and mail your provider that they should have their newsserver
configured correctly -- So best is, mail it directly]
--
Greets from over there
Dagurashibanipal
[EMAIL PROTECTED]
'What with our wounded who can't walk? We don't leave our own!'
'You're right, Captain. We'll take them. They're field rations'
-- Mary Gentle, 'Grunts!'
------------------------------
Date: Thu, 15 Apr 1999 12:46:09 +0200
From: Georg Ritter <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.c-programming
Subject: seek for files >2GB
Hi,
does anyone know if there is a 64 bit seek interface
for linux like in IRIX:
off_t lseek (int fildes, off_t offset, int whence);
off64_t lseek64 (int fildes, off64_t offset, int whence);
Greetings,
Georg
please also send a CC to [EMAIL PROTECTED]
------------------------------
From: Timo Biesenbach <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.alpha,comp.os.linux.questions,comp.os.linux
Subject: Re: Q: Is it possible to compile binaries for a different processor?
Date: Thu, 15 Apr 1999 09:29:43 +0200
It is possible. GCC is able to do cross-compiling for other
target architectures. Consult the gcc manuals for further
information.
Chris Gahan wrote:
>
> I was wondering if it is indeed possible to compile x86 binaries, for
> example, on an Alpha. I thought about this, and it definitely seems
> possible. I figure that if you get the x86 version of GCC, and
> compile it on an Alpha, it would spit out x86 binaries. Am I way off
> with this, or is this something that I can do right now? :)
--
+---+---+-+-+-+-+
| | |-+-+-+-+ Fraunhofer-Institut fuer Graphische Datenverarbeitung
+---+---+-+-+-+-+ Fraunhofer-Institute for Computer Graphics
| | |-+-+-+-+
+---+---+-+-+-+-+ Abteilung / Department : Document Imaging
| __ _ |
| ! ! _ ! \ | Timo Biesenbach
| ! !__! !_/ | Rundeturmstr. 6 phone ++49 6151 155 578
| | 64283 Darmstadt fax ++49 6151 155 299
+---------------+ Germany email [EMAIL PROTECTED]
------------------------------
From: mack <[EMAIL PROTECTED]>
Subject: Re: threads, how?????
Date: Thu, 15 Apr 1999 11:18:33 +0000
Sander Zijlstra wrote:
>
> I want to make three threads running simultaniously, and processing on
> the same data.
> One thread has to read in the data from a socket (later on it will be a
> I/O-device), while the next thread performs a FFT on that data, and
> finally the last thread demodulates it (because the data represents a
> modulated signal) and writes it to a file...
> My question is this; which scheme must I use to let these threads do
> their jobs simultaniously without bugging each other... do I use mutexes
> or semaphores... and what's the best way of handling the data between
> the processes through a buffer???
I assume the processing of any one set of data happens sequentially.
You read the data, then hand it to the FFT and then demodulate
it. With 3 threads running at any time, each will be working on
data from a different period. Normally you use mutexes to stop
data collisions, but I don't think you are going to have them.
I wrote a single threaded version of this sort of program
a while ago and I used a circular buffer for the data.
Joe
--
Joseph Mack, NA3T, FM05lw EME(B,D)
AZ_PROJ map server at http://www.wm7d.net/azproj.shtml
mailto:[EMAIL PROTECTED]
------------------------------
From: Eric Hegstrom <[EMAIL PROTECTED]>
Subject: loading a driver twice without stacking
Date: Wed, 14 Apr 1999 14:57:55 -0700
OK. I've written a device driver for a AMCC Matchmaker PCI development
board. Well, I didn't really write it. I got the initial source from a
nice fellow in Italy (Andrea Cisternino ([EMAIL PROTECTED])).
The problem I run into is if I load it twice there seems to be some
conflicts between the two.
Here's the scenario.
I make 2 copies of the module dptb0.o and dpob0.o
I install them with insmod and send parameters to load them as 2
different names
(via the -o option and setting the name sent to register_chrdev.)
I also call register_symtab( NULL ); in init_dev so that no symbols are
exported.
The strange thing I see is when I cat /proc/modules I get:
============
dpob0 3 0
dptb0 3 [dpob0] 0
============
I guess this means dptb0 references dpob0. I really don't want this to
happen and I can't figure out why it does. I think they call this
stacking?
They get assigned different major number as I can verify in
/proc/devices:
===========
126 dpob0
127 dptb0
===========
Any help would be greatly appreciated.
Please also email me as this group is active and my news server isn't
always!
Peace,
Eric
--
Eric Hegstrom .~.
Senior Software Engineer /V\
Sonoran Scanners, Inc. // \\ L I N U X
[EMAIL PROTECTED] /( )\ >don't fear the penguin<
520-617-0072 x402 ^^-^^
------------------------------
From: Martin Recktenwald <[EMAIL PROTECTED]>
Subject: Re: depend: how do I learn??
Date: 15 Apr 1999 14:29:21 +0200
"Dan Miller" <[EMAIL PROTECTED]> writes:
> 1. What does this mean?? I presume it represents SOME mechanism
> for updating files based upon their header dependencies (but Make
> does that anyway, doesn't it), but I don't know how it actually works.
> Besides, there's no .depend file anywhere here...
make does not know about header file dependencies. It does not parse
source files to find out those dependencies. This has to be done with
another utility, often called "makedepend". This utility generates the
dependencies in a format that make understands, writes them somewhere
(often to a file called ".depend") and this file is included in the
main Makefile.
makedepend itself is usually also called from within the Makefile
itself. In other words, if make was not yet called there can't be a
.depend file because it is dynamically generated.
Martin.
--
Sign the petition against spam:
http://www.politik-digital.de/spam/
------------------------------
From: [EMAIL PROTECTED] (Jaap Schellekens)
Crossposted-To: comp.os.linux.alpha,comp.os.linux.questions,comp.os.linux
Subject: Re: Q: Is it possible to compile binaries for a different processor?
Date: 15 Apr 1999 13:15:15 GMT
In article <[EMAIL PROTECTED]>, Chris Gahan wrote:
>I was wondering if it is indeed possible to compile x86 binaries, for
>example, on an Alpha. I thought about this, and it definitely seems
>possible. I figure that if you get the x86 version of GCC, and
>compile it on an Alpha, it would spit out x86 binaries. Am I way off
>with this, or is this something that I can do right now? :)
It should work but it is a lot of work. If you have em86 installed and you are
patient (it is slow) you can simply run the x86 version of gcc in stead of
building a cross compiler.
Cheers -- Jaap
------------------------------
From: [EMAIL PROTECTED] (James Stevenson)
Subject: Re: depend: how do I learn??
Date: Thu, 15 Apr 1999 02:12:30 +0000
Reply-To: [EMAIL PROTECTED]
Hi
answer you question 1
i know it does not check *.h files becuase i found that out the hardway :)
make clean ; make always works well :)
cya
On Wed, 14 Apr 1999 16:43:28 -0700, Dan Miller <[EMAIL PROTECTED]> wrote:
>I'm an experienced C programmer... but *not* in a *nix environment!!
>There are lots of things here that I need to learn, and can't find info on:
>for example, I'm looking at a Makefile that has a 'depend' command in
>it: 'depend .depend dep' ... looks like someone stuttered...
>I have two questions:
>
>1. What does this mean?? I presume it represents SOME mechanism
> for updating files based upon their header dependencies (but Make
> does that anyway, doesn't it), but I don't know how it actually works.
> Besides, there's no .depend file anywhere here...
>
>2. What's a good reference for learning basic *nix programming lore
> such as this???
>
>Any insightful feedback would be gratefully welcomed !!!
>(Oh mighty Oracle, who knows where the yellow went when I brushed
> my teeth with Pepsodent...)
>
> Dan Miller
>
>
--
Check Out: http://www.users.zetnet.co.uk/james/
E-Mail: [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Kernel problem (PANIC)
Date: Thu, 15 Apr 1999 11:36:55 GMT
Yeah, it looks like you compiled the ext2 file system out of the
kernel. I almost screwed myself with this one once, fortunately, I
made a backup disk image in LILO. I would suggest using a rescue disk,
and mounting your linux partition as root. Try 'vmlinuz
root=/dev/hda?' where ? is the partition linux is mounted on.
On Thu, 15 Apr 1999 12:27:45 +0800, Koh <[EMAIL PROTECTED]> wrote:
>These is what I got before Linux compiler kick me out...
>
>These is the message I got:
>
>Partition check:
>hda: hda1 hda2 <hda5 hda6>
>[MS-Dos FS Rel, 12, FAT 0, check=n, conv=b, uid=0, gid=0, umask=022,
>bmap]
>[me=0x0, cs=0, #f=0, fs=0, fl=0, ds=0, de=0, data=0, se=0, ts=0, ls=0]
>Transaction block size=512
>[MS-Dos FS Rel, 12, FAT 0, check=n, conv=b, uid=0, gid=0, umask=022,
>bmap]
>[me=0x0, cs=0, #f=0, fs=0, fl=0, ds=0, de=0, data=0, se=0, ts=0, ls=0]
>Transaction block size=512
>Kernel panic: VFS: Unable to mount root fs on 03:01
>
>KOH.
------------------------------
From: [EMAIL PROTECTED] (Andreas Dilger)
Crossposted-To: linux.dev.c-programming
Subject: Re: seek for files >2GB
Date: 15 Apr 1999 16:42:33 GMT
In article <[EMAIL PROTECTED]>,
Georg Ritter <[EMAIL PROTECTED]> wrote:
>does anyone know if there is a 64 bit seek interface
>for linux like in IRIX:
>
>
> off_t lseek (int fildes, off_t offset, int whence);
> off64_t lseek64 (int fildes, off64_t offset, int whence);
You can use llseek(), but of course the underlying filesystem needs to
support files > 32 bits anyways, and this is only available on UltraSparc
and Alpha I think. In that case, a normal lseek should work, since off_t
will be 64 bit, I believe.
Cheers, Andreas
--
Andreas Dilger University of Calgary \"If a man ate a pound of pasta and
Micronet Research Group \ a pound of antipasto, would they
Dept of Electrical & Computer Engineering \ cancel out, leaving him still
http://www-mddsp.enel.ucalgary.ca/People/adilger/ hungry?" -- Dogbert
------------------------------
Date: Thu, 15 Apr 1999 12:56:01 -0400
From: Nitin Malik <[EMAIL PROTECTED]>
Subject: Re: tcp_send_skb()
> I am trying to trace the path of a tcp packet through the kernel.
>
> At tcp_send_skb() ... the packet is written to the kernel memory. Next
> ip_queue_xmit() is called. How does the call to ip_queue_xmit() made ?
in the tcp_send_skb routine there is a call,
sk->prot->queue_xmit(sk, skb->dev, skb, 0);
This is a pointer to the function...
For a cool site on the source code check out
http://lxr.linux.no
nitin
------------------------------
From: Jay Johnson <[EMAIL PROTECTED]>
Subject: compile now yields 'conflicting types'
Date: 15 Apr 1999 14:32:18 GMT
Hi, I am getting some problems from compiling a package on Linux.
It works on HPUX and Solaris at School without a warning.
The output looks like this:
/usr/include/mathcalls.h:60:warning:conflicting types for built-in function
'cosf'
then for sinf, sqrtf, and fabsf.
Then lastly there is:
read.c:39:conflicting types for 'sys_errlist'
/usr/include/stdio.h:221:previous dec of 'sys_errlist'
And the package fails to compile.
I suppose that mathcalls.h is new and it is called from math.h
and stdio.h is different?
any help is greatly appreciated.
[EMAIL PROTECTED]
================== Posted via SearchLinux ==================
http://www.searchlinux.com
------------------------------
From: [EMAIL PROTECTED] (Linus Torvalds)
Subject: Re: clone() creates zombies
Date: 15 Apr 1999 15:26:22 GMT
In article <7f0r6a$qkv$[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>In article <7dqot5$hok$[EMAIL PROTECTED]>,
>Udo Giacomozzi <[EMAIL PROTECTED]> wrote:
>>I can use Fork() without problems, all works perfectly. But (as I need the
>>memory being shared) clone doesn't work at all.
>>I use flags CLONE_VM|CLONE_FS|CLONE_SIGHAND. When clone() is called, it
>>exits with a valid PID number (at least it seems so) in the parent process
>>but the child isnt executed. Using "ps" I see there has benn created a
>>zombie process. When the parent process exits, the zombie is deleted.
>>
>>What's the problem?
>
>Sounds like your child is exiting (perhaps due to a segfault or other signal
>you're not expecting) very soon after the clone(), but before you get
>the chance to run "ps".
No, the most likely problem is that Udo didn't notice that the clone
flags include the "parent signal" flag - which should normally be
SIGCHLD if you want the child to act like a normal child.
If you don't ask for a SIGCHLD, the kernel will assume that you wanted
an "invisible" child that doesn't show up with the normal process
primitives, so "wait()" won't see it etc. You have to use a special
flag to wait4/waitpid() in order to see it (the __WCLONE flag).
So Udo, either use the flags
CLONE_VM | CLONE_FS | CLONE_SIGHAND | SIGCHLD
or make sure the parent gets notified some other way and uses
waitpid(pid, statusp, __WCLONE);
to reap the cloned child.
In case this seems to be "unnecessary" - think of using clone() in
libraries etc to create some asynchronous events (like doing
asynchronous IO etc). You don't want to have the main process seeing
the threads.
Linus
------------------------------
From: Przemek Klosowski <[EMAIL PROTECTED]>
Subject: Re: ISR: Kernel->User space call
Date: 15 Apr 1999 14:30:07 -0400
Joe Pfeiffer <[EMAIL PROTECTED]> writes:
> > Milos Dedecek <[EMAIL PROTECTED]> writes:
> >
> > > I'm writing a kernel space device driver.
> > > In my interrupt service routine (kernel space) I want to notify user's
> > > programm, that the data has arrived. How can I do this?
> > >
> > > I want the user to register a function (in user space), which will be
> > > than called from my ISR. Is this possible? Or is there another way?
> > > Semaphores etc.?
>
> I was asleep when I wrote at least part of my previous response. No,
> your driver can't call a user-level function (that part was right).
> But if you open your device asynchronously, a SIGIO signal will get
Or, you can send an arbitrary signal to user space. Examples how to do
that come with the Linux Device Driver Kit, available from
http://www.llp.fu-berlin.de/pool/software/dutil/
A problem with signals is that their delivery is subject to normal
kernel scheduling, i.e. upto 10ms delay. This is only important if
you need to do realtime.
--
przemek klosowski <[EMAIL PROTECTED]> (301) 975-6249
NIST Center for Neutron Research (bldg. 235), E111
National Institute of Standards and Technology
Gaithersburg, MD 20899, USA
.. and for spam extractors, FCC Commisioners' email is:
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Serguei Patchkovskii)
Crossposted-To: comp.os.linux.alpha,comp.os.linux.questions,comp.os.linux
Subject: Re: Q: Is it possible to compile binaries for a different processor?
Date: 15 Apr 1999 15:44:32 GMT
Chris Gahan ([EMAIL PROTECTED]) wrote:
: I was wondering if it is indeed possible to compile x86 binaries, for
: example, on an Alpha. I thought about this, and it definitely seems
: possible. I figure that if you get the x86 version of GCC, and
: compile it on an Alpha, it would spit out x86 binaries. Am I way off
: with this, or is this something that I can do right now? :)
I used to build extended DOS x86 binaries with gcc on SGI Irix. Worked
like a charm, and was quite easy to set up. I see no reason why this
wouldn't work on Linux/Alpha. The only reasonably tricky bit is to get
the compiler support libraries and crt0.o for your target platform -
which you can do by cannibalizing a native gcc binary distribution for
the x86 OS flavour you want to target.
Regards,
/Serge.P
------------------------------
From: Przemek Klosowski <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: threads, how?????
Date: 15 Apr 1999 15:59:34 -0400
Sander Zijlstra <[EMAIL PROTECTED]> writes:
> My question is this; which scheme must I use to let these threads do
> their jobs simultaniously without bugging each other... do I use mutexes
> or semaphores... and what's the best way of handling the data between
> the processes through a buffer???
Mutexes are a simple primitive for, well, mutual exclusion of access.
Semaphores are a richer primitive; since they can take multiple
values, they allow queueing, ie. multiple attempts to reach the
resource.
The best approach is to read some examples (/usr/doc/glibc-2.0.7/examples.threads/)
and sketch out your problem in more detail, perhaps using both techniques.
--
przemek klosowski <[EMAIL PROTECTED]> (301) 975-6249
NIST Center for Neutron Research (bldg. 235), E111
National Institute of Standards and Technology
Gaithersburg, MD 20899, USA
.. and for spam extractors, FCC Commisioners' email is:
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]
------------------------------
From: Artur Biesiadowski <[EMAIL PROTECTED]>
Subject: Re: Scheduling for user-level threads
Date: Thu, 15 Apr 1999 22:39:39 +0200
[EMAIL PROTECTED] wrote:
>
> I have a basic question ?
>
> Consider a user-level implementation of threads. How can I write a
> scheduler for user-level threads within a process. For example
> when a thread blocks on I/O or system-call , I want another user-level
> thread to be scheduled. If I don't have a scheduler then the entire
> process will be blocked , which I don't want. Without a scheduler
> a thread cannot be scheduled without being voluntarily relinquised
> by current thread.
>
> How is this taken care of in Posix threads ? ( In linux I beleive
> it uses clone() & some scheduling primitives ) Do they necssarily
> require OS support for scheduling.
You might want to look at kaffe source code at
http://www.transvirtual.com
They implement user level treads and had to overcome mentioned problems.
In fact they do not use low level read/open directly, but the wrapper
functions.
Linux threads use one process for one thread so switching is performed
by normal kernel mechanism.
Artur
------------------------------
** 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
******************************