2024-11-17 06:21:37 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef MIQT_QT6_GEN_QMUTEX_H
|
|
|
|
#define MIQT_QT6_GEN_QMUTEX_H
|
2024-10-20 05:21:03 +00:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
|
|
|
#include "../libmiqt/libmiqt.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
class QBasicMutex;
|
|
|
|
class QMutex;
|
|
|
|
class QRecursiveMutex;
|
|
|
|
#else
|
|
|
|
typedef struct QBasicMutex QBasicMutex;
|
|
|
|
typedef struct QMutex QMutex;
|
|
|
|
typedef struct QRecursiveMutex QRecursiveMutex;
|
|
|
|
#endif
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex);
|
2024-10-20 05:21:03 +00:00
|
|
|
void QBasicMutex_Lock(QBasicMutex* self);
|
|
|
|
void QBasicMutex_Unlock(QBasicMutex* self);
|
|
|
|
bool QBasicMutex_TryLock(QBasicMutex* self);
|
|
|
|
bool QBasicMutex_TryLock2(QBasicMutex* self);
|
2024-11-19 06:29:06 +00:00
|
|
|
void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass);
|
2024-10-20 05:21:03 +00:00
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex);
|
2024-10-20 05:21:03 +00:00
|
|
|
bool QMutex_TryLock(QMutex* self);
|
|
|
|
bool QMutex_TryLockWithTimeout(QMutex* self, int timeout);
|
2024-11-19 06:29:06 +00:00
|
|
|
void QMutex_Delete(QMutex* self, bool isSubclass);
|
2024-10-20 05:21:03 +00:00
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex);
|
2024-10-20 05:21:03 +00:00
|
|
|
void QRecursiveMutex_Lock(QRecursiveMutex* self);
|
|
|
|
bool QRecursiveMutex_TryLock(QRecursiveMutex* self);
|
|
|
|
void QRecursiveMutex_Unlock(QRecursiveMutex* self);
|
|
|
|
bool QRecursiveMutex_TryLock2(QRecursiveMutex* self);
|
|
|
|
bool QRecursiveMutex_TryLock1(QRecursiveMutex* self, int timeout);
|
2024-11-19 06:29:06 +00:00
|
|
|
void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass);
|
2024-10-20 05:21:03 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|