root/software/read_test/src/URingExecDriver.h @ 33bb5385
| ef18eb33 | David Sorber | /********************************************************************
|
||
* This software is "commercial computer software" as defined in the *
|
||||
* Federal Acquisition Regulations and is subject to BlackLynx *
|
||||
* Inc's standard End User License Agreement. *
|
||||
* *
|
||||
* CONFIDENTIAL - All source code is the propriety and confidential *
|
||||
* information of BlackLynx Inc. *
|
||||
* *
|
||||
* Copyright 2022 BlackLynx Inc. *
|
||||
* Unpublished -- all rights reserved under the copyright laws *
|
||||
* of the United States. *
|
||||
********************************************************************/
|
||||
#ifndef __BLACKLYNX_URING_EXECDRIVER_H__
|
||||
#define __BLACKLYNX_URING_EXECDRIVER_H__
|
||||
#include <cstdint>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
| 864b608c | David Sorber | #include "liburing.h"
|
||
| ef18eb33 | David Sorber | #include "Chunk.h"
|
||
#include "ExecDriver.h"
|
||||
#include "Utilities/ProtectedAndSynchronizedQueue.h"
|
||||
namespace BlackLynx
|
||||
{
|
||||
namespace SearchLynx
|
||||
{
|
||||
class URingExecDriver : public ExecDriver
|
||||
{
|
||||
public:
|
||||
| 864b608c | David Sorber | static const uint32_t QUEUE_DEPTH = 256;
|
||
| ef18eb33 | David Sorber | URingExecDriver(
|
||
const std::string& inputFile,
|
||||
uint32_t numReaderThreads);
|
||||
~URingExecDriver() override;
|
||||
void start() override;
|
||||
private:
|
||||
void readerThreadBody(
|
||||
chunk_queue_t* inQueue,
|
||||
chunk_queue_t* outQueue) override;
|
||||
| 864b608c | David Sorber | |||
void waitForCompletion(chunk_queue_t* outQueue);
|
||||
struct io_uring m_ring;
|
||||
uint32_t m_ioCounter;
|
||||
| ef18eb33 | David Sorber | };
|
||
}
|
||||
}
|
||||
#endif // __BLACKLYNX_URING_EXECDRIVER_H__
|