Re: Shift 'em bits

From: Frank Bemelman (f.bemelmanx_at_xs4all.invalid.nl)
Date: 11/19/04


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)


Relevant Pages

  • Re: 32 bit architecture advice (ARM, PPC etc.)
    ... I'd be instantly biased towards ARM for that reason only. ... with hardware and do software mostly but still design hardware). ... Intel support here in Brazil has been damned bad (I started with ... Motorolas iMX based ADS - and their support was quite opposite to ...
    (comp.os.linux.embedded)
  • Re: [PATCH 0/6] MSI portability cleanups
    ... which is using hardware isolation so it is safe to ... The enable/disable ops are optional for that reason. ... However I don't think it will be to hard to support your HV once we get ... other approach would be to remove it, have each backend have it's own ...
    (Linux-Kernel)
  • Re: Linux 2.6.16.30-pre1
    ... I avoided to add support for new hardware. ... The reason is very simple. ... That was a bugfix as the driver could not access that device without ...
    (Linux-Kernel)
  • Re: How to add interrupt support in TESTCAP sample ??
    ... how can you support the interrupt if there is no hardware present? ... that case you can fake it by firing an interrupt once in a while and calling ... synchronization on its own. ...
    (microsoft.public.development.device.drivers)
  • Re: Wireless networking in CentOS 4.4
    ... Is there any reason that you need to use Cent OS 4.4 for this? ... would surely have better support for newer hardware such as you are running. ... Fedora or Ubuntu would probably work even better on your laptop. ...
    (RedHat)