mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[concurrency] Create builtins for invoking specific concurrency runtime functions.
Specifically: 1. swift_task_addCancellationHandler 2. swift_task_removeCancellationHandler 3. swift_task_addPriorityEscalationHandler 4. swift_task_removePriorityEscalationHandler 5. swift_task_localValuePush 6. swift_task_localValuePop rdar://109850951
This commit is contained in:
@@ -2660,6 +2660,72 @@ FUNCTION(TaskGroupDestroy,
|
||||
EFFECT(RuntimeEffect::Concurrency),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// CancellationNotificationStatusRecord*
|
||||
// swift_task_addCancellationHandler(
|
||||
// CancellationNotificationStatusRecord::FunctionType handler,
|
||||
// void *context);
|
||||
FUNCTION(TaskAddCancellationHandler,
|
||||
_Concurrency, swift_task_addCancellationHandler, SwiftCC,
|
||||
ConcurrencyAvailability,
|
||||
RETURNS(Int8PtrTy),
|
||||
ARGS(Int8PtrTy, Int8PtrTy),
|
||||
ATTRS(NoUnwind),
|
||||
EFFECT(RuntimeEffect::Concurrency),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// void swift_task_removeCancellationHandler(
|
||||
// CancellationNotificationStatusRecord *record);
|
||||
FUNCTION(TaskRemoveCancellationHandler,
|
||||
_Concurrency, swift_task_removeCancellationHandler, SwiftCC,
|
||||
ConcurrencyAvailability,
|
||||
RETURNS(VoidTy),
|
||||
ARGS(Int8PtrTy),
|
||||
ATTRS(NoUnwind),
|
||||
EFFECT(RuntimeEffect::Concurrency),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// EscalationNotificationStatusRecord*
|
||||
// swift_task_addPriorityEscalationHandler(
|
||||
// EscalationNotificationStatusRecord::FunctionType handler,
|
||||
// void *context);
|
||||
FUNCTION(TaskAddPriorityEscalationHandler,
|
||||
_Concurrency, swift_task_addPriorityEscalationHandler, SwiftCC,
|
||||
ConcurrencyAvailability,
|
||||
RETURNS(Int8PtrTy),
|
||||
ARGS(Int8PtrTy, Int8PtrTy),
|
||||
ATTRS(NoUnwind),
|
||||
EFFECT(RuntimeEffect::Concurrency),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// void swift_task_removePriorityEscalationHandler(
|
||||
// EscalationNotificationStatusRecord *record);
|
||||
FUNCTION(TaskRemovePriorityEscalationHandler,
|
||||
_Concurrency, swift_task_removePriorityEscalationHandler, SwiftCC,
|
||||
ConcurrencyAvailability,
|
||||
RETURNS(VoidTy),
|
||||
ARGS(Int8PtrTy),
|
||||
ATTRS(NoUnwind),
|
||||
EFFECT(RuntimeEffect::Concurrency),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// void swift_task_localValuePush(const HeapObject *key,
|
||||
// /* +1 */ OpaqueValue *value,
|
||||
// const Metadata *valueType);
|
||||
FUNCTION(TaskLocalValuePush, _Concurrency, swift_task_localValuePush, SwiftCC,
|
||||
ConcurrencyAvailability, RETURNS(),
|
||||
ARGS(RefCountedPtrTy, OpaquePtrTy, TypeMetadataPtrTy), ATTRS(NoUnwind),
|
||||
EFFECT(RuntimeEffect::Concurrency), UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// void swift_task_localValuePop();
|
||||
FUNCTION(TaskLocalValuePop,
|
||||
_Concurrency, swift_task_localValuePop, SwiftCC,
|
||||
ConcurrencyAvailability,
|
||||
RETURNS(),
|
||||
ARGS(),
|
||||
ATTRS(NoUnwind),
|
||||
EFFECT(RuntimeEffect::Concurrency),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// AutoDiffLinearMapContext *swift_autoDiffCreateLinearMapContextWithType(const Metadata *);
|
||||
FUNCTION(AutoDiffCreateLinearMapContextWithType,
|
||||
Swift, swift_autoDiffCreateLinearMapContextWithType, SwiftCC,
|
||||
|
||||
Reference in New Issue
Block a user