Linux-Development-Sys Digest #682, Volume #7     Thu, 16 Mar 00 02:13:15 EST

Contents:
  Re: Help: Mapping complex data structs into shared memory. (Maciej Golebiewski)
  Re: beep "color"? (Stefan Taferner)
  Re: Help: Mapping complex data structs into shared memory. (Andrew Gabriel)
  Solaris DDI and Linux ("Michael")
  Re: pci questions (Shailendra Sahay)
  PGCC and nasm (W R Carr)
  Recommended time function for time stamp within a device driver? (Thomas Bond)
  Re: Recommended time function for time stamp within a device driver? (Fabrice Peix)
  Re: Recommended time function for time stamp within a device driver? (Maciej 
Golebiewski)
  Re: help : Service to be started by inetd (Warren Young)
  Re: [Q] LILO question? (John in SD)
  setlocale problem... (Andre Charbonneau)
  Stupid Question ("John")
  Re: Stupid Question (Kaz Kylheku)
  Re: Help with finding the ftp source code (James Gray)
  Question on user space usage of outb... (Spanky)
  Re: PGCC and nasm (Horst von Brand)
  Opening a network interface ([EMAIL PROTECTED])
  Buggy 2000 Setup Solutions/Programming Links ("[EMAIL PROTECTED]")
  GFX Getting Pointer To Screen Mem ("[EMAIL PROTECTED]")

----------------------------------------------------------------------------

From: Maciej Golebiewski <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.programmer
Subject: Re: Help: Mapping complex data structs into shared memory.
Date: Wed, 15 Mar 2000 10:14:13 +0100

Lewis Brown wrote:

> I do believe that may be the problem.  Are you aware of any other way to
> allow complex data structures to persist in memory beyond the life of the
> creating process?

Instead of real pointers, you should store in shmem only offsets from the
beginnig of shmem segment, and then in your reader processes convert it
into real pointers by adding reader's ptr to shmem.

Hope that helps.

Maciej

------------------------------

Subject: Re: beep "color"?
From: Stefan Taferner <[EMAIL PROTECTED]>
Date: 15 Mar 2000 11:26:12 +0100

"AliMac" <[EMAIL PROTECTED]> writes:
> <[EMAIL PROTECTED]> wrote in message news:8ak27h$nho$[EMAIL PROTECTED]...
> >
> > I would like to have a program that can beep with different
> > characteristics, using just the PC Speaker.  Something like
> > beep(100 /*Hz*/, 0.3 /*secs*/)
> > would be great.  Preferably, it would work under X, under the console,
> > and in a program that is a daemon.  In other words, just access to a pc
> > speaker device.  (I am willing to take the security risk of making the
> > audio device [??] world writeable, so that someone could annoyingly beep
> > me for a while.)  Anyone have such a C routine?

This is possible, you know.
X does it somehow; you can specify both with xset.

> i'd like to have a noise shaped delta sigma modulated pc speaker which could
> play samples at higher quality than the pulse width versions available and
> have pultiple additive access. But i'm not about to write it today.

Are you speaking of something like the pc-speaker sound module that
exists for a very long time? It was never included to the official
kernel, however.

-- 
Stefan Taferner

------------------------------

From: [EMAIL PROTECTED] (Andrew Gabriel)
Crossposted-To: comp.lang.c,comp.unix.programmer
Subject: Re: Help: Mapping complex data structs into shared memory.
Date: 15 Mar 2000 10:38:31 GMT

In article <[EMAIL PROTECTED]>,
        Maciej Golebiewski <[EMAIL PROTECTED]> writes:
> Lewis Brown wrote:
> 
>> I do believe that may be the problem.  Are you aware of any other way to
>> allow complex data structures to persist in memory beyond the life of the
>> creating process?
> 
> Instead of real pointers, you should store in shmem only offsets from the
> beginnig of shmem segment, and then in your reader processes convert it
> into real pointers by adding reader's ptr to shmem.

You are absolutely correct that software designed to use SysV IPC shared
memory should generally be designed to allow the shared memory to appear
at different base virtual addresses in different processes.

However, if you already have the software and it wasn't designed that way,
there are some hacks. A couple of different things you can try:

If I understand the original poster's situation of a program which sets
up and loads the shared memory, and another which uses it, you could merge
the two into one program with a command line switch or similar to select
which of the two roles it is to perform. Let the system choose you a
virtual memory address for the setup role, and explicitly ask for the same
address for the user role - hopefully as they are the same program, they
will have the same 'hole' available in their virtual memory maps for the
shared memory, although this is not necessarily the case.

