Linux-Development-Sys Digest #61, Volume #8 Wed, 2 Aug 00 20:13:16 EDT
Contents:
Re: Ncurses version check (Thomas Dickey)
Re: linux device drivers info (Rick Ellis)
Re: Multiple System.map symlinks? (Paul Kimoto)
Re: Memory Display command (Tom Roberts)
Re: GCC 2.95.2 problems on RedHat 6.2 -- help anyone ? (Ronald Cole)
Re: Timeout function (Tom Roberts)
to close a socket after crash (Travis Hein)
Re: read() and directories (Mario Klebsch)
Re: socket connection, please help!! (Mario Klebsch)
Re: Ncurses ("tom")
Re: Ncurses ("tom")
Re: measuring time on LINUX ("Norman Black")
Re: read() and directories (Kaz Kylheku)
Re: Multiple System.map symlinks? (jac0b)
interruptible_sleep_on isn't working on multi-threaded app. ([EMAIL PROTECTED])
Re: linux device drivers info (MJ Dainty)
the quotation mark " (alikbm)
Re: read() and directories (Alexander Viro)
differences betw coLilo and Lilo (Yew Fai, Wong)
----------------------------------------------------------------------------
From: Thomas Dickey <[EMAIL PROTECTED]>
Subject: Re: Ncurses version check
Date: 2 Aug 2000 17:26:29 GMT
Marco van de Voort <[EMAIL PROTECTED]> wrote:
> In article <8m95a1$4r6$[EMAIL PROTECTED]>, Thomas Dickey wrote:
>>Marco van de Voort <[EMAIL PROTECTED]> wrote:
>>
>>> It seems that ncurses 3 defines a different function for that than later
>>> versions.
>>
>>before ncurses 5, only the header files tell you the version - there is
>>no function.
> The header files don't exist. I'm creating the header files :-)
I understood that by context (pascal). But what "function" are you
referring to for the version?
--
Thomas E. Dickey <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: linux device drivers info
Date: 2 Aug 2000 18:14:50 GMT
In article <[EMAIL PROTECTED]>,
Rafael Garc�a <[EMAIL PROTECTED]> wrote:
>There are anything as good as the book 'Linux Device Drivers' by
>Alessandro Rubini in a non printed format?
Try http://kernelbook.sourceforge.net
--
http://www.fnet.net/~ellis/photo/linux.html
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: Multiple System.map symlinks?
Date: 2 Aug 2000 14:09:52 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, jac0b wrote:
> I'm compiling different versions of the linux kernel. What I would like
> to do is be able to have multiple Systam.map-x.y.z 's. This way when I
> boot into a different versions of the kernel it won't complain about the
> System.map-x.y.z being the wrong version.
"It" is probably klogd(8). Its man page says:
: If a symbol file is not explicitly specified the
: following filenames will be tried:
:
: /boot/System.map
: /System.map
: /usr/src/linux/System.map
:
: Version information is supplied in the system maps as of
: kernel 1.3.43. This version information is used to direct
: an intelligent search of the list of symbol tables. This
: feature is useful since it provides support for both pro-
: duction and experimental kernels.
:
: For example a production kernel may have its map file
: stored in /boot/System.map. If an experimental or test
: kernel is compiled with the sources in the 'standard'
: location of /usr/src/linux the system map will be found in
: /usr/src/linux/System.map. When klogd starts under the
: experimental kernel the map in /boot/System.map will be
: bypassed in favor of the map in /usr/src/linux/System.map.
Do you want multiple System.maps for _different_ kernel version numbers, or
for the _same_ kernel version number?
> Here's my system:
>
> Distro: RedHat 6.0
> Booter: Lilo
>
> I notice that the map= is a global setting in lilo.conf. I try to
> specify it in each image subsection, but lilo complains about that.
That is a completely different "map" file. Actually, the kernel takes
no interest in the System.map file, and so this is rather off-topic for
c.o.l.d.system.
--
Paul Kimoto
Disclaimer: Other than explicit citations of URLs, hyperlinks appearing
in this article have been inserted without the permission of the author.
------------------------------
From: Tom Roberts <[EMAIL PROTECTED]>
Subject: Re: Memory Display command
Date: Wed, 02 Aug 2000 13:33:24 -0500
davidz wrote:
> Does any body now about command that can display the data that exist in my
> memory ? (for instance which data
> reside in address 0 till 0x 10000)
(as root):
od [format] /dev/mem | more
As physical addresses are rarely useful in a Linux environment, you
may have more success figuring out how to use gdb on a running kernel.
Tom Roberts [EMAIL PROTECTED]
------------------------------
From: Ronald Cole <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GCC 2.95.2 problems on RedHat 6.2 -- help anyone ?
Date: 02 Aug 2000 11:43:55 -0700
[EMAIL PROTECTED] (Grant Edwards) writes:
> I had assume that the transition from odd->even-test wasn't
> made until the odd-numbered kernel was fairly stable. I
> certainly wouldn't expect a stable-release candidate to have
> "bad VM problems".
Well, it's not. And "test" does not mean "release candidate". That
said, I much preferred using the x.odd.zz nomenclature until the
actual x.even.0 stable release, simply to avoid just the confusion you
suffered from. Anyhow, at the very least, it should be called "pre"
instead of "test".
Also, it doesn't hurt to be reading "kernel traffic" or "linux weekly
news" (links provided on www.kernelnotes.org).
--
Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412
Ronald Cole <[EMAIL PROTECTED]> Phone: (760) 499-9142
President, CEO Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B
------------------------------
From: Tom Roberts <[EMAIL PROTECTED]>
Subject: Re: Timeout function
Date: Wed, 02 Aug 2000 13:44:14 -0500
"Ram�n Ag�ero" wrote:
> I need to know if there is a function within Linux kernel that allows to
> execute a function after a specified length of time.
Look at init_timer(), add_timer(), and del_timer(), in <linux/timer.h>.
They can be used at interrupt level.
If you just want to suspend the current process for a given time:
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(jiffies_to_delay);
// don't do this at interrupt level!
This is for Linux kernel 2.2.X.
Tom Roberts [EMAIL PROTECTED]
------------------------------
From: Travis Hein <[EMAIL PROTECTED]>
Subject: to close a socket after crash
Date: Wed, 02 Aug 2000 15:35:47 -0400
My program opens a UDP socket.
in the event it gives a segmentation fault and crashes, the port i bound the
socket to stays open. The only way i know how to close the socket is reboot the
machine.
Is there a command or tool, or process I may use to close a specified socket
outside of the program that created it.
(since the program crashed, i lost the socket descritpor, or handle)
any input would be greatly appreciated
Trav
------------------------------
From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: read() and directories
Date: Wed, 2 Aug 2000 20:30:49 +0200
Fro-Man <[EMAIL PROTECTED]> writes:
>From what I remember this is true and correct behavoir. Directories are
>kind of special in that if you screw them up, you could lose whole
>portions of your file structure, so neither read(), nor write() will work
>on them.
Not allowing write(2) on directories would be sufficient to guarantee
file system integrety.
73, Mario
--
Mario Klebsch [EMAIL PROTECTED]
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB 1483 30CE 9FB2 A047 9CE0
Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5 8B98 9464 53FF 9382 F518
------------------------------
From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: socket connection, please help!!
Date: Wed, 2 Aug 2000 20:34:08 +0200
Gee <[EMAIL PROTECTED]> writes:
>the problem I'm having is the sockets doesn't connect, the server doesnt
>even see the request to connect.
Are you sure, you converted the port number into network byte order?
You can try to look onto the wire using tcpdump on the linux box or
snoop on solaris.
73, Mario
--
Mario Klebsch [EMAIL PROTECTED]
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB 1483 30CE 9FB2 A047 9CE0
Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5 8B98 9464 53FF 9382 F518
------------------------------
From: "tom" <[EMAIL PROTECTED]>
Subject: Re: Ncurses
Date: Wed, 02 Aug 2000 19:51:27 GMT
In article <[EMAIL PROTECTED]>, Wolfgang Draxinger
<[EMAIL PROTECTED]> wrote:
I did research that, or as you say RTFM.... Those functions return Y/X positions
and are not documented to return anything else. I need to know what character
is at the Y/X position and still cant find a function to do that.
Thanks anyway.
-Tom
>
>
> tom schrieb:
>
>> Hello, I need to test the x,y of a window to find out what character is
>> there for line drawing. What is the best way to do this. Thanks.
>> -Tom
>
> RTFM! see man ncurses. Your problem matches man curs_getyx. At the
> moment I'm programming a classwork for ncurses providing windows,
> buttons and so on.
>
> When this will be complete it's avilable at
> http://wdlinux.virtualave.net
>
> C.U. W.X.D.
>
------------------------------
From: "tom" <[EMAIL PROTECTED]>
Subject: Re: Ncurses
Date: Wed, 02 Aug 2000 20:12:56 GMT
In article <[EMAIL PROTECTED]>, Wolfgang Draxinger
<[EMAIL PROTECTED]> wrote:
I just fouind it, I knew there had to be a function to do this.
it is the function mvinch() ;]
>
>
> tom schrieb:
>
>> Hello, I need to test the x,y of a window to find out what character is
>> there for line drawing. What is the best way to do this. Thanks.
>> -Tom
>
> RTFM! see man ncurses. Your problem matches man curs_getyx. At the
> moment I'm programming a classwork for ncurses providing windows,
> buttons and so on.
>
> When this will be complete it's avilable at
> http://wdlinux.virtualave.net
>
> C.U. W.X.D.
>
------------------------------
From: "Norman Black" <[EMAIL PROTECTED]>
Subject: Re: measuring time on LINUX
Date: Wed, 2 Aug 2000 13:24:25 -0700
Reply-To: "Norman Black" <[EMAIL PROTECTED]>
> Actually, gettimeofday() might be implemented using rdtsc now.
It is.
Does anyone know what version of the kernel started using rdtsc in
gettimeofday. 2.?
--
Norman Black
Stony Brook Software
the reply, fubar => ix.netcom
"David Konerding" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]...
> On 1 Aug 2000 15:14:37 GMT, Bernhard Brueck <[EMAIL PROTECTED]> wrote:
> >[EMAIL PROTECTED] wrote:
> >> I need to measure the amount of time some code
> >> path takes and need a way to get the finest time
> >> stamp before and after the code. This is for
> >> LINUX on an intel 386 architecture.
> >
> >gettimeofday should do that.
> >Perhaps you are also interested in gprof. With gprof it's possible to
> >limit the profiling to single function (-f).
>
> Actually, gettimeofday() might not have the resolution required.
> Take a look into the rdtsc instruction (i586 or better?)
>
> The following function, when compiled with optimiztion, will get inlined
into
> your code, giving you a very high resolution timer.
>
> inline unsigned long long TscCounter(void) {
> unsigned long high, low;
> __asm__ __volatile__(".byte 0x0f,0x31" : "=a" (low), "=d" (high));
> return ((unsigned long long) high << 32) + low;
> }
>
> Actually, gettimeofday() might be implemented using rdtsc now.
>
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: read() and directories
Reply-To: [EMAIL PROTECTED]
Date: Wed, 02 Aug 2000 20:19:28 GMT
On Wed, 2 Aug 2000 20:30:49 +0200, Mario Klebsch <[EMAIL PROTECTED]> wrote:
>Fro-Man <[EMAIL PROTECTED]> writes:
>
>>From what I remember this is true and correct behavoir. Directories are
>>kind of special in that if you screw them up, you could lose whole
>>portions of your file structure, so neither read(), nor write() will work
>>on them.
>
>Not allowing write(2) on directories would be sufficient to guarantee
>file system integrety.
Add to that: not allowing hard links.
--
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.
------------------------------
From: jac0b <[EMAIL PROTECTED]>
Subject: Re: Multiple System.map symlinks?
Date: Wed, 02 Aug 2000 16:31:28 -0400
What I have is system.map-x.y.z files under /boot. I guess it doesn't
mater now. As long as I have a System.map under /usr/src/linux and linux
is a symlink to the correct kernel-source I should be fine. I was
thinking too big I think. I was thinking on the lines of three or four
compiled kernels (on same sys.) for reasons I haven't thought of yet. I
guess it doesn't make sense to have more than two kernels (devel and
production).
Thank you for the man page.
Alvin Beach
Paul Kimoto wrote:
>
> In article <[EMAIL PROTECTED]>, jac0b wrote:
> > I'm compiling different versions of the linux kernel. What I would like
> > to do is be able to have multiple Systam.map-x.y.z 's. This way when I
> > boot into a different versions of the kernel it won't complain about the
> > System.map-x.y.z being the wrong version.
>
> "It" is probably klogd(8). Its man page says:
>
> : If a symbol file is not explicitly specified the
> : following filenames will be tried:
> :
> : /boot/System.map
> : /System.map
> : /usr/src/linux/System.map
> :
> : Version information is supplied in the system maps as of
> : kernel 1.3.43. This version information is used to direct
> : an intelligent search of the list of symbol tables. This
> : feature is useful since it provides support for both pro-
> : duction and experimental kernels.
> :
> : For example a production kernel may have its map file
> : stored in /boot/System.map. If an experimental or test
> : kernel is compiled with the sources in the 'standard'
> : location of /usr/src/linux the system map will be found in
> : /usr/src/linux/System.map. When klogd starts under the
> : experimental kernel the map in /boot/System.map will be
> : bypassed in favor of the map in /usr/src/linux/System.map.
>
> Do you want multiple System.maps for _different_ kernel version numbers, or
> for the _same_ kernel version number?
>
> > Here's my system:
> >
> > Distro: RedHat 6.0
> > Booter: Lilo
> >
> > I notice that the map= is a global setting in lilo.conf. I try to
> > specify it in each image subsection, but lilo complains about that.
>
> That is a completely different "map" file. Actually, the kernel takes
> no interest in the System.map file, and so this is rather off-topic for
> c.o.l.d.system.
>
> --
> Paul Kimoto
> Disclaimer: Other than explicit citations of URLs, hyperlinks appearing
> in this article have been inserted without the permission of the author.
------------------------------
From: [EMAIL PROTECTED]
Subject: interruptible_sleep_on isn't working on multi-threaded app.
Date: Wed, 02 Aug 2000 20:41:35 GMT
Hi,
I am stuck with the sleep_on functionality for driver supporting a
multithreaded application.
1. I have a multithreaded application in which one of the thread posts
a blocking ioctl to the driver and waits for its completion.
Now in the driver for the specified ioctl i am calling
interruptible_sleep_on. The function(interruptible_sleep_on)
immediately returns eventhough I have not woken up the wait queue.
2. I tried to replace the interruptible_sleep_on with the sleep for the
feature to work.
But when i call the sleep_on my whole task gets blocked. I want to
block only the thread calling the blocking ioctl.
Please help.
Iam using Redhat 6.1 (kernel 2.2.12)
Regards
Jeseem
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: MJ Dainty <[EMAIL PROTECTED]>
Subject: Re: linux device drivers info
Date: Wed, 2 Aug 2000 21:05:19 GMT
On Wed, 2 Aug 2000, Rafael [iso-8859-1] Garc=EDa wrote:
| There are anything as good as the book 'Linux Device Drivers' by
| Alessandro Rubini in a non printed format?
Depending on how much depth you want to go into, I've dug up the "Linux
Kernel Module Programming Guide", which should be available from most
LDP mirrors. In the concluding section, it has a link to a page that
lists loads of kernel-related HOWTOs, including a set of 5 tutorials
co-written by the aforementioned Alessandro Rubini.
If anyone else can suggest some other on-line docs, I'd also appreciate
a pointer...
Matt
------------------------------
From: alikbm <[EMAIL PROTECTED]>
Subject: the quotation mark "
Date: Thu, 03 Aug 2000 01:34:50 +0300
Reply-To: [EMAIL PROTECTED]
hi i am using mandrake 7.1 and from some reason i can't get gcc or g++
to compile the simplest command : printf("hello world");
the error is : parse error before character 0250
what it might be and how do i cope with it ?
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: read() and directories
Date: 2 Aug 2000 18:54:28 -0400
>From what I remember this is true and correct behavoir. Directories are
>kind of special in that if you screw them up, you could lose whole
>portions of your file structure, so neither read(), nor write() will work
>on them.
Not. Just that layout is fs-dependent and everyone got _very_ seriously
burnt back in '84 when everything and its mom got b0rken by switch to FFS -
programs assumed that they could read() directory and use the result. Major
breakage followed and it took years to fix. Nobody wants that kind of shit
again, especially considering the current average clue and cultural background
of people writing under Linux (too many DOS buffs with no friggin' idea
of portablitiy got injected into the culture).
>I think the best idea would be to hack the source of od. However keep in
NOT. Don't *WHAM* add *WHAM* random features to basic utilities *WHAM*
*WHAM* *WHAM*. Remember "should be doing one thing and doing it well"?
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
From: Yew Fai, Wong <[EMAIL PROTECTED]>
Subject: differences betw coLilo and Lilo
Date: Wed, 02 Aug 2000 23:20:32 GMT
Hi :
Can anyone tell me the differences between coLilo and Lilo?
What is the uCLinux boot process? Same as Lilo boot process?
Thanks.
Regards
Yew Fai
[EMAIL PROTECTED]
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
** 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
******************************