2024-11-17 06:21:37 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef MIQT_QT_GEN_QREADWRITELOCK_H
|
|
|
|
#define MIQT_QT_GEN_QREADWRITELOCK_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 QReadLocker;
|
|
|
|
class QReadWriteLock;
|
|
|
|
class QWriteLocker;
|
|
|
|
#else
|
|
|
|
typedef struct QReadLocker QReadLocker;
|
|
|
|
typedef struct QReadWriteLock QReadWriteLock;
|
|
|
|
typedef struct QWriteLocker QWriteLocker;
|
|
|
|
#endif
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock);
|
|
|
|
void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QReadWriteLock_LockForRead(QReadWriteLock* self);
|
|
|
|
bool QReadWriteLock_TryLockForRead(QReadWriteLock* self);
|
|
|
|
bool QReadWriteLock_TryLockForReadWithTimeout(QReadWriteLock* self, int timeout);
|
|
|
|
void QReadWriteLock_LockForWrite(QReadWriteLock* self);
|
|
|
|
bool QReadWriteLock_TryLockForWrite(QReadWriteLock* self);
|
|
|
|
bool QReadWriteLock_TryLockForWriteWithTimeout(QReadWriteLock* self, int timeout);
|
|
|
|
void QReadWriteLock_Unlock(QReadWriteLock* self);
|
2024-11-19 06:29:06 +00:00
|
|
|
void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass);
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QReadLocker_Unlock(QReadLocker* self);
|
|
|
|
void QReadLocker_Relock(QReadLocker* self);
|
2024-09-11 05:41:09 +00:00
|
|
|
QReadWriteLock* QReadLocker_ReadWriteLock(const QReadLocker* self);
|
2024-11-19 06:29:06 +00:00
|
|
|
void QReadLocker_Delete(QReadLocker* self, bool isSubclass);
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QWriteLocker_Unlock(QWriteLocker* self);
|
|
|
|
void QWriteLocker_Relock(QWriteLocker* self);
|
2024-09-11 05:41:09 +00:00
|
|
|
QReadWriteLock* QWriteLocker_ReadWriteLock(const QWriteLocker* self);
|
2024-11-19 06:29:06 +00:00
|
|
|
void QWriteLocker_Delete(QWriteLocker* self, bool isSubclass);
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|