[Threading] Don't use TLS keys as template arguments.

There's no guarantee that e.g. pthread_key_t is an integral type.  It could
be some kind of struct, or some other thing that isn't valid as a template
argument.

rdar://90776105
This commit is contained in:
Alastair Houghton
2022-05-04 11:08:09 +01:00
parent c7c1c1be80
commit eb4c81d60e
13 changed files with 122 additions and 70 deletions

View File

@@ -0,0 +1,29 @@
//===--- TLSKeys.h - Reserved TLS keys ------------------------ -*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_THREADING_TLSKEYS_H
#define SWIFT_THREADING_TLSKEYS_H
namespace swift {
enum class tls_key {
runtime,
stdlib,
compatibility50,
concurrency_task,
concurrency_executor_tracking_info,
concurrency_fallback
};
} // namespace swift
#endif // SWIFT_THREADING_TLSKEYS_H