Gordon Henriksen <[EMAIL PROTECTED]> wrote: > On Friday, January 30, 2004, at 11:52 , Leopold Toetsch wrote: >> + /* >> + * if we morph to a string, first clear str_val >> + * so that after changing the vtable a parallel >> + * reader doesn't get a gargabe pointer >> + */
> This is fine on a uniprocessor, but it's not enough on a multiprocessor. > There, you need a sync instruction (on a PPC; equivalent elsewhere). It might be not on enough on architectures that don't manage cache lines validity. PPC's C<sync> seems to be used for managing the coherency of storage shared by the processor and a system component(e.g. I/O device) which doesn't participate in the storage coherency protocol. So, once an architecture defines cache lines in the protocol, the plan would work. Linux rmb() is likely to be a nop on such architecures. 0x4C56