/ src / Ryujinx.Graphics.Device / ISynchronizationManager.cs
ISynchronizationManager.cs
 1  using Ryujinx.Common.Logging;
 2  using System;
 3  using System.Threading;
 4  
 5  namespace Ryujinx.Graphics.Device
 6  {
 7      /// <summary>
 8      /// Synchronization manager interface.
 9      /// </summary>
10      public interface ISynchronizationManager
11      {
12          /// <summary>
13          /// Increment the value of a syncpoint with a given id.
14          /// </summary>
15          /// <param name="id">The id of the syncpoint</param>
16          /// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
17          /// <returns>The incremented value of the syncpoint</returns>
18          uint IncrementSyncpoint(uint id);
19  
20          /// <summary>
21          /// Get the value of a syncpoint with a given id.
22          /// </summary>
23          /// <param name="id">The id of the syncpoint</param>
24          /// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
25          /// <returns>The value of the syncpoint</returns>
26          uint GetSyncpointValue(uint id);
27  
28          /// <summary>
29          /// Wait on a syncpoint with a given id at a target threshold.
30          /// The callback will be called once the threshold is reached and will automatically be unregistered.
31          /// </summary>
32          /// <param name="id">The id of the syncpoint</param>
33          /// <param name="threshold">The target threshold</param>
34          /// <param name="timeout">The timeout</param>
35          /// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
36          /// <returns>True if timed out</returns>
37          bool WaitOnSyncpoint(uint id, uint threshold, TimeSpan timeout);
38      }
39  }