Use trial and error to find a common 'hole' available in the virtual memory
space of the two processes; this is not (quite) as bad as it sounds ;-).
Initially, let one default and use the address it gets in the other program,
e.g. record the address the setup program gets by default and force that in
the user program. If that fails, try the other way round - see what address
the user program gets by default and force that in the setup program.
Record the combination that works and the force this in both programs. If
you change one of the programs it might start failing and you have to
work it out again.

Again, I emphasise these are hacks ;-)

-- 
Andrew Gabriel
Consultant Software Engineer

------------------------------

From: "Michael" <[EMAIL PROTECTED]>
Subject: Solaris DDI and Linux
Date: Wed, 15 Mar 2000 06:37:10 -0000

Hi:

I have an app that was originally written for Solaris.  I would like to port
it ASAP but it uses Solaris functionality called DDI.  Is there a Linux
version?  Other than that, where could I find out more about DDI to either
recreate DDI in Linux or rewrite the offending code.

Thanks in advance.



------------------------------

From: Shailendra Sahay <[EMAIL PROTECTED]>
Subject: Re: pci questions
Date: Wed, 15 Mar 2000 18:45:58 -0500

The sibling in the pci_dev struct points to the next device on the same pci bus
level whereas the next pointer contains the list of the entire pci devices.

Russell Suter wrote:

> Hey,
>
> Is there any documentation on the pci driver in the 2.2.* kernel?  And, I'm
>
> curious what's the difference between the sibling and next in the pci_dev
>
> struct?
>
> TIA
>
> --
> Russ




------------------------------

From: W R Carr <[EMAIL PROTECTED]>
Subject: PGCC and nasm
Date: Wed, 15 Mar 2000 08:12:11 -0600

I've recompiled gcc-2.95.2 with the patches to make it pgcc-2.95.3.
It works just fine EXCEPT, that the GNU assembler (as)  says that
"prefetch" is an invalid instruction for a K6-III.  I guess I need to
change to nasm-0.98, but I'm totally at a loss as to how to get gcc to
use nasm as the assembler instead of as. Do I have to manually change
each make file, or is there a global variable I can export, or
possibly set up in the startup configuration files?  Also, if I read
the nasm web pages correctly, the output format nasm emits is
different from the format gas emits.  Does GNU ld understand nasm's
output?

Ray

------------------------------

From: Thomas Bond <[EMAIL PROTECTED]>
Subject: Recommended time function for time stamp within a device driver?
Date: Wed, 15 Mar 2000 09:29:16 -0500

Hi All,

        Can anyone recommend the most appropriate time function(with
millisecond resolution) that I can
use for a time stamp within a device driver?  Thanks.

------------------------------

From: Fabrice Peix <[EMAIL PROTECTED]>
Subject: Re: Recommended time function for time stamp within a device driver?
Date: Wed, 15 Mar 2000 16:03:56 +0100

Thomas Bond wrote:
> 
> Hi All,
> 
>         Can anyone recommend the most appropriate time function(with
> millisecond resolution) that I can
> use for a time stamp within a device driver?  Thanks.

        Yop,

I think void get_fast_time(struct timeval * t) is what you want.

        Ooops and bye.

------------------------------

From: Maciej Golebiewski <[EMAIL PROTECTED]>
Subject: Re: Recommended time function for time stamp within a device driver?
Date: Wed, 15 Mar 2000 17:12:43 +0100


> I think void get_fast_time(struct timeval * t) is what you want.
> 
>         Ooops and bye.

Or do_gettimeofday (struct timeval *T);

------------------------------

Date: Wed, 15 Mar 2000 10:47:53 -0700
From: Warren Young <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: help : Service to be started by inetd

Boris Pran wrote:
> 
> I have a conceptual question.
> I understand sockets and I know how to handle it, but...
> If am writing a service that will be started as a inetd service I don't have
> to worry about sockets. Right ?
> From my understanding when inetd starts my service it already has a socket
> open.
> So how inetd passes file descriptor to me so I can continue using it.

inetd sets up your stdin and stdout to point to the socket.  Just use
your language's standard I/O library (e.g. printf() and suchlike in C,
cin/cout in C++, etc.), and you'll be speaking to the socket inetd
accepted.  

There's a bonus here: it's easy to test an inetd client program, because
you can just cobble up a file containing good data, and pipe it to the
program to see how it handles it.  Once you've got the program handling
that data, you can plug it into inetd and let it try Real World data.
-- 
= Warren -- See the *ix pages at http://www.cyberport.com/~tangent/ix/
= 
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

------------------------------

From: John in SD <[EMAIL PROTECTED]>
Subject: Re: [Q] LILO question?
Reply-To: [EMAIL PROTECTED]
Date: Wed, 15 Mar 2000 19:43:41 GMT

On Tue, 14 Mar 2000 11:53:11 +0900, "Tae-sung Kim"
<[EMAIL PROTECTED]> wrote:

