2024-08-25 04:08:24 +00:00
|
|
|
#ifndef GEN_QSYSTEMSEMAPHORE_H
|
|
|
|
#define GEN_QSYSTEMSEMAPHORE_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
class QSystemSemaphore;
|
|
|
|
#else
|
|
|
|
typedef struct QSystemSemaphore QSystemSemaphore;
|
|
|
|
#endif
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QSystemSemaphore* QSystemSemaphore_new(const char* key, size_t key_Strlen);
|
|
|
|
QSystemSemaphore* QSystemSemaphore_new2(const char* key, size_t key_Strlen, int initialValue);
|
|
|
|
QSystemSemaphore* QSystemSemaphore_new3(const char* key, size_t key_Strlen, int initialValue, uintptr_t mode);
|
|
|
|
void QSystemSemaphore_SetKey(QSystemSemaphore* self, const char* key, size_t key_Strlen);
|
2024-09-11 05:41:09 +00:00
|
|
|
void QSystemSemaphore_Key(const QSystemSemaphore* self, char** _out, int* _out_Strlen);
|
2024-08-25 04:08:24 +00:00
|
|
|
bool QSystemSemaphore_Acquire(QSystemSemaphore* self);
|
|
|
|
bool QSystemSemaphore_Release(QSystemSemaphore* self);
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QSystemSemaphore_Error(const QSystemSemaphore* self);
|
|
|
|
void QSystemSemaphore_ErrorString(const QSystemSemaphore* self, char** _out, int* _out_Strlen);
|
2024-08-29 07:01:51 +00:00
|
|
|
void QSystemSemaphore_SetKey2(QSystemSemaphore* self, const char* key, size_t key_Strlen, int initialValue);
|
|
|
|
void QSystemSemaphore_SetKey3(QSystemSemaphore* self, const char* key, size_t key_Strlen, int initialValue, uintptr_t mode);
|
2024-08-25 04:08:24 +00:00
|
|
|
bool QSystemSemaphore_Release1(QSystemSemaphore* self, int n);
|
|
|
|
void QSystemSemaphore_Delete(QSystemSemaphore* self);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|