mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
29
include/swift/Threading/TLSKeys.h
Normal file
29
include/swift/Threading/TLSKeys.h
Normal 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
|
||||
Reference in New Issue
Block a user