Files
swift-mirror/stdlib/public/Concurrency/ExecutorBridge.h
Alastair Houghton 47fa71787f Revert "Merge pull request #80224 from glessard/revert-79789-custom-executors"
This reverts commit 06f6358067, reversing
changes made to 033f6679e8.
2025-03-28 10:15:07 +00:00

45 lines
1.3 KiB
C++

//===--- ExecutorBridge.h - C++ side of executor bridge -------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2025 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_EXECUTOR_BRIDGE_H_
#define SWIFT_EXECUTOR_BRIDGE_H_
#include "swift/Runtime/Concurrency.h"
namespace swift {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
extern "C" SWIFT_CC(swift)
SerialExecutorRef swift_getMainExecutor();
#if !SWIFT_CONCURRENCY_EMBEDDED
extern "C" SWIFT_CC(swift)
void *swift_createDispatchEventC(void (*handler)(void *), void *context);
extern "C" SWIFT_CC(swift)
void swift_destroyDispatchEventC(void *event);
extern "C" SWIFT_CC(swift)
void swift_signalDispatchEvent(void *event);
#endif // !SWIFT_CONCURRENCY_EMBEDDED
extern "C" SWIFT_CC(swift) __attribute__((noreturn))
void swift_dispatchMain();
#pragma clang diagnostic pop
} // namespace swift
#endif /* SWIFT_EXECUTOR_BRIDGE_H_ */