1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -25,7 +25,7 @@
* jrodriguez@calpont.com *
* *
***************************************************************************/
#include <deque>
#include <pthread.h>
@ -40,8 +40,9 @@
/**
* @brief definition of the block request queue as stl std::priority_queue
**/
namespace dbbc {
namespace dbbc
{
typedef std::deque<fileRequest*> fileBlockRequestQueue_t;
/**
@ -49,63 +50,67 @@ typedef std::deque<fileRequest*> fileBlockRequestQueue_t;
**/
class fileBlockRequestQueue {
class fileBlockRequestQueue
{
public:
/**
* @brief default ctor
**/
fileBlockRequestQueue();
/**
* @brief dtor
**/
virtual ~fileBlockRequestQueue();
/**
* @brief default ctor
**/
fileBlockRequestQueue();
/**
* @brief add a request to the queue
**/
int push(fileRequest& blk);
/**
* @brief dtor
**/
virtual ~fileBlockRequestQueue();
/**
* @brief get the next request from the queue and delete it from the queue
**/
fileRequest* pop(void);
/**
* @brief add a request to the queue
**/
int push(fileRequest& blk);
/**
* @brief true if no reuquests are in the queue. false if there are requests in the queue
**/
bool empty() const;
/**
* @brief get the next request from the queue and delete it from the queue
**/
fileRequest* pop(void);
/**
* @brief number of requests in the queue
**/
uint32_t size() const {return queueSize;}
/**
* @brief true if no reuquests are in the queue. false if there are requests in the queue
**/
bool empty() const;
/**
* @brief number of requests in the queue
**/
uint32_t size() const
{
return queueSize;
}
/**
* @brief queue will stop accecpting requests in preparation for the dtor
**/
void stop();
/**
* @brief queue will stop accecpting requests in preparation for the dtor
**/
void stop();
protected:
pthread_mutex_t mutex;
pthread_cond_t notEmpty;
fileBlockRequestQueue_t fbQueue;
uint32_t queueSize;
uint32_t readersWaiting;
pthread_mutex_t mutex;
pthread_cond_t notEmpty;
fileBlockRequestQueue_t fbQueue;
uint32_t queueSize;
uint32_t readersWaiting;
private:
// do not implement
fileBlockRequestQueue(const fileBlockRequestQueue& Q){}
const fileBlockRequestQueue& operator=(const fileBlockRequestQueue& Q);
// do not implement
fileBlockRequestQueue(const fileBlockRequestQueue& Q) {}
const fileBlockRequestQueue& operator=(const fileBlockRequestQueue& Q);
/**
* @brief pointer to the next request to be popped from the queue
**/
fileRequest* top() const;
/**
* @brief pointer to the next request to be popped from the queue
**/
fileRequest* top() const;
};
}
#endif