<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc++] Refactor the configuration macros to being always defined (#112094)</title>
<updated>2024-11-06T09:39:19+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-11-06T09:39:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c6f3b7bcd0596d30f8dabecdfb9e44f9a07b6e4c'/>
<id>c6f3b7bcd0596d30f8dabecdfb9e44f9a07b6e4c</id>
<content type='text'>
This is a follow-up to #89178. This updates the `&lt;__config_site&gt;`
macros.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow-up to #89178. This updates the `&lt;__config_site&gt;`
macros.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Split the monolithic __threading_support header (#79654)</title>
<updated>2024-01-30T13:35:15+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2024-01-30T13:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7162fd750ee5f786f3b9b7a7b26b72ee36ce772e'/>
<id>7162fd750ee5f786f3b9b7a7b26b72ee36ce772e</id>
<content type='text'>
The &lt;__threading_support&gt; header is a huge beast and it's really
difficult to navigate. I find myself struggling to find what I want
every time I have to open it, and I've been considering splitting it up
for years for that reason.

This patch aims not to contain any functional change. The various
implementations of the threading base are simply moved to separate
headers and then the individual headers are simplified in mechanical
ways. For example, we used to have redundant declarations of all the
functions at the top of `__threading_support`, and those are removed
since they are not needed anymore. The various #ifdefs are also
simplified and removed when they become unnecessary.

Finally, this patch adds documentation for the API we expect from any
threading implementation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The &lt;__threading_support&gt; header is a huge beast and it's really
difficult to navigate. I find myself struggling to find what I want
every time I have to open it, and I've been considering splitting it up
for years for that reason.

This patch aims not to contain any functional change. The various
implementations of the threading base are simply moved to separate
headers and then the individual headers are simplified in mechanical
ways. For example, we used to have redundant declarations of all the
functions at the top of `__threading_support`, and those are removed
since they are not needed anymore. The various #ifdefs are also
simplified and removed when they become unnecessary.

Finally, this patch adds documentation for the API we expect from any
threading implementation.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Remove internal "build-with-external-thread-library" configuration</title>
<updated>2023-07-17T13:32:36+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2023-07-04T22:44:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8ac71b026ee64736a222d4c81a3f038a5fc9c608'/>
<id>8ac71b026ee64736a222d4c81a3f038a5fc9c608</id>
<content type='text'>
Our threading support layer is currently a huge mess. There are too many
configurations with too many confusing names, and none of them are tested
in the usual CI. Here's a list of names related to these configurations:

  LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY
  _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL

  LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY
  _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL

  LIBCXX_HAS_EXTERNAL_THREAD_API
  _LIBCPP_HAS_THREAD_API_EXTERNAL

This patch cleans this up by removing the ability to build libc++ with
an "external" threading library for testing purposes, removing 4 out of
6 "names" above. That setting was meant to be used by libc++ developers,
but we don't use it in-tree and it's not part of our CI.

I know the ability to use an external threading API is used by some folks
out-of-tree, and this patch doesn't change that. This only changes the
way they will have to test their external threading support. After this
patch, the intent would be for them to set `-DLIBCXX_HAS_EXTERNAL_THREAD_API=ON`
when building the library, and to provide their usual `&lt;__external_threading&gt;`
header when they are testing the library. This can be done easily now
that we support custom lit configuration files in test suites.

The motivation for this patch is that our threading support layer is
basically unmaintainable -- anything beyond adding a new "backend" in
the slot designed for it requires incredible attention. The complexity
added by this setting just doesn't pull its weigh considering the
available alternatives.

Concretely, this will also allow future patches to clean up
`&lt;__threading_support&gt;` significantly.

Differential Revision: https://reviews.llvm.org/D154466
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our threading support layer is currently a huge mess. There are too many
configurations with too many confusing names, and none of them are tested
in the usual CI. Here's a list of names related to these configurations:

  LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY
  _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL

  LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY
  _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL

  LIBCXX_HAS_EXTERNAL_THREAD_API
  _LIBCPP_HAS_THREAD_API_EXTERNAL

This patch cleans this up by removing the ability to build libc++ with
an "external" threading library for testing purposes, removing 4 out of
6 "names" above. That setting was meant to be used by libc++ developers,
but we don't use it in-tree and it's not part of our CI.

I know the ability to use an external threading API is used by some folks
out-of-tree, and this patch doesn't change that. This only changes the
way they will have to test their external threading support. After this
patch, the intent would be for them to set `-DLIBCXX_HAS_EXTERNAL_THREAD_API=ON`
when building the library, and to provide their usual `&lt;__external_threading&gt;`
header when they are testing the library. This can be done easily now
that we support custom lit configuration files in test suites.

The motivation for this patch is that our threading support layer is
basically unmaintainable -- anything beyond adding a new "backend" in
the slot designed for it requires incredible attention. The complexity
added by this setting just doesn't pull its weigh considering the
available alternatives.

Concretely, this will also allow future patches to clean up
`&lt;__threading_support&gt;` significantly.

Differential Revision: https://reviews.llvm.org/D154466
</pre>
</div>
</content>
</entry>
<entry>
<title>[cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32 threads</title>
<updated>2018-01-05T20:48:29+00:00</updated>
<author>
<name>Martin Storsjo</name>
<email>martin@martin.st</email>
</author>
<published>2018-01-05T20:48:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bf02a09103347f7b56309864aaf5a5c294b1af9f'/>
<id>bf02a09103347f7b56309864aaf5a5c294b1af9f</id>
<content type='text'>
This allows keeping libcxx using win32 threads even if a
version of pthread.h is installed.

This matches the existing cmake option LIBCXX_HAS_PTHREAD_API.

Also add missing documentation about the internal define
_LIBCPP_HAS_THREAD_API_WIN32.

Differential Revision: https://reviews.llvm.org/D41764

llvm-svn: 321896
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows keeping libcxx using win32 threads even if a
version of pthread.h is installed.

This matches the existing cmake option LIBCXX_HAS_PTHREAD_API.

Also add missing documentation about the internal define
_LIBCPP_HAS_THREAD_API_WIN32.

Differential Revision: https://reviews.llvm.org/D41764

llvm-svn: 321896
</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxx] Improve design documentation for the external-thread-library</title>
<updated>2017-01-16T12:44:08+00:00</updated>
<author>
<name>Asiri Rathnayake</name>
<email>asiri.rathnayake@arm.com</email>
</author>
<published>2017-01-16T12:44:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e3d832a3e83f65bebaff6d894e75ebb3eee1c0d7'/>
<id>e3d832a3e83f65bebaff6d894e75ebb3eee1c0d7</id>
<content type='text'>
  configuration

NFC.

Differential revision: https://reviews.llvm.org/D28610

Reviewers: EricWF
llvm-svn: 292108
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  configuration

NFC.

Differential revision: https://reviews.llvm.org/D28610

Reviewers: EricWF
llvm-svn: 292108
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Cleanup and document &lt;__threading_support&gt;</title>
<updated>2017-01-06T20:05:40+00:00</updated>
<author>
<name>Eric Fiselier</name>
<email>eric@efcs.ca</email>
</author>
<published>2017-01-06T20:05:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=00f6beaed46e86463fb88319845947c45e1dfac3'/>
<id>00f6beaed46e86463fb88319845947c45e1dfac3</id>
<content type='text'>
Summary:
This patch attempts to clean up the macro configuration mess in `&lt;__threading_support&gt;`, specifically the mess involving external threading variants. Additionally this patch adds design documentation for `&lt;__threading_support&gt;` and the configuration macros it uses.

The primary change in this patch is separating the idea of an "external API" provided by `&lt;__external_threading&gt;` and the idea of having an external threading library. Now `_LIBCPP_HAS_THREAD_API_EXTERNAL` means that libc++ should use `&lt;__external_threading&gt;` and that the header is expected to exist.  Additionally the new macro `_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL` is now used to configure for using an "external library"  with the default threading API.

Reviewers: compnerd, rmaprath

Subscribers: smeenai, cfe-commits, mgorny

Differential Revision: https://reviews.llvm.org/D28316

llvm-svn: 291275
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This patch attempts to clean up the macro configuration mess in `&lt;__threading_support&gt;`, specifically the mess involving external threading variants. Additionally this patch adds design documentation for `&lt;__threading_support&gt;` and the configuration macros it uses.

The primary change in this patch is separating the idea of an "external API" provided by `&lt;__external_threading&gt;` and the idea of having an external threading library. Now `_LIBCPP_HAS_THREAD_API_EXTERNAL` means that libc++ should use `&lt;__external_threading&gt;` and that the header is expected to exist.  Additionally the new macro `_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL` is now used to configure for using an "external library"  with the default threading API.

Reviewers: compnerd, rmaprath

Subscribers: smeenai, cfe-commits, mgorny

Differential Revision: https://reviews.llvm.org/D28316

llvm-svn: 291275
</pre>
</div>
</content>
</entry>
</feed>
