diff --git a/include/gryphn/gryphn.h b/include/gryphn/gryphn.h index eb7f6b4..8d462d8 100644 --- a/include/gryphn/gryphn.h +++ b/include/gryphn/gryphn.h @@ -17,3 +17,5 @@ #include #include #include +#include +#include diff --git a/src/core/sync/fence/gryphn_fence.h b/src/core/sync/fence/gryphn_fence.h new file mode 100644 index 0000000..151fd83 --- /dev/null +++ b/src/core/sync/fence/gryphn_fence.h @@ -0,0 +1,13 @@ +#pragma once +#include "core/output_device/gryphn_output_device.h" + + +typedef struct gnFence_t { + struct gnPlatformFence_t* fence; +} gnFence; + +gnReturnCode gnCreateFence(struct gnFence_t* fence, struct gnOutputDevice_t* device); +void gnSignalFence(struct gnFence_t* fence); +void gnWaitForFence(struct gnFence_t* fence, uint64_t timeout); +void gnResetFence(struct gnFence_t* fence); +void gnDestroyFence(struct gnFence_t* fence); diff --git a/src/core/sync/semaphore/gryphn_semaphore.h b/src/core/sync/semaphore/gryphn_semaphore.h new file mode 100644 index 0000000..a4607dc --- /dev/null +++ b/src/core/sync/semaphore/gryphn_semaphore.h @@ -0,0 +1,9 @@ +#pragma once +#include "core/output_device/gryphn_output_device.h" + +typedef struct gnSemaphore_t { + struct gnPlatformSemaphore_t* semaphore; +} gnSemaphore; + +gnReturnCode gnCreateSemaphore(struct gnSemaphore_t* semaphore, struct gnOutputDevice_t* device); +void gnDestroySemaphore(struct gnSemaphore_t* semaphore);