Commit Graph

17 Commits

Author SHA1 Message Date
Alastair Houghton
c7c1c1be80 [Threading] Fix some problems with the C11 threading code.
These changes are needed to get things building with a C11 threads shim
header on macOS.

rdar://90776105
2022-06-07 07:39:53 +01:00
Alastair Houghton
0e9318cec5 [Threading] Put everything through git clang-format.
Just formatting changes.

rdar://90776105
2022-06-07 07:39:53 +01:00
Alastair Houghton
f5bdb858e0 [Threading] Create new threading library and use it.
Moved all the threading code to one place.  Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.

rdar://90776105
2022-06-07 07:39:51 +01:00
Alastair Houghton
66b9d21000 [Runtime] Remove all use of read/write locks.
Read/write locks are not as good as you'd think; a simple mutex is better in
almost all cases.

rdar://90776105
2022-06-07 07:39:51 +01:00
Alex Hoppen
4aa2bbbf06 Revert "Merge pull request #42447 from al45tair/eng/PR-90776105"
This reverts commit 8bcb71140f, reversing
changes made to c4dd271d36.
2022-06-02 18:03:23 +02:00
Alastair Houghton
2884ddbc3e [Threading] Fix some problems with the C11 threading code.
These changes are needed to get things building with a C11 threads shim
header on macOS.

rdar://90776105
2022-05-24 14:57:42 +01:00
Alastair Houghton
b5bd267ff1 [Threading] Put everything through git clang-format.
Just formatting changes.

rdar://90776105
2022-05-24 14:57:41 +01:00
Alastair Houghton
63a09007a1 [Threading] Create new threading library and use it.
Moved all the threading code to one place.  Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.

rdar://90776105
2022-05-24 14:57:39 +01:00
Alastair Houghton
34af337194 [Runtime] Remove all use of read/write locks.
Read/write locks are not as good as you'd think; a simple mutex is better in
almost all cases.

rdar://90776105
2022-05-24 14:57:39 +01:00
Josh Soref
5fab3d1f58 Spelling stdlib/public/runtime (#42439)
* spelling: access

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bridgeable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: canonical

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: clazz

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: compatibility

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: language

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: necessary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: platform

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recursive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: related

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repeated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: satisfy

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: that

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: the

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: verification

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-19 14:03:03 -07:00
Mike Ash
f48bd293cb [Runtime] Remove RuntimeFunctionCounters in no-assert builds.
A build option to include or exclude RuntimeFunctionCounters. By default, it's enabled when assertions are enabled.

rdar://problem/35864525
2018-01-25 12:18:25 -05:00
Roman Levenstein
68d7778add Address post-commit review comments on PR #11910
- Use SWIFT_RUNTIME_EXPORT instead of SWIFT_RT_ENTRY_VISIBILITY for exposed functions
- Use `_swift_`  prefixes on the names of exposed functions
- Make the global counters and per-object counters cache thread-safe by using locks
2017-10-24 15:49:37 -07:00
Roman Levenstein
acff3212b5 Add a comment explaining why the file needs to be compiled even in no-asserts builds 2017-09-18 13:18:27 -07:00
Roman Levenstein
51bb830763 #include should be on the next line after #define 2017-09-18 13:17:48 -07:00
Roman Levenstein
d8c5238449 Move FUNCTION_TO_TRACK definitions closer to the includes of "RuntimeInvocationsTracking.def" 2017-09-18 12:52:40 -07:00
Roman Levenstein
1996d5fb64 Address review comments. 2017-09-15 16:39:08 -07:00
Roman Levenstein
ec1e051a36 Add runtime library support for tracking the invocations of runtime functions. 2017-09-14 16:43:13 -07:00