openvortex-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openvortex-dev] the loop problems


From: Shamus
Subject: Re: [Openvortex-dev] the loop problems
Date: Wed, 02 Jul 2003 15:48:25 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>Perhaps we are having serialization issues in the read/write_codec
>functions for the vortex?  I see in a lot of other ALSA drivers and
>kernel drivers that the rmb/wmb/mb() functions are used whenever a
tight
>loop is going to be executed to ensure that everything is flushed out
or
>somesuch beforehand.
>
>It would be used like
>
>wb();
>for (i = 0; i < bignum; i++)
>       if (read_status()&0xff) break;

Ah, the memory barrier routines... That actually might be a good idea,
since they mainly prevent the compiler from optimizing stuff away. It
might even solve the write/read problems where you have to write a
value twice for it to be read back. Seems reasonable enough.

- -- Shamus

-----BEGIN PGP SIGNATURE-----
Version: Encrypted with PGP Plugin for Calypso

iQA/AwUBPwNhNphOW/ztyY5GEQL3QwCg5aHQqunX7a5k9MnDa064yrFVKbsAoI0i
tkVY4eWtRmZdpkXMSfGWVLR3
=tSt4
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]