mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-28 05:58:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
79
Brutal.Jolt/Generated/Classes/Semaphore.gen.cs
Normal file
79
Brutal.Jolt/Generated/Classes/Semaphore.gen.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
|
||||
namespace Brutal.JoltApi
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Implements a semaphore When we switch to C++20 we can use counting_semaphore to unify this
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/Semaphore.h#L31">Jolt/Core/Semaphore.h:31</see>
|
||||
/// <br/>
|
||||
/// <c>class Semaphore</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct Semaphore : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Constructor
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/Semaphore.h#L35">Jolt/Core/Semaphore.h:35</see>
|
||||
/// <br/>
|
||||
/// <c>Semaphore()</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Semaphore Create() => Jolt.PInvoke.Semaphore_Create();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Release the semaphore, signaling the thread waiting on the barrier that there may be work
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/Semaphore.h#L39">Jolt/Core/Semaphore.h:39</see>
|
||||
/// <br/>
|
||||
/// <c>void Release(uint inNumber = 1)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void Release(uint number = 1) => Jolt.PInvoke.Semaphore_Release(this, number);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Acquire the semaphore inNumber times
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/Semaphore.h#L42">Jolt/Core/Semaphore.h:42</see>
|
||||
/// <br/>
|
||||
/// <c>void Acquire(uint inNumber = 1)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void Acquire(uint number = 1) => Jolt.PInvoke.Semaphore_Acquire(this, number);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Get the current value of the semaphore
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/Semaphore.h#L45">Jolt/Core/Semaphore.h:45</see>
|
||||
/// <br/>
|
||||
/// <c>inline int GetValue() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public int GetValue() => Jolt.PInvoke.Semaphore_GetValue(this);
|
||||
|
||||
public void Dispose() => Jolt.PInvoke.Semaphore_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue