Ejemplo n.º 1
0
 private static extern string GetReaderName_Injected(ref AtomicSafetyHandle handle, int readerIndex);
 public static extern void SetBumpSecondaryVersionOnScheduleWrite(AtomicSafetyHandle handle, bool value);
 public static extern bool GetAllowReadOrWriteAccess(AtomicSafetyHandle handle);
 public static extern void Release(AtomicSafetyHandle handle);
 public static extern void UseSecondaryVersion(ref AtomicSafetyHandle handle);
 public static extern string GetReaderName(AtomicSafetyHandle handle, int readerIndex);
 public static extern void SetStaticSafetyId(ref AtomicSafetyHandle handle, int staticSafetyId);
Ejemplo n.º 8
0
 public static void SetAllowReadOrWriteAccess(AtomicSafetyHandle handle, bool allowReadWriteAccess)
 {
     AtomicSafetyHandle.SetAllowReadOrWriteAccess_Injected(ref handle, allowReadWriteAccess);
 }
Ejemplo n.º 9
0
        public static void Create(out AtomicSafetyHandle safety, out DisposeSentinel sentinel, int callSiteStackDepth, Allocator allocator)
        {
            safety   = (allocator == Allocator.Temp) ? AtomicSafetyHandle.GetTempMemoryHandle() : AtomicSafetyHandle.Create();
            sentinel = null;
            if (allocator == Allocator.Temp)
            {
                return;
            }

            if (Unity.Jobs.LowLevel.Unsafe.JobsUtility.IsExecutingJob)
            {
                throw new InvalidOperationException("Jobs can only create Temp memory");
            }

            CreateInternal(ref sentinel, callSiteStackDepth);
        }
Ejemplo n.º 10
0
 public static void SetAllowSecondaryVersionWriting(AtomicSafetyHandle handle, bool allowWriting)
 {
     AtomicSafetyHandle.SetAllowSecondaryVersionWriting_Injected(ref handle, allowWriting);
 }
Ejemplo n.º 11
0
 public static void SetBumpSecondaryVersionOnScheduleWrite(AtomicSafetyHandle handle, bool value)
 {
     AtomicSafetyHandle.SetBumpSecondaryVersionOnScheduleWrite_Injected(ref handle, value);
 }
Ejemplo n.º 12
0
 public static void Release(AtomicSafetyHandle handle)
 {
     AtomicSafetyHandle.Release_Injected(ref handle);
 }
Ejemplo n.º 13
0
 public static bool IsTempMemoryHandle(AtomicSafetyHandle handle)
 {
     return(AtomicSafetyHandle.IsTempMemoryHandle_Injected(ref handle));
 }
Ejemplo n.º 14
0
 private static extern string GetWriterName_Injected(ref AtomicSafetyHandle handle);
 public static unsafe extern int GetReaderArray(AtomicSafetyHandle handle, int maxCount, IntPtr output);
Ejemplo n.º 16
0
 public static void SetAtomicSafetyHandle <T>(ref NativeArray <T> array, AtomicSafetyHandle safety) where T : struct
 {
     array.m_Safety = safety;
 }
 public static extern JobHandle GetWriter(AtomicSafetyHandle handle);
Ejemplo n.º 18
0
 public static unsafe void *GetUnsafeReadOnlyPtr <T>(this NativeArray <T> nativeArray) where T : struct
 {
     AtomicSafetyHandle.CheckReadAndThrow(nativeArray.m_Safety);
     return(nativeArray.m_Buffer);
 }
 public static extern string GetWriterName(AtomicSafetyHandle handle);
 public static extern EnforceJobResult EnforceAllBufferJobsHaveCompletedAndRelease(AtomicSafetyHandle handle);
 public static extern bool IsTempMemoryHandle(AtomicSafetyHandle handle);
 public static extern EnforceJobResult EnforceAllBufferJobsHaveCompletedAndDisableReadWrite(AtomicSafetyHandle handle);
 public static extern void PrepareUndisposable(ref AtomicSafetyHandle handle);
 internal static extern void CheckWriteAndThrowNoEarlyOut(AtomicSafetyHandle handle);
 public static extern void SetAllowSecondaryVersionWriting(AtomicSafetyHandle handle, bool allowWriting);
 public static extern void CheckDeallocateAndThrow(AtomicSafetyHandle handle);
 public static extern void SetAllowReadOrWriteAccess(AtomicSafetyHandle handle, bool allowReadWriteAccess);
 public static extern void CheckGetSecondaryDataPointerAndThrow(AtomicSafetyHandle handle);
 public static extern void CheckWriteAndBumpSecondaryVersion(AtomicSafetyHandle handle);
Ejemplo n.º 30
0
 private static extern void GetWriter_Injected(ref AtomicSafetyHandle handle, out JobHandle ret);