Re: test_and_set_bit() not atomic forever? [cli/sti in char/vt.c [patch]]

Andrea Arcangeli (arcangeli@mbox.queen.it)
Sun, 31 May 1998 02:31:45 +0200 (CEST)


On Sat, 30 May 1998, Philip Blundell wrote:

>>On Fri, 29 May 1998, Pavel Machek wrote:
>>
>>>Don't think so. Well, it is safe on i386, but on other architectures,
>>>test_and_set_bit is not guaranteed to be atomic. [And I'm afraid that
>>
>>Arggh I thought that test_and_set_bit() was atomic on all ports (since I
>>looked only its i386 implementation)!
>
>It should be -- that's what it's for. It's atomic on Alpha, m68k, ARM,
>PPC and MIPS by my reading of the code. I don't really understand Sparc

After reading Pavel sentence I looked the MIPS implementation and it didn'
t seem so atomic for SMP (but I didn' t looked also asm-mips/smp.h...), so
I trusted Pavel...

>Pavel, which port were you thinking of when you said it wasn't atomic?

Probably the HP48GX port ;-).

Andrea[s] Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu