Example #1
0
        public static void WriteInt32Exclusive(AMemory Memory, long Position, int Value)
        {
            while (!Memory.AcquireAddress(Position))
            {
                Thread.Yield();
            }

            Memory.WriteInt32(Position, Value);

            Memory.ReleaseAddress(Position);
        }
Example #2
0
        public static int ReadInt32Exclusive(AMemory Memory, long Position)
        {
            while (!Memory.AcquireAddress(Position))
            {
                Thread.Yield();
            }

            int Value = Memory.ReadInt32(Position);

            Memory.ReleaseAddress(Position);

            return(Value);
        }