update structure, vis application
This commit is contained in:
+4
-12
@@ -5,7 +5,9 @@
|
||||
#define __AQUERY_ITC_USE_SEMPH__
|
||||
#define THREADING
|
||||
#endif
|
||||
|
||||
#ifdef THREADING
|
||||
#include "threading.h"
|
||||
#endif
|
||||
#include <unordered_map>
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
@@ -235,17 +237,7 @@ inline _This_Type* AQ_DupObject(_This_Type* __val) {
|
||||
~A_Semaphore() { }
|
||||
};
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
class A_Semaphore {
|
||||
private:
|
||||
void* native_handle;
|
||||
public:
|
||||
A_Semaphore(bool);
|
||||
void acquire();
|
||||
void release();
|
||||
~A_Semaphore();
|
||||
};
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
#ifdef __APPLE__
|
||||
#include <dispatch/dispatch.h>
|
||||
class A_Semaphore {
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "winhelper.h"
|
||||
#include "threading.h"
|
||||
#undef min
|
||||
#undef max
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "pch_msc.hpp"
|
||||
// Non-standard Extensions for MonetDBe, may break concurrency control!
|
||||
|
||||
#include "monetdbe.h"
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
#ifdef _MSCVER
|
||||
#if defined (_MSCVER) && defined(__cplusplus)
|
||||
#include "pch.hpp"
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "pch_msc.hpp"
|
||||
#include "threading.h"
|
||||
#include "libaquery.h"
|
||||
#include <thread>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ private:
|
||||
|
||||
|
||||
class A_Semphore;
|
||||
|
||||
struct Context;
|
||||
class TriggerHost {
|
||||
public:
|
||||
void* triggers;
|
||||
|
||||
+11
-1
@@ -55,6 +55,7 @@ public:
|
||||
_Ty* container;
|
||||
uint32_t size, capacity;
|
||||
typedef _Ty* iterator_t;
|
||||
typedef const _Ty* const_iterator;
|
||||
typedef std::conditional_t<is_cstr<_Ty>(), astring_view, _Ty> value_t;
|
||||
explicit vector_type(const uint32_t& size) : size(size), capacity(size) {
|
||||
if (GC::scratch_space != nullptr) {
|
||||
@@ -67,7 +68,7 @@ public:
|
||||
}
|
||||
// TODO: calloc for objects.
|
||||
}
|
||||
explicit constexpr vector_type(std::initializer_list<_Ty> _l) {
|
||||
constexpr vector_type(std::initializer_list<_Ty> _l) {
|
||||
size = capacity = _l.size();
|
||||
this->container = (_Ty*)malloc(sizeof(_Ty) * capacity);
|
||||
_Ty* _container = this->container;
|
||||
@@ -526,4 +527,13 @@ template <>
|
||||
vector_type<std::string_view>::vector_type(const char** container, uint32_t len,
|
||||
typename std::enable_if_t<true>*) noexcept;
|
||||
|
||||
template<class T>
|
||||
struct vector_type_std : vector_type<T> {
|
||||
vector_type_std() = default;
|
||||
vector_type_std(vector_type<T> v) : vector_type<T>(v) {}
|
||||
uint32_t size() const {
|
||||
return vector_type<T>::size;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+9
-1
@@ -15,7 +15,15 @@ struct SharedMemory
|
||||
SharedMemory(const char*);
|
||||
void FreeMemoryMap();
|
||||
};
|
||||
|
||||
class A_Semaphore {
|
||||
private:
|
||||
void* native_handle;
|
||||
public:
|
||||
A_Semaphore(bool);
|
||||
void acquire();
|
||||
void release();
|
||||
~A_Semaphore();
|
||||
};
|
||||
#endif // WIN32
|
||||
|
||||
#endif // WINHELPER
|
||||
|
||||
Reference in New Issue
Block a user