-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
407 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.2.2 | ||
6.2.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.2.4 | ||
Architecture: aarch64 | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.2.4 | ||
Architecture: amd64 | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.2.4 | ||
Architecture: i386 | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.2.4 | ||
Architecture: ppc64le | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
//--------------------------------------------------------------------------- | ||
// E L E N A P r o j e c t: ELENA Debugger Adapater | ||
// | ||
// This file contains the DPA queue declarations | ||
// | ||
// (C)2024, by Aleksey Rakov | ||
//--------------------------------------------------------------------------- | ||
|
||
#ifndef DPA_QUEUE_H | ||
#define DPA_QUEUE_H | ||
|
||
#include <queue> | ||
#include <condition_variable> | ||
#include <mutex> | ||
#include <optional> | ||
|
||
namespace dpa | ||
{ | ||
// --- ContentReader --- | ||
template <typename T> | ||
class ThreadQueue | ||
{ | ||
bool _closed = false; | ||
std::queue<T> _queue; | ||
std::condition_variable _cv; | ||
std::mutex _mutex; | ||
|
||
public: | ||
void close(); | ||
|
||
void put(const T& in); | ||
std::optional<T> take(); | ||
}; | ||
|
||
template <typename T> | ||
void ThreadQueue<T> :: close() | ||
{ | ||
std::unique_lock<std::mutex> lock(_mutex); | ||
_closed = true; | ||
_cv.notify_all(); | ||
} | ||
|
||
template <typename T> | ||
void ThreadQueue<T> :: put(const T& in) | ||
{ | ||
std::unique_lock<std::mutex> lock(_mutex); | ||
auto notify = _queue.size() == 0 && !_closed; | ||
_queue.push(in); | ||
if (notify) | ||
_cv.notify_all(); | ||
} | ||
|
||
template <typename T> | ||
std::optional<T> ThreadQueue<T> :: take() | ||
{ | ||
std::unique_lock<std::mutex> lock(_mutex); | ||
_cv.wait(lock, [&] { return _queue.size() > 0 || _closed; }); | ||
if (_queue.size() == 0) { | ||
return std::optional<T>(); | ||
} | ||
auto out = std::move(_queue.front()); | ||
_queue.pop(); | ||
return std::optional<T>(std::move(out)); | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//--------------------------------------------------------------------------- | ||
// E L E N A P r o j e c t: ELENA Debugger Adapater | ||
// | ||
// This file contains the DPA I/O class implementations | ||
// | ||
// (C)2024, by Aleksey Rakov | ||
//--------------------------------------------------------------------------- | ||
|
||
#include "dpa_stream.h" | ||
|
||
using namespace dpa; | ||
|
||
ContentReader :: ~ContentReader() | ||
{ | ||
|
||
} | ||
|
||
bool ContentReader :: isOpen() | ||
{ | ||
return false; | ||
} | ||
|
||
void ContentReader :: close() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//--------------------------------------------------------------------------- | ||
// E L E N A P r o j e c t: ELENA Debugger Adapater | ||
// | ||
// This file contains the DPA I/O class declarations | ||
// | ||
// (C)2024, by Aleksey Rakov | ||
//--------------------------------------------------------------------------- | ||
|
||
#ifndef DPA_STREAM_H | ||
#define DPA_STREAM_H | ||
|
||
namespace dpa | ||
{ | ||
//using RequestHandler = | ||
// std::function<void(const void* request)>; | ||
|
||
// --- ContentReader --- | ||
class ContentReader | ||
{ | ||
|
||
public: | ||
bool isOpen(); | ||
|
||
void close(); | ||
|
||
ContentReader() = default; | ||
virtual ~ContentReader(); | ||
}; | ||
} | ||
|
||
#endif |
Oops, something went wrong.