Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

* Task data is allocated in the main's thread's stack only

PR #3517 proposes and alternative stack layout:

   Push Down          Push Up
+-------------+   +-------------+ <- Stack memory allocation
|  TLS Data   |   |  TLS Data   |
+-------------+   +-------------+
| Task Data*  |   | Task Data*  |
+-------------+   +-------------+
|  Arguments  |   |  Arguments  |
+-------------+   +-------------+ |
|             |   |             |  v
| Available   |   | Available   |
|   Stack     |   |   Stack     |
|             |   |             |
|             |   |             |
|             | ^ |             |
+-------------+ | +-------------+

* Task data is allocated in the main's thread's stack only

TLS interfaces

TLS is a non-standard, but more general interface. It differs from pthread-specific data only in that its semantics are general; the semantics of the pthread-specific data interfaces are focused on pthreads. But they really should share the same common underlying logic.

...