2024-11-17 06:21:37 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef MIQT_QT_GEN_QMUTEX_H
|
|
|
|
#define MIQT_QT_GEN_QMUTEX_H
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
#include "../libmiqt/libmiqt.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
|
2024-08-25 04:08:24 +00: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
|
|
|
|
|
|
|
|
QBasicMutex* QBasicMutex_new();
|
|
|
|
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);
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QBasicMutex_IsRecursive2(const QBasicMutex* self);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QBasicMutex_Delete(QBasicMutex* self);
|
|
|
|
|
|
|
|
QMutex* QMutex_new();
|
2024-09-18 00:12:02 +00:00
|
|
|
QMutex* QMutex_new2(int mode);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QMutex_Lock(QMutex* self);
|
|
|
|
bool QMutex_TryLock(QMutex* self);
|
|
|
|
void QMutex_Unlock(QMutex* self);
|
|
|
|
bool QMutex_TryLock2(QMutex* self);
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QMutex_IsRecursive(const QMutex* self);
|
2024-08-25 04:08:24 +00:00
|
|
|
bool QMutex_TryLock1(QMutex* self, int timeout);
|
|
|
|
void QMutex_Delete(QMutex* self);
|
|
|
|
|
|
|
|
QRecursiveMutex* QRecursiveMutex_new();
|
|
|
|
void QRecursiveMutex_Delete(QRecursiveMutex* self);
|
|
|
|
|
|
|
|
QMutexLocker* QMutexLocker_new(QBasicMutex* m);
|
|
|
|
QMutexLocker* QMutexLocker_new2(QRecursiveMutex* m);
|
|
|
|
void QMutexLocker_Unlock(QMutexLocker* self);
|
|
|
|
void QMutexLocker_Relock(QMutexLocker* self);
|
2024-09-11 05:41:09 +00:00
|
|
|
QMutex* QMutexLocker_Mutex(const QMutexLocker* self);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QMutexLocker_Delete(QMutexLocker* self);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|