start the process of making sync objects an extension

This commit is contained in:
Gregory Wells
2025-07-09 19:02:40 -04:00
parent 4b8f854b1f
commit a393d7b5b7
26 changed files with 66 additions and 37 deletions

View File

@@ -0,0 +1,16 @@
// #ifdef GN_EXT_SYNCHRONIZATION
#include "gryphn_semaphore.h"
#include "output_device/gryphn_output_device.h"
#include "instance/gryphn_instance.h"
gnReturnCode gnCreateSemaphore(gnSemaphore* semaphore, struct gnOutputDevice_t* device) {
*semaphore = malloc(sizeof(struct gnSemaphore_t));
(*semaphore)->device = device;
return device->instance->callingLayer->deviceFunctions._gnCreateSemaphore((*semaphore), device);
}
void gnDestroySemaphore(struct gnSemaphore_t* semaphore) {
semaphore->device->instance->callingLayer->deviceFunctions._gnDestroySemaphore(semaphore);
}
// #endif