Re: Shift 'em bits
From: Frank Bemelman (f.bemelmanx_at_xs4all.invalid.nl)
Date: 11/19/04
- Next message: Paul Carpenter: "Re: OV7620 image sensor interface with FPGA headache"
- Previous message: David: "Re: Code reviews?"
- In reply to: Spehro Pefhany: "Re: Shift 'em bits"
- Next in thread: 42Bastian Schick: "Re: Shift 'em bits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 19 Nov 2004 23:58:21 +0100
"Spehro Pefhany" <speffSNIP@interlogDOTyou.knowwhat> schreef in bericht
news:m6psp0lcrbs4jpk7eg5d577t42d73e022o@4ax.com...
> On Fri, 19 Nov 2004 11:20:46 +0100, the renowned "WaldemarIII"
> <bleek004@hotmail.com> wrote:
>
> >Hi
> >
> >Is there an atomic way to shift 64 bits either left or right?
>
> Assuming the hardware doesn't support it directly,
>
> atomic?
>
> <turn off interrupts>
> <some C, assembly or other stuff>
> <restore original interrupt setting>
If, for some reason the interrupt are not allowed to be
turned off, one could (perhaps) use another atomic operation
to protect the results being processed.
For instance, if the interrupt supplies the 64 value
that needs to be shifted, it can place these in a
buffer.
The main loop increments an index (atomic) and starts
working on the previously stored value.
But this is all guess work.
-- Thanks, Frank. (remove 'x' and 'invalid' when replying by email)
- Next message: Paul Carpenter: "Re: OV7620 image sensor interface with FPGA headache"
- Previous message: David: "Re: Code reviews?"
- In reply to: Spehro Pefhany: "Re: Shift 'em bits"
- Next in thread: 42Bastian Schick: "Re: Shift 'em bits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|