SOURCE DUMP v1

This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit fb20299e9d

View file

@ -0,0 +1,84 @@
// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/Semaphore.h#L31">Jolt/Core/Semaphore.h:31</see>
/// <br/>
/// <c>class Semaphore</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Implements a semaphore
/// When we switch to C++20 we can use counting_semaphore to unify this
/// </code>
/// </remarks>
[InteropHandle]
public readonly partial struct Semaphore : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/Semaphore.h#L35">Jolt/Core/Semaphore.h:35</see>
/// <br/>
/// <c>Semaphore()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Constructor
/// </para>
/// </remarks>
public static Semaphore Create() => Jolt.PInvoke.Semaphore_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/Semaphore.h#L39">Jolt/Core/Semaphore.h:39</see>
/// <br/>
/// <c>void Release(uint inNumber = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Release the semaphore, signaling the thread waiting on the barrier that there may be work
/// </para>
/// </remarks>
public void Release(uint number) => Jolt.PInvoke.Semaphore_Release(this, number);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/Semaphore.h#L42">Jolt/Core/Semaphore.h:42</see>
/// <br/>
/// <c>void Acquire(uint inNumber = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Acquire the semaphore inNumber times
/// </para>
/// </remarks>
public void Acquire(uint number) => Jolt.PInvoke.Semaphore_Acquire(this, number);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/Semaphore.h#L45">Jolt/Core/Semaphore.h:45</see>
/// <br/>
/// <c>inline int GetValue() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get the current value of the semaphore
/// </para>
/// </remarks>
public int GetValue() => Jolt.PInvoke.Semaphore_GetValue(this);
public void Dispose() => Jolt.PInvoke.Semaphore_Destroy(this);
}
}