290 references to RuntimeImports
System.Private.CoreLib (290)
_generated\2\LibraryImports.g.cs (2)
91internal static unsafe extern partial void RhEnumerateConfigurationValues(void* configurationContext, delegate* unmanaged<void*, byte*, byte*, global::System.Runtime.RuntimeImports.GCConfigurationType, long, void> callback); 99internal static extern partial int RhRefreshMemoryLimit(global::System.Runtime.RuntimeImports.GCHeapHardLimitInfo heapHardLimitInfo);
Internal\IntrinsicSupport\ComparerHelpers.cs (1)
43else if (RuntimeImports.AreTypesAssignable(objectType, interfaceType->GenericArguments[0]))
Internal\Runtime\Augments\RuntimeAugments.cs (24)
71return RuntimeImports.RhNewObject(typeHandle.ToMethodTable()); 85Debug.Assert(!mt->ContainsGCPointers || RuntimeImports.RhGetGCDescSize(mt) != 0); 100return RuntimeImports.RhNewArray(mt, count); 158RuntimeImports.RhUnbox(value, ref element, elementMT); 162RuntimeImports.RhCheckArrayStore(array, value); 171return RuntimeImports.RhGetNewObjectHelper(type.ToMethodTable()); 209return RuntimeImports.RhGetOSModuleFromPointer(pointerVal); 214return RuntimeImports.RhFindBlob(typeManager, (uint)blobId, (byte**)ppbBlob, (uint*)pcbBlob); 234RuntimeImports.RhUnbox(fieldValue, ref *(byte*)address, fieldType.ToMethodTable()); 253RuntimeImports.RhUnbox(fieldValue, ref address, fieldType.ToMethodTable()); 299RuntimeImports.RhUnbox(fieldValue, ref Unsafe.Add<byte>(ref typedReference.Value, fieldOffset), fieldTypeHandle.ToMethodTable()); 346RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.ThreadStaticRegion, out int length); 441return RuntimeImports.AreTypesAssignable(srcEEType, dstEEType); 464return RuntimeImports.RhGetGCDescSize(typeHandle.ToMethodTable()); 479IntPtr cell = RuntimeImports.RhNewInterfaceDispatchCell(interfaceTypeHandle.ToMethodTable(), slotNumber); 542IntPtr result = RuntimeImports.RhResolveStaticDispatchOnType(instanceType.ToMethodTable(), interfaceType.ToMethodTable(), checked((ushort)slot), &genericContextPtr); 552return RuntimeImports.RhResolveDispatchOnType(instanceType.ToMethodTable(), interfaceType.ToMethodTable(), checked((ushort)slot)); 627return RuntimeImports.AreTypesAssignable(srcEEType, dstType.ToMethodTable()); 651moduleBase = RuntimeImports.RhGetOSModuleFromPointer(ip); 659int numUtf8Chars = RuntimeImports.RhGetModuleFileName(ip, out pModuleNameUtf8); 672return RuntimeImports.RhGetCodeTarget(functionPointer); 677return RuntimeImports.RhGetTargetOfUnboxingAndInstantiatingStub(functionPointer); 731return RuntimeImports.RhHandleAlloc(value, type); 736RuntimeImports.RhHandleFree(handle);
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (2)
614if (!RuntimeImports.AreTypesAssignable(pMarshallerType.ToMethodTable(), MethodTable.Of<ICustomMarshaler>())) 625if (!RuntimeImports.AreTypesAssignable(marshaller.GetMethodTable(), MethodTable.Of<ICustomMarshaler>()))
Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (1)
127if (RuntimeImports.RhFindBlob(module, (uint)blob, &pBlob, &cbBlob))
Internal\Runtime\CompilerHelpers\SharedCodeHelpers.cs (1)
26return (MethodTable*)RuntimeImports.GetCurrentInteropThunkContext();
Internal\Runtime\CompilerServices\OpenMethodResolver.cs (2)
144return RuntimeImports.RhResolveDispatch(thisObject, _declaringType, (ushort)_methodHandleOrSlotOrCodePointer); 177return RuntimeImports.RhResolveDispatchOnType(thisType.ToMethodTable(), resolver->_declaringType, (ushort)resolver->_methodHandleOrSlotOrCodePointer);
Internal\Runtime\FrozenObjectHeapManager.cs (2)
147m_SegmentHandle = RuntimeImports.RhRegisterFrozenSegment(m_pStart, (nuint)m_pCurrent - (nuint)m_pStart, FOH_COMMIT_SIZE, m_Size); 195RuntimeImports.RhUpdateFrozenSegment(m_SegmentHandle, m_pCurrent, m_pStart + m_SizeCommitted);
Internal\Runtime\ThreadStatics.cs (5)
44RuntimeImports.RhRegisterInlinedThreadStaticRoot(ref threadStorage, typeManager); 59object[][] perThreadStorage = RuntimeImports.RhGetThreadStaticStorage(); 85ref object[][] threadStorage = ref RuntimeImports.RhGetThreadStaticStorage(); 128threadStaticRegion = (IntPtr*)RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.ThreadStaticRegion, out length); 140return RuntimeImports.RhNewObject((MethodTable*)gcDesc);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\CompilerHelpers\StartupCodeHelpers.cs (11)
33RuntimeImports.RhpRegisterOsModule(osModule); 42s_moduleGCStaticsSpines = RuntimeImports.RhHandleAlloc(gcStaticBaseSpines, GCHandleType.Normal); 95TypeManagerHandle handle = RuntimeImports.RhpCreateTypeManager(osModule, pModuleHeaders[i], pClasslibFunctions, nClasslibFunctions); 98IntPtr dehydratedDataSection = RuntimeImports.RhGetModuleSection( 127TypeManagerSlot* section = (TypeManagerSlot*)RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.TypeManagerIndirection, out length); 132IntPtr staticsSection = RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.GCStaticRegion, out length); 146IntPtr frozenObjectSection = RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.FrozenObjectRegion, out length); 156if (RuntimeImports.RhRegisterFrozenSegment((void*)segmentStart, (nuint)length, (nuint)length, (nuint)length) == IntPtr.Zero) 173var pInitializers = (byte*)RuntimeImports.RhGetModuleSection(typeManager, section, out int length); 210RuntimeImports.RhAllocateNewObject( 227RuntimeImports.RhBulkMoveWithWriteBarrier(ref obj.GetRawData(), ref *(byte*)pPreInitDataAddr, obj.GetRawObjectDataSize());
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\__Finalizer.cs (2)
29int observedFullGcCount = RuntimeImports.RhGetGcCollectionCount(RuntimeImports.RhGetMaxGcGeneration(), false);
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\RuntimeExports.cs (1)
91RuntimeImports.RhAllocateNewArray(pEEType, (uint)length, (uint)GC_ALLOC_FLAGS.GC_ALLOC_NO_FLAGS, &array);
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (1)
301Continuation newContinuation = (Continuation)RuntimeImports.RhNewObject(contMT);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
791[RuntimeImport(RuntimeImports.RuntimeLibrary, "RhpCurrentThreadIsFinalizerThread")]
System\AppContext.NativeAot.cs (1)
14uint count = RuntimeImports.RhGetKnobValues(out byte** keys, out byte** values);
System\Array.NativeAot.cs (12)
162Array ret = RuntimeImports.RhNewVariableSizeObject(eeType, (int)totalLength); 220Array ret = RuntimeImports.RhNewArray(pEEType, pDimensions[0]); 252return RuntimeImports.RhNewArray(elementType.MakeArrayType().TypeHandle.ToMethodTable(), pDimensions[0]); 304if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType)) 313if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType)) 322if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType)) 324else if (RuntimeImports.AreTypesAssignable(destinationElementEEType, sourceElementEEType)) // V extends IV. Copying from IV to V, or Object to V. 353if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType)) 357if (RuntimeImports.AreTypesAssignable(destinationElementEEType, sourceElementEEType)) 414Debug.Assert(value == null || RuntimeImports.AreTypesAssignable(value.GetMethodTable(), pElementEEType)); 416RuntimeImports.RhUnbox(value, ref element, pElementEEType); 426RuntimeImports.RhCheckArrayStore(this, value);
System\Attribute.NativeAot.cs (3)
46object thisResult = RuntimeImports.RhBoxAny(ref Unsafe.Add(ref thisRawData, fieldOffset), fieldType); 47object thatResult = RuntimeImports.RhBoxAny(ref Unsafe.Add(ref thatRawData, fieldOffset), fieldType); 72object? fieldValue = RuntimeImports.RhBoxAny(ref Unsafe.Add(ref thisRawData, fieldOffset), fieldType);
System\Buffer.NativeAot.cs (1)
15RuntimeImports.RhBulkMoveWithWriteBarrier(ref destination, ref source, byteCount);
System\CrashInfo.cs (4)
47_bufferAddress = RuntimeImports.RhGetCrashInfoBuffer(out _maxBufferSize); 107if (!WriteHexValue("runtime_base"u8, (ulong)RuntimeImports.RhGetOSModuleFromPointer((nint)(void*)(delegate*<void>)&Dummy))) 113if (!WriteValue("runtime_version"u8, new ReadOnlySpan<byte>(RuntimeImports.RhGetRuntimeVersion(out int cbLength), cbLength))) 248nint moduleBase = RuntimeImports.RhGetOSModuleFromPointer(ip);
System\Delegate.cs (4)
178_functionPointer = RuntimeImports.RhpResolveInterfaceMethod(firstParameter, dispatchCell); 395Delegate del = (Delegate)(RuntimeImports.RhNewObject(delegateEEType)); 419Delegate del = (Delegate)RuntimeImports.RhNewObject(delegateEEType); 455Delegate result = Unsafe.As<Delegate>(RuntimeImports.RhNewObject(this.GetMethodTable()));
System\Diagnostics\Debugger.cs (1)
71[LibraryImport(RuntimeImports.RuntimeLibrary, EntryPoint = "DebugDebugger_IsNativeDebuggerAttached")]
System\Diagnostics\StackFrame.NativeAot.cs (4)
72Debug.Assert(RuntimeImports.RhFindMethodStartAddress(_ipAddress) == startAddress); 85Debug.Assert(RuntimeImports.RhFindMethodStartAddress(_ipAddress) == methodStartAddress); 117IntPtr methodStartAddress = RuntimeImports.RhFindMethodStartAddress(ipAddress); 158int returnedFrameCount = RuntimeImports.RhGetCurrentThreadStackTrace(frameArray);
System\Diagnostics\StackFrameExtensions.cs (1)
16return RuntimeImports.RhGetOSModuleFromPointer(stackFrame.GetNativeIPAddress());
System\Diagnostics\StackTrace.NativeAot.cs (2)
21int frameCount = -RuntimeImports.RhGetCurrentThreadStackTrace(Array.Empty<IntPtr>()); 24int trueFrameCount = RuntimeImports.RhGetCurrentThreadStackTrace(stackTrace);
System\Environment.NativeAot.cs (1)
48internal static int GetProcessorCount() => Runtime.RuntimeImports.RhGetProcessCpuCount();
System\GC.NativeAot.cs (47)
86return RuntimeImports.RhGetGeneration(obj); 91return RuntimeImports.RhGetGenerationSize(gen); 96return RuntimeImports.RhGetLastGCPercentTimeInGC(); 112object? obj = RuntimeImports.RhHandleGet(wo.WeakHandle); 117return RuntimeImports.RhGetGeneration(obj); 130RuntimeImports.RhCollect(-1, InternalGCCollectionMode.Blocking); 195RuntimeImports.RhCollect(generation, (InternalGCCollectionMode)iInternalModes, lowMemoryPressure ? Interop.BOOL.TRUE : Interop.BOOL.FALSE); 226if (!RuntimeImports.RhRegisterForFullGCNotification(maxGenerationThreshold, largeObjectHeapThreshold)) 239return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCApproach(-1); 252return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCApproach(millisecondsTimeout); 262return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCComplete(-1); 275return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCComplete(millisecondsTimeout); 285if (!RuntimeImports.RhCancelFullGCNotification()) 329EnableNoGCRegionCallbackStatus status = (EnableNoGCRegionCallbackStatus)RuntimeImports.RhEnableNoGCRegionCallback(pWorkItem, totalSize); 430(StartNoGCRegionStatus)RuntimeImports.RhStartNoGCRegion( 458EndNoGCRegionStatus status = (EndNoGCRegionStatus)RuntimeImports.RhEndNoGCRegion(); 479RuntimeImports.RhWaitForPendingFinalizers(Thread.ReentrantWaitsEnabled); 486RuntimeImports.RhSuppressFinalize(obj); 493RuntimeImports.RhReRegisterForFinalize(obj); 506get { return RuntimeImports.RhGetMaxGcGeneration(); } 513return RuntimeImports.RhGetGcCollectionCount(generation, false); 630long heapOver3 = RuntimeImports.RhGetCurrentObjSize() / 3; 640if ((RuntimeImports.RhGetGCNow() - RuntimeImports.RhGetLastGCStartTime(2)) > (RuntimeImports.RhGetLastGCDuration(2) * 5)) 642RuntimeImports.RhCollect(2, InternalGCCollectionMode.NonBlocking); 656private static unsafe void ConfigCallback(void* configurationContext, byte* name, byte* publicKey, RuntimeImports.GCConfigurationType type, long data) 675case RuntimeImports.GCConfigurationType.Int64: 679case RuntimeImports.GCConfigurationType.StringUtf8: 686case RuntimeImports.GCConfigurationType.Boolean: 704RuntimeImports.RhEnumerateConfigurationValues(&context, &ConfigCallback); 722long size = RuntimeImports.RhGetGcTotalMemory(); 740long newSize = RuntimeImports.RhGetGcTotalMemory(); 752return RuntimeImports.RhRegisterFrozenSegment((void*)sectionAddress, (nuint)sectionSize, (nuint)sectionSize, (nuint)sectionSize); 757RuntimeImports.RhUnregisterFrozenSegment(segmentHandle); 762return RuntimeImports.RhGetAllocatedBytesForCurrentThread(); 767return precise ? RuntimeImports.RhGetTotalAllocatedBytesPrecise() : RuntimeImports.RhGetTotalAllocatedBytes(); 794RuntimeImports.RhGetMemoryInfo(ref data.GetRawData(), kind); 800return RuntimeImports.RhGetGCSegmentSize(); 842RuntimeImports.RhAllocateNewArray(MethodTable.Of<T[]>(), (uint)length, (uint)flags, &array); 869RuntimeImports.RhAllocateNewArray(MethodTable.Of<T[]>(), (uint)length, (uint)flags, &array); 878return new TimeSpan(RuntimeImports.RhGetTotalPauseDuration()); 891RuntimeImports.GCHeapHardLimitInfo heapHardLimitInfo = new RuntimeImports.GCHeapHardLimitInfo 902RefreshMemoryStatus status = (RefreshMemoryStatus)RuntimeImports.RhRefreshMemoryLimit(heapHardLimitInfo); 915return RuntimeImports.RhGetGenerationBudget(generation);
System\InvokeUtils.cs (4)
59return Runtime.RuntimeImports.RhNewObject(dstEEType); 71RuntimeImports.AreTypesAssignable(srcEEType, dstEEType) || 146dstObject = RuntimeImports.RhNewObject(dstEEType); 385if (dstEEType == typeof(void*).TypeHandle.ToMethodTable() || RuntimeImports.AreTypesAssignable(pSourceType: srcPointer.GetPointerType().TypeHandle.ToMethodTable(), pTargetType: dstEEType))
System\Math.NativeAot.cs (24)
22return RuntimeImports.acos(d); 28return RuntimeImports.acosh(d); 34return RuntimeImports.asin(d); 40return RuntimeImports.asinh(d); 46return RuntimeImports.atan(d); 52return RuntimeImports.atan2(y, x); 58return RuntimeImports.atanh(d); 64return RuntimeImports.cbrt(d); 70return RuntimeImports.ceil(a); 76return RuntimeImports.cos(d); 82return RuntimeImports.cosh(value); 88return RuntimeImports.exp(d); 94return RuntimeImports.floor(d); 100return RuntimeImports.fma(x, y, z); 106return RuntimeImports.log(d); 112return RuntimeImports.log2(x); 118return RuntimeImports.log10(d); 124return RuntimeImports.pow(x, y); 130return RuntimeImports.sin(a); 136return RuntimeImports.sinh(value); 142return RuntimeImports.sqrt(d); 148return RuntimeImports.tan(a); 154return RuntimeImports.tanh(value); 160return RuntimeImports.modf(x, intptr);
System\MathF.NativeAot.cs (24)
22return RuntimeImports.acosf(x); 28return RuntimeImports.acoshf(x); 34return RuntimeImports.asinf(x); 40return RuntimeImports.asinhf(x); 46return RuntimeImports.atanf(x); 52return RuntimeImports.atan2f(y, x); 58return RuntimeImports.atanhf(x); 64return RuntimeImports.cbrtf(x); 70return RuntimeImports.ceilf(x); 76return RuntimeImports.cosf(x); 82return RuntimeImports.coshf(x); 88return RuntimeImports.expf(x); 94return RuntimeImports.floorf(x); 100return RuntimeImports.fmaf(x, y, z); 106return RuntimeImports.logf(x); 112return RuntimeImports.log2f(x); 118return RuntimeImports.log10f(x); 124return RuntimeImports.powf(x, y); 130return RuntimeImports.sinf(x); 136return RuntimeImports.sinhf(x); 142return RuntimeImports.sqrtf(x); 148return RuntimeImports.tanf(x); 154return RuntimeImports.tanhf(x); 160return RuntimeImports.modff(x, intptr);
System\Object.NativeAot.cs (2)
32RuntimeImports.RhNewVariableSizeObject(this.GetMethodTable(), Unsafe.As<Array>(this).Length) : 33RuntimeImports.RhNewObject(this.GetMethodTable());
System\Reflection\DynamicInvokeInfo.cs (19)
220returnObject = RuntimeImports.RhNewObject( 288returnObject = RuntimeImports.RhNewObject( 354returnObject = RuntimeImports.RhNewObject( 418RuntimeImports.RhRegisterForGCReporting(&regArgStorage); 419RuntimeImports.RhRegisterForGCReporting(&regByRefStorage); 441RuntimeImports.RhUnregisterForGCReporting(&regByRefStorage); 442RuntimeImports.RhUnregisterForGCReporting(&regArgStorage); 467RuntimeImports.RhRegisterForGCReporting(&regArgStorage); 468RuntimeImports.RhRegisterForGCReporting(&regByRefStorage); 481RuntimeImports.RhUnregisterForGCReporting(&regByRefStorage); 482RuntimeImports.RhUnregisterForGCReporting(&regArgStorage); 605arg = RuntimeImports.RhNewObject( 628RuntimeImports.AreTypesAssignable(srcEEType, dstEEType) || 645object box = RuntimeImports.RhNewObject(argumentInfo.Type); 646RuntimeImports.RhUnbox(arg, ref box.GetRawData(), argumentInfo.Type); 686arg = RuntimeImports.RhNewObject( 696RuntimeImports.AreTypesAssignable(srcEEType, dstEEType) || 713object box = RuntimeImports.RhNewObject(argumentInfo.Type); 714RuntimeImports.RhUnbox(arg, ref box.GetRawData(), argumentInfo.Type);
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (4)
77return RuntimeImports.RhCompareObjectContentsAndPadding(o1, o2); 153RuntimeImports.RhGetCurrentThreadStackBounds(out lower, out upper); 334if (RuntimeImports.AreTypesAssignable(mt, MethodTable.Of<Delegate>())) 357return RuntimeImports.RhNewObject(mt);
System\Runtime\DependentHandle.cs (11)
11_handle = RuntimeImports.RhHandleAllocDependent(target, dependent); 26return RuntimeImports.RhHandleGet(handle); 37RuntimeImports.RhHandleSet(handle, null); 53RuntimeImports.RhHandleGetDependent(handle, out object? dependent); 65RuntimeImports.RhHandleSetDependentSecondary(handle, value); 80object? target = RuntimeImports.RhHandleGetDependent(handle, out object? dependent); 88return RuntimeImports.RhHandleGet(_handle); 93return RuntimeImports.RhHandleGetDependent(_handle, out dependent); 98RuntimeImports.RhHandleSet(_handle, null); 103RuntimeImports.RhHandleSetDependentSecondary(_handle, dependent); 116RuntimeImports.RhHandleFree(handle);
System\Runtime\GCSettings.NativeAot.cs (5)
9RuntimeImports.RhIsServerGc(); 12RuntimeImports.RhGetGcLatencyMode(); 15(SetLatencyModeStatus)RuntimeImports.RhSetGcLatencyMode(value); 18(GCLargeObjectHeapCompactionMode)RuntimeImports.RhGetLohCompactionMode(); 21RuntimeImports.RhSetLohCompactionMode((int)value);
System\Runtime\InteropServices\ComWrappers.NativeAot.cs (5)
26if (!RuntimeImports.RhRegisterRefCountedHandleCallback((nint)callback, MethodTable.Of<ManagedObjectWrapperHolder>())) 42return RuntimeImports.RhHandleAllocRefCounted(holder); 55fpAddRef = (IntPtr)(delegate*<IntPtr, uint>)&RuntimeImports.RhIUnknown_AddRef; // Implemented in C/C++ to avoid GC transitions 62fpAddRef = (delegate* unmanaged[MemberFunction]<IntPtr, uint>)(void*)(delegate*<IntPtr, uint>)&RuntimeImports.RhUntracked_AddRefRelease; 63fpRelease = (delegate* unmanaged[MemberFunction]<IntPtr, uint>)(void*)(delegate*<IntPtr, uint>)&RuntimeImports.RhUntracked_AddRefRelease;
System\Runtime\InteropServices\GCHandle.NativeAot.cs (4)
10internal static IntPtr InternalAlloc(object value, GCHandleType type) => RuntimeImports.RhHandleAlloc(value, type); 12internal static void InternalFree(IntPtr handle) => RuntimeImports.RhHandleFree(handle); 14internal static object? InternalGet(IntPtr handle) => RuntimeImports.RhHandleGet(handle); 16internal static void InternalSet(IntPtr handle, object? value) => RuntimeImports.RhHandleSet(handle, value);
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (2)
19private static readonly object s_thunkPoolHeap = RuntimeAugments.CreateThunksHeap(RuntimeImports.GetInteropCommonStubAddress()); 35nint result = RuntimeImports.RhResolveDynamicInterfaceCastableDispatchOnType(implType, interfaceType, slot, &genericContext);
System\Runtime\InteropServices\Marshal.NativeAot.cs (1)
102RuntimeImports.AreTypesAssignable(MethodTable.Of<Delegate>(), structureTypeHandle.ToMethodTable()))
System\Runtime\InteropServices\PInvokeMarshal.cs (3)
183RuntimeAugments.CreateThunksHeap(RuntimeImports.GetInteropCommonStubAddress()), 254IntPtr pContext = RuntimeImports.GetCurrentInteropThunkContext(); 278IntPtr pContext = RuntimeImports.GetCurrentInteropThunkContext();
System\Runtime\InteropServices\TrackerObjectManager.NativeAot.cs (13)
114if (!RuntimeImports.RhRegisterGcCallout(RuntimeImports.GcRestrictedCalloutKind.StartCollection, (IntPtr)gcStartCallback) || 115!RuntimeImports.RhRegisterGcCallout(RuntimeImports.GcRestrictedCalloutKind.EndCollection, (IntPtr)gcStopCallback) || 116!RuntimeImports.RhRegisterGcCallout(RuntimeImports.GcRestrictedCalloutKind.AfterMarkPhase, (IntPtr)gcAfterMarkCallback)) 189!RuntimeImports.RhIsPromoted(nativeObjectWrapper.ProxyHandle.Target)) 306RuntimeImports.RhHandleSet(handle, target); 307RuntimeImports.RhHandleSetDependentSecondary(handle, dependent); 311_pHandles[_freeIndex] = RuntimeImports.RhpHandleAllocDependent(target, dependent); 361RuntimeImports.RhHandleSet(handle, null); 362RuntimeImports.RhHandleSetDependentSecondary(handle, null); 379RuntimeImports.RhHandleFree(_pHandles[index]);
System\Runtime\InteropServices\TypeMapLazyDictionary.NativeAot.cs (1)
109byte* pBlob = (byte*)RuntimeImports.RhGetModuleSection(module, sectionType, out int length);
System\Runtime\ThunkPool.cs (10)
46public static readonly int ThunkCodeSize = RuntimeImports.RhpGetThunkSize(); 47public static readonly int NumThunksPerBlock = RuntimeImports.RhpGetNumThunksPerBlock(); 48public static readonly int NumThunkBlocksPerMapping = RuntimeImports.RhpGetNumThunkBlocksPerMapping(); 92IntPtr thunkDataBlock = RuntimeImports.RhpGetThunkDataBlockAddress(thunkStubsBlock); 126IntPtr thunkDataBlock = RuntimeImports.RhpGetThunkDataBlockAddress(thunkStubsBlock); 182IntPtr thunkAddress = RuntimeImports.RhpGetThunkStubsBlockAddress(nextAvailableThunkPtr) + thunkIndex * Constants.ThunkCodeSize; 244IntPtr thunkDataBlockAddress = RuntimeImports.RhpGetThunkDataBlockAddress((IntPtr)((nint)thunkAddressValue)); 318int result = RuntimeImports.RhAllocateThunksMapping(&nextThunksBlock); 327int thunkBlockSize = RuntimeImports.RhpGetThunkBlockSize(); 340IntPtr dataAddress = RuntimeImports.RhpGetThunkDataBlockAddress(nextThunksBlock);
System\RuntimeExceptionHelpers.cs (1)
337RuntimeImports.RhCreateCrashDumpIfEnabled(new IntPtr(&exceptionRecord));
System\RuntimeType.NativeAot.cs (7)
35_runtimeTypeInfoHandle = RuntimeImports.RhHandleAlloc(runtimeTypeInfo, GCHandleType.Normal); 46RuntimeImports.RhHandleFree(_runtimeTypeInfoHandle); 57object? runtimeTypeInfo = RuntimeImports.RhHandleGet(handle); 77IntPtr tempHandle = RuntimeImports.RhHandleAlloc(runtimeTypeInfo, GCHandleType.Weak); 79RuntimeImports.RhHandleFree(tempHandle); 83RuntimeImports.RhHandleSet(handle, runtimeTypeInfo); 624if (RuntimeImports.AreTypesAssignable(fromRuntimeType._pUnderlyingEEType, _pUnderlyingEEType))
System\String.NativeAot.cs (1)
23[RuntimeImport(RuntimeImports.RuntimeLibrary, "RhNewString")]
System\Threading\Interlocked.cs (2)
64return RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand); 112return RuntimeImports.InterlockedExchange(ref location1, value);
System\Threading\Thread.NativeAot.cs (6)
74RuntimeImports.RhSetThreadExitCallback(&OnThreadExit); 81return RuntimeImports.RhCurrentOSThreadId(); 219RuntimeImports.RhSetCurrentThreadName(value); 331RuntimeImports.RhSpinWait(iterations); 338RuntimeImports.RhLongSpinWait(iterations); 354public static bool Yield() => RuntimeImports.RhYield();
System\Threading\Thread.NativeAot.Unix.cs (2)
71stackSize = RuntimeImports.RhGetDefaultStackSize(); 74if (!Interop.Sys.CreateThread(stackSize, RuntimeImports.RhGetThreadEntryPointAddress(), GCHandle<Thread>.ToIntPtr(thisThreadHandle)))
System\ValueType.cs (2)
86object thisField = RuntimeImports.RhBoxAny(ref Unsafe.Add(ref thisRawData, fieldOffset), fieldType); 87object thatField = RuntimeImports.RhBoxAny(ref Unsafe.Add(ref thatRawData, fieldOffset), fieldType);