Skip to content

Commit

Permalink
Bug ceph#98: Movement of an underscore for a data structure identifier
Browse files Browse the repository at this point in the history
A leading underscore was moved to the back of a data structure identifier.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
elfring authored and liewegas committed Jun 17, 2010
1 parent f650156 commit 9013832
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/common/WorkQueue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void ThreadPool::worker()
dout(10) << "worker start" << dendl;
while (!_stop) {
if (!_pause && work_queues.size()) {
_WorkQueue *wq;
WorkQueue_* wq;
int tries = work_queues.size();
bool did = false;
while (tries--) {
Expand Down Expand Up @@ -121,7 +121,7 @@ void ThreadPool::unpause()
_lock.Unlock();
}

void ThreadPool::drain(_WorkQueue *wq)
void ThreadPool::drain(WorkQueue_* wq)
{
dout(10) << "drain" << dendl;
_lock.Lock();
Expand Down
18 changes: 9 additions & 9 deletions src/common/WorkQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class ThreadPool {
int _draining;
Cond _wait_cond;

struct _WorkQueue {
struct WorkQueue_ {
string name;
_WorkQueue(string n) : name(n) {}
virtual ~_WorkQueue() {}
WorkQueue_(string n) : name(n) {}
virtual ~WorkQueue_() {}
virtual void _clear() = 0;
virtual bool _empty() = 0;
virtual void *_void_dequeue() = 0;
Expand All @@ -40,7 +40,7 @@ class ThreadPool {

public:
template<class T>
class WorkQueue : public _WorkQueue {
class WorkQueue : public WorkQueue_ {
ThreadPool *pool;

virtual bool _enqueue(T *) = 0;
Expand All @@ -60,7 +60,7 @@ class ThreadPool {
}

public:
WorkQueue(string n, ThreadPool *p) : _WorkQueue(n), pool(p) {
WorkQueue(string n, ThreadPool* p) : WorkQueue_(n), pool(p) {
pool->add_work_queue(this);
}
~WorkQueue() {
Expand Down Expand Up @@ -101,7 +101,7 @@ class ThreadPool {
};

private:
vector<_WorkQueue*> work_queues;
vector<WorkQueue_*> work_queues;
int last_work_queue;


Expand Down Expand Up @@ -138,10 +138,10 @@ class ThreadPool {
delete *p;
}

void add_work_queue(_WorkQueue *wq) {
void add_work_queue(WorkQueue_* wq) {
work_queues.push_back(wq);
}
void remove_work_queue(_WorkQueue *wq) {
void remove_work_queue(WorkQueue_* wq) {
unsigned i = 0;
while (work_queues[i] != wq)
i++;
Expand Down Expand Up @@ -182,7 +182,7 @@ class ThreadPool {
void pause();
void pause_new();
void unpause();
void drain(_WorkQueue *wq = 0);
void drain(WorkQueue_* wq = 0);
};


Expand Down

0 comments on commit 9013832

Please sign in to comment.