2024-11-17 19:21:37 +13:00
|
|
|
#pragma once
|
|
|
|
#ifndef MIQT_QT_GEN_QMUTEX_H
|
|
|
|
#define MIQT_QT_GEN_QMUTEX_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 QBasicMutex;
|
|
|
|
class QMutex;
|
|
|
|
class QMutexLocker;
|
|
|
|
class QRecursiveMutex;
|
|
|
|
#else
|
|
|
|
typedef struct QBasicMutex QBasicMutex;
|
|
|
|
typedef struct QMutex QMutex;
|
|
|
|
typedef struct QMutexLocker QMutexLocker;
|
|
|
|
typedef struct QRecursiveMutex QRecursiveMutex;
|
|
|
|
#endif
|
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
QBasicMutex* QBasicMutex_new();
|
2025-02-01 13:45:16 +13:00
|
|
|
void QBasicMutex_lock(QBasicMutex* self);
|
|
|
|
void QBasicMutex_unlock(QBasicMutex* self);
|
|
|
|
bool QBasicMutex_tryLock(QBasicMutex* self);
|
|
|
|
bool QBasicMutex_tryLock2(QBasicMutex* self);
|
|
|
|
bool QBasicMutex_isRecursive(QBasicMutex* self);
|
|
|
|
bool QBasicMutex_isRecursive2(const QBasicMutex* self);
|
|
|
|
void QBasicMutex_delete(QBasicMutex* self);
|
2024-08-25 16:08:24 +12:00
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
QMutex* QMutex_new();
|
|
|
|
QMutex* QMutex_new2(int mode);
|
|
|
|
void QMutex_virtbase(QMutex* src, QBasicMutex** outptr_QBasicMutex);
|
2025-02-01 13:45:16 +13:00
|
|
|
void QMutex_lock(QMutex* self);
|
|
|
|
bool QMutex_tryLock(QMutex* self);
|
|
|
|
void QMutex_unlock(QMutex* self);
|
|
|
|
bool QMutex_tryLock2(QMutex* self);
|
|
|
|
bool QMutex_isRecursive(const QMutex* self);
|
|
|
|
bool QMutex_tryLock1(QMutex* self, int timeout);
|
|
|
|
void QMutex_delete(QMutex* self);
|
2024-08-25 16:08:24 +12:00
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
QRecursiveMutex* QRecursiveMutex_new();
|
2025-02-01 13:45:16 +13:00
|
|
|
void QRecursiveMutex_delete(QRecursiveMutex* self);
|
2024-08-25 16:08:24 +12:00
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
QMutexLocker* QMutexLocker_new(QBasicMutex* m);
|
|
|
|
QMutexLocker* QMutexLocker_new2(QRecursiveMutex* m);
|
2025-02-01 13:45:16 +13:00
|
|
|
void QMutexLocker_unlock(QMutexLocker* self);
|
|
|
|
void QMutexLocker_relock(QMutexLocker* self);
|
|
|
|
QMutex* QMutexLocker_mutex(const QMutexLocker* self);
|
|
|
|
void QMutexLocker_delete(QMutexLocker* 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
|