Skip to content

[Backdeploy5.6] Hide task_future_wait[_throwing] #61562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/swift/Runtime/Exclusivity.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ void swift_dumpTrackedAccesses();
#ifdef SWIFT_COMPATIBILITY56
/// Backdeploy56 shim calls swift_task_enterThreadLocalContext if it is
/// available in the underlying runtime, otherwise does nothing
SWIFT_RUNTIME_EXPORT
__attribute__((visibility("hidden"), weak))
void swift_task_enterThreadLocalContextBackdeploy56(char *state);

/// Backdeploy56 shim calls swift_task_exitThreadLocalContext if it is available
/// in the underlying runtime, otherwise does nothing
SWIFT_RUNTIME_EXPORT
__attribute__((visibility("hidden"), weak))
void swift_task_exitThreadLocalContextBackdeploy56(char *state);
#else

Expand Down
8 changes: 2 additions & 6 deletions stdlib/toolchain/Compatibility56/Overrides.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ using TaskFutureWaitThrowing_t = SWIFT_CC(swiftasync) void(
ThrowingTaskFutureWaitContinuationFunction *resumeFn,
AsyncContext *callContext);

__attribute__((weak, visibility("hidden")))
void SWIFT_CC(swiftasync) swift56override_swift_task_future_wait(
OpaqueValue *,
SWIFT_ASYNC_CONTEXT AsyncContext *,
Expand All @@ -45,17 +46,12 @@ void SWIFT_CC(swiftasync) swift56override_swift_task_future_wait(
AsyncContext *,
TaskFutureWait_t *original);

__attribute__((weak, visibility("hidden")))
void SWIFT_CC(swiftasync) swift56override_swift_task_future_wait_throwing(
OpaqueValue *,
SWIFT_ASYNC_CONTEXT AsyncContext *,
AsyncTask *,
ThrowingTaskFutureWaitContinuationFunction *,
AsyncContext *,
TaskFutureWaitThrowing_t *original);


using AsyncMainDrainQueue_t = SWIFT_CC(swift) void();

void SWIFT_CC(swift) swift56override_swift_asyncMainDrainQueue(AsyncMainDrainQueue_t *);

} // namespace swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class CancellationNotificationStatusRecord : public TaskStatusRecord {
};

/// Return the current thread's active task reference.
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
SWIFT_CC(swift)
AsyncTask *swift_task_getCurrent(void);
} // namespace swift

Expand Down
11 changes: 3 additions & 8 deletions stdlib/toolchain/Compatibility56/include/Runtime/Concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,9 @@ using FutureAsyncSignature =
///
/// This has no effect if the task already has at least the given priority.
/// Returns the priority of the task.
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
JobPriority
swift_task_escalateBackdeploy56(AsyncTask *task, JobPriority newPriority);

/// Return the current thread's active task reference.
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
AsyncTask *swift_task_getCurrent(void);

SWIFT_CC(swift)
JobPriority swift_task_escalateBackdeploy56(AsyncTask *task,
JobPriority newPriority);
} // namespace swift

#pragma clang diagnostic pop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ typedef std::once_flag swift_once_t;
/// Runs the given function with the given context argument exactly once.
/// The predicate argument must point to a global or static variable of static
/// extent of type swift_once_t.
SWIFT_RUNTIME_EXPORT
void swift_once(swift_once_t *predicate, void (*fn)(void *), void *context);

}
Expand Down