#pragma once // Return Codes enum { CELL_SYNC2_ERROR_AGAIN = 0x80410C01, CELL_SYNC2_ERROR_INVAL = 0x80410C02, CELL_SYNC2_ERROR_NOMEM = 0x80410C04, CELL_SYNC2_ERROR_DEADLK = 0x80410C08, CELL_SYNC2_ERROR_PERM = 0x80410C09, CELL_SYNC2_ERROR_BUSY = 0x80410C0A, CELL_SYNC2_ERROR_STAT = 0x80410C0F, CELL_SYNC2_ERROR_ALIGN = 0x80410C10, CELL_SYNC2_ERROR_NULL_POINTER = 0x80410C11, CELL_SYNC2_ERROR_NOT_SUPPORTED_THREAD = 0x80410C12, CELL_SYNC2_ERROR_NO_NOTIFIER = 0x80410C13, CELL_SYNC2_ERROR_NO_SPU_CONTEXT_STORAGE = 0x80410C14, }; // Constants enum { CELL_SYNC2_NAME_MAX_LENGTH = 31, CELL_SYNC2_THREAD_TYPE_PPU_THREAD = 1 << 0, CELL_SYNC2_THREAD_TYPE_PPU_FIBER = 1 << 1, CELL_SYNC2_THREAD_TYPE_SPURS_TASK = 1 << 2, CELL_SYNC2_THREAD_TYPE_SPURS_JOBQUEUE_JOB = 1 << 3, CELL_SYNC2_THREAD_TYPE_SPURS_JOB = 1 << 8, }; struct CellSync2MutexAttribute { be_t sdkVersion; be_t threadTypes; be_t maxWaiters; bool recursive; u8 padding; char name[CELL_SYNC2_NAME_MAX_LENGTH + 1]; u8 reserved[86]; }; static_assert(sizeof(CellSync2MutexAttribute) == 128, "Wrong CellSync2MutexAttribute size"); struct CellSync2CondAttribute { be_t sdkVersion; be_t maxWaiters; char name[CELL_SYNC2_NAME_MAX_LENGTH + 1]; u8 reserved[90]; }; static_assert(sizeof(CellSync2CondAttribute) == 128, "Wrong CellSync2CondAttribute size"); struct CellSync2SemaphoreAttribute { be_t sdkVersion; be_t threadTypes; be_t maxWaiters; char name[CELL_SYNC2_NAME_MAX_LENGTH + 1]; u8 reserved[88]; }; static_assert(sizeof(CellSync2SemaphoreAttribute) == 128, "Wrong CellSync2SemaphoreAttribute size"); struct CellSync2QueueAttribute { be_t sdkVersion; be_t threadTypes; be_t elementSize; be_t depth; be_t maxPushWaiters; be_t maxPopWaiters; char name[CELL_SYNC2_NAME_MAX_LENGTH + 1]; u8 reserved[76]; }; static_assert(sizeof(CellSync2QueueAttribute) == 128, "Wrong CellSync2QueueAttribute size");