>Why boot sector loaded at 0x07C00 copy itselt to 0x9A000?
>
>
>0x07C00 is determined by ROM-BIOS&PENTIUM, I guess.
>But, 0x9A000 has any special meaning?

High real mode memory (below 640k).  Just out of the way.
9a000 was chosen when the kernel was small enough to fit below the
640k limit.  It was high enough to be out of the way.

>
>I'm porting linux for MIPS based board which is our proprietary
>architecture without hdd.
>
>RAMDISK will be our sulution for running linux on diskless system.
>
>Anybody have good site for this kind of approche.
>
>I already checked Linux Router Project.
>
>No floopy, no disk makes it hard to proceed.
>
>Thanks


------------------------------

Date: Wed, 15 Mar 2000 14:53:05 -0800
From: Andre Charbonneau <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel
Subject: setlocale problem...

Hi,

Here is my problem:
I have a little application which does the following sequence of
operations:

1. sets the locale to a specific locale, say en_CA
2. changes the locale source file of en_CA and recompiles the binaries
using localedef
3. resets the locale to en_CA

After step 3 (above), the structure returned by localeconv is incorect.
Does anyone knows if the setlocale function actually does some caching
internally, so that if a locale was previously loaded, then it will not
read the binaries from disk twice in the same process?

Thanks,
-- 
Andre Charbonneau
Software Engineer
Corel Corporation
728-0826 x5612

------------------------------

From: "John" <[EMAIL PROTECTED]>
Subject: Stupid Question
Date: Wed, 15 Mar 2000 16:45:35 -0500
Reply-To: "John" <[EMAIL PROTECTED]>

I am unable to find any information on the subject of include files.  How
does g++ know where to look for include files (header files).  In
DOS/Windows, it was specified in the environment variables (INCLUDE), but
there aren't any relevant variables specified in Linux (at least not in
mine).  I can compile, so I know the compiler is looking someplace for the
files, but I don't know why.

Thanks,

John Marasco



------------------------------

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Stupid Question
Reply-To: [EMAIL PROTECTED]
Date: Wed, 15 Mar 2000 22:13:52 GMT

On Wed, 15 Mar 2000 16:45:35 -0500, John <[EMAIL PROTECTED]> wrote:
>I am unable to find any information on the subject of include files.  How
>does g++ know where to look for include files (header files).  In

This information is neatly compiled into the little gcc or g++ ``front end''
programs. 

>DOS/Windows, it was specified in the environment variables (INCLUDE), but

Which is a huge pain in the ass when you have multiple compilers for
multiple targets. With gcc, you just invoke the appropriate executable.

I once tried to maintain a complex Makefile for targetting NT, as well as
several flavors of Windows CE. For the CE's, there are separate compilers, like
clsh.exe, clarm.exe, clmips.exe. Of course, none of these executables know
where their header files are, and they all look to the same stupid INCLUDE
variable.

Not only that, but these compilers don't know any other settings, like
predefined macros and such. 

So I had to dig up all of this information and re-create it in the Makefile
for each target.

------------------------------

From: James Gray <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel,linux.sources.kernel,comp.os.linux.development
Subject: Re: Help with finding the ftp source code
Date: Wed, 15 Mar 2000 14:22:48 -0900

On Wed, 15 Mar 2000, Mark Tranchant wrote:

> Syntax wrote in message ...
> >you will find the source code to ANY kernel at www.kernel.org
> 
> Yes, but the ftp source code is not in it!
> 
> >Xiaofeng Tan <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]...
> >> I am really new to the linux kernel. I just wonder if anyone could tell
> >> me where I can find the ftp source code? Thanks a lot.
> >>
> >> Tom

The kernel source code is at www.kernel.org. The source code to the ftp
net utility might be at http://www.debian.org/Packages/frozen/net/ftp.html

netkit-ftp_0.10.orig.tar.gz

The confusion might be as to the kernel source code or the ftp source
code.

- James -



------------------------------

From: Spanky <spam_me_not@ye_heathens>
Subject: Question on user space usage of outb...
Date: Wed, 15 Mar 2000 15:48:12 -0800

If I have read the source correctly, I'm finding that outb and friends are not
just for writing to a 'port' but rather for writing to any given address in
memory, one byte at a time in outb's case.

Is this true?

The reason I ask is because I am writing code that will access an isa card from
userspace and needs to get at the isa memory hole at 0xd0000 one byte at a time.

Please let me know.

Replies via list or email: address is madmuthuh_at_mad.scientist_dot_com

Email address is obfuscated to avoid those nasty email bots.

Thanks,
  --Robert

------------------------------

From: [EMAIL PROTECTED] (Horst von Brand)
Subject: Re: PGCC and nasm
Date: 16 Mar 2000 04:14:43 GMT

