<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 28, 2017 at 9:51 PM, Liu Hao via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello libcxx developers:<br>
<br>
I am the maintainer of the mcfgthread library (<a href="https://github.com/lhmouse/mcfgthread" rel="noreferrer" target="_blank">https://github.com/lhmouse/mc<wbr>fgthread</a>). At the moment I provide support for libstdc++ only, but I am also willing to add support for libcxx. Here are a few questions:<br>
<br>
1. The prototype of `__libcpp_recursive_mutex_tryl<wbr>ock()` was changed from RELEASE_400 to trunk. It used to return an `int` but now it returns a `bool` instead. Since the old function returns zero on success while the new function returns non-zero on success, this results in horrible incompatibility. Would you please provide some details about why you changed its return type?<br></blockquote><div><br></div><div>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.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. There is no `__libcpp_recursive_mutex_time<wbr>dlock()`. `std::recursive_mutex` is implemented using a non-recursive mutex plus a condition variable. Are there any reasons why you don't make use of it? I know that Windows SRW lock doesn't support timed locking but `pthread_mutex_timedlock()` is a standard function in POSIX so it should be used in favor of sort of emulation.<br></blockquote><div><br></div><div>I'm not sure why. I'll have to look into it further. I suspect it might be related to the clock used by pthread_mutex_trylock but IDK. I'll look into the suggested implementation further.</div><div>However changing it now would require an ABI break, which is unfortunate but not insurmountable. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. The inline assembler in Clang doesn't support Intel syntax even with `-masm=intel`. Is there a command line option to have Clang pass asm code directly to the assembler that accepts Intel syntax?<br>
<br>
Thanks in advance.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Best regards,<br>
LH_Mouse<br>
<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</font></span></blockquote></div><br></div></div>