[cxx-abi-dev] Question about guard variable types
Jim Dehnert
dehnert at transmeta.com
Fri Dec 6 20:44:01 UTC 2002
Martin v. Löwis wrote:
>>It's a bit odd to require 64-bit types on all platforms; some may not
>>have them.
>
>
> I think this is not really relevant: All the ABI says is that the
> compiler must reserve 8 bytes for the guard variable, initialize one of
> these 8 bytes, and pass a pointer to the guard variable to the
> supporting API - the full value of the guard is never passed around.
>
> The intention is that this is "enough" space to put a mutex state into
> it.
This was certainly the original intent of the specification, and
I think a revision to allow less than 8 bytes would be a mistake.
We specifically wanted to allow a simple mutex implementation
without further indirection.
Jim
More information about the cxx-abi-dev
mailing list