Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cxx-abi-dev] Question about guard variable types


  • To: <mark@xxxxxxxxxxxxxxxx>, <cxx-abi-dev@xxxxxxxxxxxxxxxx>
  • Subject: Re: [cxx-abi-dev] Question about guard variable types
  • From: Martin v. Löwis <martin@xxxxxxxxxxx>
  • Date: Fri, 6 Dec 2002 10:36:01 +0100

> 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.

> In trying to make the ABI platform-independent, I think we should just
> use "long long" on all platforms.  This is not a change on IPF
> platforms, but is sensible on all platforms.  G++ already uses "long
> long" on all platforms.

Why does this matter? It might matter only for mangling the supporting
API, but these are extern "C" functions, so the parameter type is not
mangled.

I think the spec is precise and portable as it stands: it requires 8
bytes, not sizeof(long long) bytes.

Regards,
Martin