On Wed, 15 Mar 2000 08:12:11 -0600, W R Carr <[EMAIL PROTECTED]> wrote:
>I've recompiled gcc-2.95.2 with the patches to make it pgcc-2.95.3.
>It works just fine EXCEPT, that the GNU assembler (as)  says that
>"prefetch" is an invalid instruction for a K6-III.

What binutils are you using? Maybe 2.9.5.0.x (from
ftp://ftp.varesearch.com/pub/support/hjl/binutils/) knows about this?
-- 
Horst von Brand                             [EMAIL PROTECTED]
Casilla 9G, Vi�a del Mar, Chile                               +56 32 672616

------------------------------

From: [EMAIL PROTECTED]
Subject: Opening a network interface
Date: Thu, 16 Mar 2000 05:47:20 GMT

Hello,

I would like to open ethernet interfaces eth0,eth1...and perform
xmit/recv through it.
Can any one help me how do I open these ?
Since there is no entry in /dev for nwtwork devices, is there any other
way for this ?

Thanks in adavance,
Bhagyashree


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.powerpc,comp.os.linux.development.apps,comp.os.linux.setup
Subject: Buggy 2000 Setup Solutions/Programming Links
Date: Thu, 16 Mar 2000 17:25:55 +1100

Hi, 
 I'm posting this in the hope that the LinuxPPC people or any experienced
LinuxPPC user can resolve these problems or at least give some feedback.
This isn't structured or anything, I'm just typing as I remember the
problems I have. Please correct me on anything that I may have written, I am
only human :) 

 I am running LinuxPPC 2000 on a 9500/200, with 64Mb RAM, and with a 1.7 Gb
partition, 300 Mb swap. Everything is stock, including the ATi gfx card.

- I am wondering if someone can give me some instructions on disabling the
GNOME graphical login, as it is causing strange problems on my machine eg.
flashing between the terminal and X continuously, and I have to reboot,
corrupting my system in the process. At least on the x86 RedHat
distribution, you can select whether you want a graphical login or not.
 I presume this is in some startup script, can someone help?

- On occasions after launching an X program, the buttons do not function
when they are clicked, the hard drive is accessed for a sec like it is
loading, but then it stops.
 This problem is annoying, particularly when it occurs during the
installation eg. the rpm installation is finished and I'm halfway through
the network setup when the buttons stop functioning, forcing me to restart
(with 3 fingers) a semi-configured system.
 At least if the graphical installation is buggy, a choice should be given
to use the RedHat text installer, which leads me to the next problem...

- Why hasn't the RedHat installer been changed in order for it to look for
the 'software' folder containing the rpm's? Attempts to install from CD were
unsuccesful, as the RedHat installer expects a 'RedHat CD', a format which
mine didn't seem to be in.
 Attempts at a network install using ftp were quickly found to be useless,
as the RedHat installer was searching for .img files that didn't exist.
Sadly, the RedHat installer looks like it has been neglected by the people
leading the LinuxPPC project.
 I might add that I didn't try connecting to a website for an installation,
because the whole point of purchasing the CD is for a faster installation
off local files.

- A minor but annoying problem nonetheless is the 'can't seem to find the
live filesystem :(' message. This occurs when I try to install after a
previous working Linux setup or after I reboot from a crashed installer. The
solution to this I found, was to reformat MacOS, install a minimal system
with CD-ROM support, run the mac LinuxPPC installer, then reboot and start
the X installation again.

- Will there ever be a way to let Linux *fully* take over the mac hardware,
without any hfs partitions and MacOS software (BootX extensions and such)?

 Overall, from the little time I have spent using the new distribution, I
have found it to be faster than RedHat 6.1 for PC, but it is certainly more
unstable and buggy. It would be nice if we could have identical installation
as the pc version, although LinuxPPC gives alot more control over network
settings, which is great.
 Having experience in C programming, but not for the Linux OS, I am very
eager to contribute to the LinuxPPC project/RedHat Linux, possibly helping
in the development of the installation apps. I would appreciate it if
someone could point me to some documentation/list/newsgroup, where I could
come in contact with and become part of LinuxPPC development.
Thanks for your time.
Regards, Alex.


------------------------------

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: GFX Getting Pointer To Screen Mem
Date: Thu, 16 Mar 2000 17:41:21 +1100

Hi, could anyone point me to any info/source on getting access to VRAM under
LinuxPPC or RedHat for PC in text mode and under X Window?
I have tried to access the RAM using the vga address (0xB0000000) while I
was in 256 colours, but that wasn't it, because it caused a segmentation
fault.
I have experience in C under MacOS and DOS, but just ANSI-pansy text stuff
under Linux, so snippets of source would be great.
Thanks for any help!
Regards, Alex.


------------------------------


** 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
******************************

Reply via email to