NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/38482: C compiler can generate non-restartable code within a RAS
The following reply was made to PR lib/38482; it has been noted by GNATS.
From: Andrew Doran <ad%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: lib/38482: C compiler can generate non-restartable code within a
RAS
Date: Tue, 22 Apr 2008 12:08:15 +0100
On Mon, Apr 21, 2008 at 09:00:01PM +0000, scw%netbsd.org@localhost wrote:
> Rather than fighting the compiler, I propose we implement _atomic_cas_up()
> in asm code for each affected arch. I can do ARM and m68000.
Yes please. I can do mips and perhaps alpha. IIRC the assembler should
recognise the .hidden keyword so none of the symbols in the atomic CAS
file need to be visible outside libc.
> In addition, the rasctl(2) manual page should be updated to strongly
> recommend that RASs are implemented in asm code only. Perhaps we should go
> so far as removing the RAS_START/RAS_END macros from the API, though that
> may preclude using in-line asm...
I also agree with this. C is too hit-and-miss..
> An audit of the tree for similar code sequences would also be a good idea.
> For example: pthread_lock.c.
I think we may already have assembly sequences in libpthread for some
architectures.
Thanks,
Andrew
Home |
Main Index |
Thread Index |
Old Index