Linux-Development-Sys Digest #624, Volume #6     Wed, 14 Apr 99 09:14:21 EDT

Contents:
  Question : Regarding templates and g++ (Michael Bierenfeld)
  Re: Alpha Driver (Alex Rhomberg)
  Problems with OSS driver (/dev/dsp). (Ríkharður Egilsson)
  Re: Difference between vanilla and ac (Chris J/#6)
  Re: memcpy_tofs(), memcpy_fromfs() (NA)
  Re: Ramdisk (Igor Zlatkovic)
  RedHat Was: Re: Idea: Make a seperate "i686" tree for Redhat Linux 6.0 (Hugo van der 
Merwe)
  Re: asynchronous disk I/O (Bernd Melchers)
  Re: Idea:  Make a seperate "i686" tree for Redhat Linux 6.0 ("M.C. van den 
Bovenkamp")
  Re: dummy variable ??? (Vincent)
  Timer Function in Linux? (Mridula Shrikant Pradhan)
  Re: CD wont't play after 2.0.36->2.2.5 (Magus)
  Re: dummy variable ??? (Josef =?iso-8859-1?Q?M=F6llers?=)
  Re: Linux NFS server, Solaris cient, bad news ... (Oliver Stahlhut)
  Re: a problem with scanf ("G.Pohl")
  Re: Win32 support in Linux (Jim Roberts)

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

From: Michael Bierenfeld <[EMAIL PROTECTED]>
Subject: Question : Regarding templates and g++
Date: Wed, 14 Apr 1999 09:55:43 +0000

Hello,

I am having a problem linking c++ Sources containig templates. The
compile-run is fine put the linker allways claims that :

arraytest.o(.text+0x1d): undefined reference to
`mbArray<Stamp>::mbArray(int)'
.... and so on. This is for all Class Members.

The Manual Page talks about "-fexternal-templates" and some #pragmas.
Does anbody knows waht to do ?

Kind regards

Michael

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

Date: Wed, 14 Apr 1999 10:50:53 +0200
From: Alex Rhomberg <[EMAIL PROTECTED]>
Subject: Re: Alpha Driver

Sam Fineberg wrote:
> 
> I am attempting to build a driver for an alpha/linux 2.2.3 system.  When I
> compile any file that either directly or indirectly includes
> /usr/include/asm/current.h I get the following compiler error:
> 
> /usr/include/asm/current.h:4: global register variable follows a function
> defini
> tion
> cc1: warnings being treated as errors
> /usr/include/asm/current.h:4: warning: call-clobbered register used for
> global r
> egister variable
> 
> What am I doing wrong?

Notice that the kernel code is always compiled with the -ffixed-8 flag
omitting this flag gives your warning. Had to fix the myrinet module
makefile to make it work under 2.2

- Alex

-- 
  _________________________________________________________________
 /                                                                 \
|  Alex Rhomberg                           Tel: +41 1 632 49 18     |
|  Institut fuer Elektronik                Fax: +41 1 632 12 10     |
|  ETH Zuerich                        Zentrale: +41 1 632 11 11     |
|  Gloriastrasse 35                                                 |
|  8092 Zuerich               email: [EMAIL PROTECTED]        |
 \_________________________________________________________________/

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

From: [EMAIL PROTECTED]éencroute.fr (Ríkharður Egilsson)
Subject: Problems with OSS driver (/dev/dsp).
Date: 12 Apr 1999 12:55:56 GMT
Reply-To: =?iso-8859-1?Q?[EMAIL PROTECTED]=E9-en-croute.fr?=



Problems with OSS driver (/dev/dsp).
====================================

I am having problems with /dev/dsp programming under Linux.

I'm experimenting with Gtk/sound/threads and I am having pretty bad
problems.
I have no problems with simple things like (1) opening the device, 
(2) record or play and (3) closing the device.
Those simple things work just fine.

But if I try to do anything more complex, it doesn't work.

I'm using plain RedHat 5.2 (kernel 2.0.36).


-- First problem --
I am recording an sample at 8000Hz, 8 bits, it doesn't matter if I
record in stereo or not, I get a 7-8 seconds delay after doing
ioctl(fd_dsp, SNDCTL_DSP_RESET, 0).
That is, recording stops immediately but the read(2) does not
return '-1' until 7-8 seconds after the ioctl.

The kernel logs (immediately after the ioctl):
kernel: Sound: DMA (input) timed out - IRQ/DRQ config error?

The ioctl(2) and read(2) are done in seperate threads on the same fd.
The ioctl reports no error (0 returned).


-- Second Problem --
Switching between record/play doesn't work well. 
Using the simple parrot.c (no threads, no Gtk) from the package at
http://www.oreilly.com/catalog/multilinux/ {select 'examples'}
The first record/play is OK, but each record after that has an ~6 seconds
delay in front of it. That is, the driver does not start recording until
~6 seconds after the read(2) call.
 
The program does not close the driver in between read/writes just
calles "ioctl(fd, SOUND_PCM_SYNC, 0);" after each playback.

If anybody can get parrot.c to work I would be interested in knowing
how it was done.




-- 
 RIKHARDUR EGILSSON -  Ingénieur Système
 echo '[q]sa[ln0=aln80%Pln80/snlbx]16isb15CB32EF3AF9C0E5D7272C3AF4F2snlbxq'|dc

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

From: [EMAIL PROTECTED] (Chris J/#6)
Subject: Re: Difference between vanilla and ac
Date: 13 Apr 1999 22:45:21 +0100
Reply-To: [EMAIL PROTECTED]

I've never tried an Alan Cox flavoured ice cream, so couldn't tell you :)

Chris...
[apologies...couldn't resist]

In article <[EMAIL PROTECTED]>, Dieter Kraft  <[EMAIL PROTECTED]> wrote:
>Hi,
>can the difference in vanilla and ac (Alan Cox, I suppose)
>be explained in short?
>Thanks
>Dieter
>
>--

-- 
@}-,'--------------------------------------------------  Chris Johnson --,-{@
    \ Life is a strange thing. Just when you think  \                     \
     \ you've learned how to use it, it's gone       \ [EMAIL PROTECTED]  \
      \                         -- Shakespears Sister \                     \

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

From: [EMAIL PROTECTED] (NA)
Subject: Re: memcpy_tofs(), memcpy_fromfs()
Date: Tue, 13 Apr 1999 22:30:11 -0400

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
THIS.BIT says...
> memcpy_tofs() and memcpy_fromfs() come up as implicit declarations
> on a kernel 2.2.5 computer.  What should they be replaced by?  What
> kernel version had the change?
> 
> 

Did you remember to: #include <asm/segment.h> ?

Implicit declarations are usually a good hint
that prototype is missing.

Hope this helps

Andy Thomson
[EMAIL PROTECTED]

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

From: Igor Zlatkovic <[EMAIL PROTECTED]>
Subject: Re: Ramdisk
Date: Wed, 14 Apr 1999 07:58:07 +0000

Hey Jeremiah.

Pretty sneaky, heh? you wanna bootdisk without ramdisk? ok, no prob. Tell me
what you got there and what are you trying to do. Also tell me where should the
root filesystem be if not on ramdisk.

Igor


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

Date: Tue, 13 Apr 1999 20:52:53 +0000
From: Hugo van der Merwe <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.misc,linux.redhat.misc,alt.os.linux,comp.os.linux.hardware
Subject: RedHat Was: Re: Idea: Make a seperate "i686" tree for Redhat Linux 6.0

> > If you were to say "redHat sucks", you'd say "redHat sucks", though.
> > Cheese,
> > Andrew
> 
> And if I wanted to say "you're a funny lad with cheese in
> your nose" I'd say "you're a funny lad with cheese in your
> nose."  Your point?

If RedHat was considered plural, one should say "RedHat suck". I'm not
saying I agree with that (After all, I'm currently using RH5.1. OK, I'm
trying out debian, which seems to suit my personal taste more than RH,
but that doesn't mean Deb is better than RH.)

Newbies: RedHat is quite nice, I wouldn't advise inexperienced users to
install Debian.

Lets not imply some distribution "sucks", even if meant in jest.
Newbie's can easily be mislead. (Speaking from experience ;)

Hugo van der Merwe

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

From: [EMAIL PROTECTED] (Bernd Melchers)
Subject: Re: asynchronous disk I/O
Date: 14 Apr 1999 11:05:04 GMT

Karl Heyes <[EMAIL PROTECTED]> writes:


>
>[EMAIL PROTECTED] wrote:
>
>> Hi there,
>>
>> Can anyone confirm that Linux does not support asynchronous disk I/O? On AIX
>> and Digital Unix we have system calls like lio_listio(), but I cannot find
>> anything similar to that.
>>
>
>I believe the true names are something like aio_* which are in the glibc2.1.
>not sure
>if it's posix or unix98 standard.
>
>karl
>

this is IRIX-6.5, just for informational purposes:

% apropos aio_
aio_cancel, aio_cancel64 (3) - cancel an asynchronous I/O request
aio_error, aio_error64 (3) - return error status of an asynchronous I/O operation
aio_fsync, aio_fsync64 (3) - asynchronously synchronize a file's in-memory state with 
that on the physical medium
aio_hold, aio_hold64 (3) - Defer or resume reception of asynchronous I/O callbacks
aio_init (3)            - asynchronous I/O initialization
aio_read, aio_read64 (3) - asynchronous I/O read
aio_return, aio_return64 (3) - return error status of an asynchronous I/O operation
aio_sgi_init, aio_sgi_init64 (3) - asynchronous I/O initialization
aio_suspend, aio_suspend64 (3) - wait for an asynchronous I/O request
aio_write, aio_write64 (3) - asynchronous I/O write

% man aio_write
AIO_WRITE(3)                AIO_WRITE(3)



NAME
     aio_write, aio_write64 - asynchronous I/O write

C SYNOPSIS
     #include <aio.h>

     int aio_write(aiocb_t *aiocbp);

     int aio_write64(aiocb64_t *aiocbp);

DESCRIPTION
     The aio_write() function allows the calling process to write aiocbp-
     >aio_nbytes from the file associated with aiocbp->aio_fildes into the
     buffer pointed to by aiocbp->aio_buf (see write(2)).  The function call
     returns when the write request has been initiated or, at a minimum,
     queued for the file or device.
     The aiocb->aio_sigevent defines how the calling process will be notified
     upon I/O completion.

     If sigev_notify is SIGEV_NONE, then no notification will be posted to the
     calling application.

     If sigev_notify is SIGEV_SIGNAL, then the signal specified in sigev_signo
     will be sent to the calling process. If SA_SIGINFO is set for the signal
     (see sigaction(2)) and the signal is in the range of SIGRTMIN and
     SIGRTMAX then the signal will be queued to the process and the value in
     sigev_value will be the si_value in the generated signal.

     If sigev_notify is SIGEV_CALLBACK then the function sigev_func will be
     called with sigev_value as the argument. Only one callback will be called
     at a time, however programs should be careful to note that a callback may
     be run in parallel with the calling process.

     If sigev_notify is SIGEV_THREAD then the function sigev_notify_function
     will be called by a new thread (see pthreads(5)) with sigev_value as the
     argument.  This thread is created when the event arrives with the
     attributes specified in sigev_notify_attributes except that it is
     automatically detached.  The calling process should ensure there are
     sufficient resources to create the thread.

     All aio_write() calls must supply a complete aiocb->aio_sigevent
     structure.

     The aiocbp->aio_lio_opcode field is ignored by aio_write().

     Prioritized I/O is not currently supported among asynchronous file
     operations.  aiocbp->aio_reqprio must be set to 0, otherwise the call
     will fail.
     The I/O requests submitted in an unspecified order unless the file was
     opened with the O_APPEND in which case the write operations will happen
     in the order that they were submitted.

     After a call to aio_write the aiocbp may be used as an argument to
     aio_error() and aio_return() in order to determine the error status and
     return status, respectively, of the asynchronous operation while it is
     proceeding. If an error condition is encountered during queueing, the
     function call returns without having initiated or queued the request.
     After a successful call to enqueue an asynchronous I/O operation, the
     value of the file offset for the file is undefined.

     If the buffer pointed to by aiocbp->aio_buf or the control block pointed
     to by aiocbp changes or becomes an illegal address prior to asynchronous
     I/O completion then the behavior is undefined.  Simultaneous asynchronous
     operations using the same aiocbp produce undefined results.

     For any system action that changes the process memory space while an
     asynchronous I/O is outstanding to the address range being changed, the
     result of that asynchronous I/O is undefined.

     The aio_write64() function is identical to aio_write() except that it
     takes an aiocb64_t * (see <aio.h>).  This structure allows for the
     specification of a file offset greater than 2 Gigabytes.


SEE ALSO
     aio_read(3), lio_listio(3), aio_error(3), aio_return(3), aio_hold(3),
     aio_cancel(3), aio_sgi_init(3), aio_fsync(3), write(2), lseek(2),
     close(2), _exit(2), exec(2), fork(2), pthreads(5), sysconf(3C).

DIAGNOSTICS
     The aio_write() returns the value 0 to the calling process if the I/O
     operation is successfully queued; otherwise, the function shall return
     the value -1 and shall set errno to indicate the error.

     [EAGAIN]     The requested asynchronous I/O operation was not queued
        due to system resource limitations. Often this is due to
        exceeding the maximum number of asynchronous I/O
        operations for the system. The maximum can be checked with
        a call to sysconf() with an argument of _SC_AIO_MAX.
     Each of the following conditions may be detected synchronously at the
     time of the call to aio_write() , or asynchronously. If any of the
     conditions below are detected synchronously at the time of the call, the
     aio_write() function shall return -1 and set errno to the corresponding
     value. If any of the conditions below are detected asynchronously, the
     return status of the asynchronous operation shall be set to -1 and the
     error status of the asynchronous operation shall be set to the
     corresponding value.
     [EBADF]      The aiocbp->aio_fildes argument is not a valid file
        descriptor open for writing.

     [EINVAL]     The file offset value implied by aiocbp->aio_offset would
        be invalid, aiocbp->aio_reqprio is not a valid value, or
        aiocbp->aio_nbytes is an invalid value.

     In the case that the aio_write() successfully queues the I/O operation,
     the return status of the asynchronous operation shall be one of the
     values normally returned by the write(2) function call. If the operation
     is successfully queued, but is subsequently canceled or encounters an
     error, the error status for the asynchronous operation shall contain one
     of the values normally set by the write(2) function call, or one of the
     following:

     [EBADF]      The aiocbp->aio_fildes argument is not a valid file
        descriptor open for writing.

     [EINVAL]     The file offset value implied by aiocbp->aio_offset would
        be invalid.
     [ECANCELED]    The requested I/O was canceled before the I/O completed
        due to an explicit aio_cancel(3) request.


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

From: "M.C. van den Bovenkamp" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.misc,linux.redhat.misc,alt.linux,alt.os.linux,comp.os.linux.hardware
Subject: Re: Idea:  Make a seperate "i686" tree for Redhat Linux 6.0
Date: Wed, 14 Apr 1999 09:05:49 +0200

Andrew Comech wrote:

> >not if you're from a commonwealth country - which includes new zealand
> >(where is the old zealand btw?).  in *english* (as opposed to american

Here in the Netherlands; the province of Zeeland ('Sea-land',
literally). A Dutch fellow whose name escapes me right now discovered
what was to become New Zealand and called it Nieuw Zeeland.

                Regards,

-- 
                        Marco van den Bovenkamp.

        CIO EMEA Network Design Engineer,

        Lucent Technologies Nederland.
        Room: HVS BZK 32
        Tel.: (+31-35-687)2724
        Mail: [EMAIL PROTECTED]

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

From: Vincent <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux,alt.linux,comp.os.linux.x,comp.os.linux.development.apps,comp.os.linux.development,comp.os.linux.hardware
Subject: Re: dummy variable ???
Date: Tue, 13 Apr 1999 16:18:24 +0200

I'm developping a device driver for a PCI card and in some sample source
I seen a dummy variable.
What does dummy variable means ???
His declaration is:   volatile unsigned char dummy;

What is his job ?

[EMAIL PROTECTED]



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

From: [EMAIL PROTECTED] (Mridula Shrikant Pradhan)
Subject: Timer Function in Linux?
Date: 14 Apr 1999 03:08:30 GMT

Dear All,

I would like to know  whether in Linux the timer function is available in
microseconds.
Thanks in advance,
Mridula
--
******************************************************************************
                                MRIDULA PRADHAN

Research Scholar                                Room C, 27 College Green
Electrical Engineering Dept                     Dunearn Road
WS2 03-20                                       Singapore 299686
National University of Singapore                Phone: 2568660
10, Kent Ridge Crescent                         
Singapore 119260
Phone: 8745164
Emails: [EMAIL PROTECTED]
        [EMAIL PROTECTED]
******************************************************************************

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

Crossposted-To: comp.os.linux.setup
From: [EMAIL PROTECTED] (Magus)
Subject: Re: CD wont't play after 2.0.36->2.2.5
Date: Wed, 14 Apr 1999 12:03:44 GMT

In article <[EMAIL PROTECTED]>,
Robert Schiele  <[EMAIL PROTECTED]> wrote:
>Michael Spalinski wrote:
>> 
>> After upgrading the kernel as in the subject, I can no longer play a CD
>> through the sound card (everything worked OK with 2.0.36). This happens on

>Seems that your CDIN volume is set to zero. Try to increase CDIN volume
>with a utility (e.g. xmix).

Another possibility is that the new kernel is looking at the wrong IRQ
and/or memory range for the sound card.

Double check the cards settings for IRQ, DMA, and memory ranges required
and make sure the sound modules are using those values.  You can either
recompile the kernel with the correct values or reload the sound modules
(assuming they were compiled as such) with the correct parameters.
        Cheers
                Magus

-- 
John Schmid             Internet: [EMAIL PROTECTED]    Finger for PGP key

"Truth is what remains when all illusions have been stripped away."
     Suenteus Po

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

From: Josef =?iso-8859-1?Q?M=F6llers?= <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux,alt.linux,comp.os.linux.x,comp.os.linux.development.apps,comp.os.linux.development,comp.os.linux.hardware
Subject: Re: dummy variable ???
Date: Wed, 14 Apr 1999 13:53:56 +0200

Vincent wrote:
> =

> I'm developping a device driver for a PCI card and in some sample sourc=
e
> I seen a dummy variable.
> What does dummy variable means ???
> His declaration is:   volatile unsigned char dummy;
> =

> What is his job ?

"dummy" variables are often used as a "bit bucket", i.e. they are used
when an assignment is necessary but the actual value assigned is of no
interest.
Sometimes, all you have to do to clear an error condition is to read a
certain device register. Then the register is read and the value read is
assigned to a "dummy variable" which is never referenced for this value.
Since some compilers detect assignments to variables that are not
referenced and optimize out these assignments, the "dummy variable" has
to be declared "volatile" to prevent any such optimization.

Hope this helps,

Josef
-- =

PS Die hier dargestellte Meinung ist die persoenliche Meinung des
Autors!
PS This article reflects the autor=B4s personal views only!

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

From: Oliver Stahlhut <[EMAIL PROTECTED]>
Crossposted-To: matrix.lists.linux.kernel
Subject: Re: Linux NFS server, Solaris cient, bad news ...
Date: Wed, 14 Apr 1999 13:11:58 +0200

Leslie Mikesell wrote:
> 
> In article <[EMAIL PROTECTED]>,
> mlw  <[EMAIL PROTECTED]> wrote:
> 
> >Wouldn't patches for nfsd in the 2.2.3 kernel be in the 2.2.5 kernel?
> 
> Not the ones needed to interoperate with non-linux clients.  If you
> unpack the knfsd tar file from
>  ftp://ftp.varesearch.com/pub/support/hjl/knfsd/.
> there are kernel patches for 2.2.5 as well as the current versions
> of the knfsd utility programs.
> 
> I'm surprised at how little I've heard about this problem.  Are there
> not many people using Linux as a server in mixed environments?
> 
>   Les Mikesell
>    [EMAIL PROTECTED]

Hi!

I think you are right: not too many people dare to set up a linux server
for SUN's, SGI's, etc. I did. Wasn't a good idea up till now, I think.
:)
        
        Oliver

-- 
/*
      Oliver Stahlhut - Universitaet Hannover
                        Institut für Theoretische Nachrichtentechnik
                        und Informationsverarbeitung (TNT)

      mailto:[EMAIL PROTECTED]
      http://www.tnt.uni-hannover.de/~stahlhut/
*/

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

From: "G.Pohl" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c
Subject: Re: a problem with scanf
Date: Wed, 14 Apr 1999 14:22:18 +0200


Jack Klein schrieb in Nachricht
<[EMAIL PROTECTED]>...
>On Mon, 12 Apr 1999 21:30:40 +0200, Francesc Oller
><[EMAIL PROTECTED]> wrote in comp.lang.c:
>
>A bigger issue is that there are no functions named setvbuf(),
>tty_raw() or tty_reset() in the C language.  Please keep your Linux
>specific questions in the Linux groups and out of comp.lang.c.



Hey Jack!

Did you ever hear about such nasty things like libraries or or standard
libraries so ? -- But you are right, C constists of some hands of full of
keywords and operators. Everything out of this cannot be C

Fine, isn't it??  :-(






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

From: [EMAIL PROTECTED] (Jim Roberts)
Subject: Re: Win32 support in Linux
Date: Wed, 14 Apr 1999 04:49:30 GMT

SNIP

> 
> Well of cource not. I am not that uneducated. I just did not see
> support for it in the kernel config, that's all. Also, now I can't get
> fdisk running under windows or dos mode ( went ahead and did the fat32
> conversion, but it didn't work even before that...), and Win98
> detected that it was not the booting partition, and changed that. Now
> I can't boot from lilo, so I have to go in and find my linux rescue
> disks from among all my stuff. So, what fs specifyer do I use for
> 'mount'? 'fat32'? I would guess so, but if anyone knows the specifics,
> let me know.

Try the man page for "mount". First it would answer your question and
second you would find that Linux mounts approx 22 different file systems

-- 
Jim Roberts         Never enough time!
[EMAIL PROTECTED]

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


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