Implement Missing NGS2 System Functions Lock & Unlock (#1542)

* Implement NGS2 SystemLock

* Implement NGS2 SystemUnlock

* Add guard for system_handle value of 0

* Return correct error code from system_handle guard

* Validate NGS2 system handles before locking

---------

Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Mr. Big Britchesandnmzik authored and GitHub committed 2026-10-16 01:39:40 +02:00
1 parent 57c4a6ee11
commit 6568fe9a84
3 files changed
+44 -8

No files matched your search

+2
View File
@@ -33,6 +33,8 @@ int KYTY_SYSV_ABI Ngs2SystemCreate(const Ngs2SystemOption* option,
const Ngs2ContextBufferInfo* buffer_info, uintptr_t* handle);
int KYTY_SYSV_ABI Ngs2SystemGetInfo(uintptr_t system_handle, Ngs2SystemInfo* info,
size_t info_size);
int KYTY_SYSV_ABI Ngs2SystemLock(uintptr_t system_handle);
int KYTY_SYSV_ABI Ngs2SystemUnlock(uintptr_t system_handle);
int KYTY_SYSV_ABI Ngs2SystemSetGrainSamples(uintptr_t system_handle, uint32_t num_samples);
int KYTY_SYSV_ABI Ngs2RackQueryBufferSize(uint32_t rack_id, const Ngs2RackOption* option,
Ngs2ContextBufferInfo* buffer_info);