[cfe-dev] [libcxx] A few questions about external threading support
Eric Fiselier via cfe-dev
cfe-dev at lists.llvm.org
Wed Mar 29 21:45:03 PDT 2017
On Wed, Mar 29, 2017 at 10:32 PM, Liu Hao <lh_mouse at 126.com> wrote:
> On 2017/3/30 3:38, Eric Fiselier wrote:
>
>> All callers of `__libcpp_foo_trylock()` functions return bool so it made
>> more sense to convert the return value to bool once inside the
>> `__threading_support` interface rather than at each callsite. I'm not
>> sure what incompatibility this causes since the callers should have been
>> updated too.
>>
> Thanks for your reply.
>
> At the moment I have no idea how many external threading implementations
> there are, but they will ultimately be broken once the trunk version is
> released.
There is one version that I know of, but the expectation of external
threading implementations is that they track trunk very closely. There is
absolutely no guarantee of API compatibility in the external threading
interface. It's not meant to be a stable interface.
>
>
> However changing it now would require an ABI break, which is unfortunate
>> but not insurmountable.
>>
> Err, true, but the trylock thing is already a break isn'it?
Good point. Changing the try_lock() definition to use that may not be ABI
breaking, but it may be a backwards incompatible change if other methods
depend on certain invariants that try_lock() no longer maintains.
I would rather apply your suggested fix and remove the condition variable
entirely so that we get the reduced class size as well. We have mechanisms
for staging/guarding ABI breaking changes, so we might as well use them.
>
> --
> Best regards,
> LH_Mouse
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170329/08e6958c/attachment.html>
More information about the cfe-dev
mailing list