DB_THREAD support in Berkeley DB/glibc

BenH bh40 at calva.net
Wed Dec 29 08:22:29 EST 1999


On Tue, Dec 28, 1999, David Edelsohn <dje at watson.ibm.com> wrote:

>	The TSL_SET macro is basically correct for PowerPC uniprocessor,
>but it is not MP safe.  For cases where this needs to be safe across a
>multiprocessor complex, it should be preceded by a "sync" instruction and
>ended with an "isync" instruction, or something similar depending on the
>semantics one uses for accessing the word.

Also, according to some Moto writing I read some time ago, the
reservation should be cleared in both the good case and the fail case.
Basically, once the lwarx was done, the stwcx. should be done even if
results don't match. The suggested implementation, if I recall correctly,
is to first do a normal load and compare, and if it matches, then enter
the lwarx/stwcx. pair.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list