Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/Emulator/Main/Core/Machine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class Machine : IMachine, IDisposable, IHasPreservableState
{
public Machine(bool createLocalTimeSource = false)
{
machineUid = ++count;
atomicState = new AtomicState(this);

collectionSync = new object();
Expand Down Expand Up @@ -1305,6 +1306,8 @@ public RealTimeClockMode RealTimeClockMode
}
}

public ulong Uid => machineUid;

public Platform Platform { get; set; }

public bool IsPaused
Expand Down Expand Up @@ -1894,8 +1897,10 @@ private void InitializeInvalidatedAddressesList(ICPU cpu)

private readonly MultiTree<IPeripheral, IRegistrationPoint> registeredPeripherals;
private readonly object disposedSync;
private readonly ulong machineUid;

private const int InitialDirtyListLength = 1 << 16;
private static ulong count = 0;

private sealed class PausedState : IDisposable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Emulator/Main/Peripherals/IMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ public interface IMachine : IEmulationElement

Platform Platform { get; set; }

ulong Uid { get; }

bool IsPaused { get; }

TimeStamp ElapsedVirtualTime { get; }
Expand Down