2024-11-17 19:21:37 +13:00
|
|
|
#pragma once
|
|
|
|
#ifndef MIQT_QT_GEN_QSYSTEMSEMAPHORE_H
|
|
|
|
#define MIQT_QT_GEN_QSYSTEMSEMAPHORE_H
|
2024-08-25 16:08:24 +12:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
2024-10-16 18:07:56 +13:00
|
|
|
#include "../libmiqt/libmiqt.h"
|
2024-09-15 10:29:05 +12:00
|
|
|
|
2024-08-25 16:08:24 +12:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
class QSystemSemaphore;
|
|
|
|
#else
|
|
|
|
typedef struct QSystemSemaphore QSystemSemaphore;
|
|
|
|
#endif
|
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key);
|
|
|
|
QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue);
|
|
|
|
QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode);
|
2025-02-01 13:45:16 +13:00
|
|
|
void QSystemSemaphore_setKey(QSystemSemaphore* self, struct miqt_string key);
|
|
|
|
struct miqt_string QSystemSemaphore_key(const QSystemSemaphore* self);
|
|
|
|
bool QSystemSemaphore_acquire(QSystemSemaphore* self);
|
|
|
|
bool QSystemSemaphore_release(QSystemSemaphore* self);
|
|
|
|
int QSystemSemaphore_error(const QSystemSemaphore* self);
|
|
|
|
struct miqt_string QSystemSemaphore_errorString(const QSystemSemaphore* self);
|
|
|
|
void QSystemSemaphore_setKey2(QSystemSemaphore* self, struct miqt_string key, int initialValue);
|
|
|
|
void QSystemSemaphore_setKey3(QSystemSemaphore* self, struct miqt_string key, int initialValue, int mode);
|
|
|
|
bool QSystemSemaphore_release1(QSystemSemaphore* self, int n);
|
|
|
|
void QSystemSemaphore_delete(QSystemSemaphore* self);
|
2024-08-25 16:08:24 +12:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
2025-02-01 13:45:16 +13:00
|
|
|
#endif
|
2024-08-25 16:08:24 +12:00
|
|
|
|
|
|
|
#endif
|