msg/Accepter.cc \
msg/DispatchQueue.cc \
msg/Message.cc \
+ common/RefCountedObj.cc \
msg/Messenger.cc \
msg/Pipe.cc \
msg/SimpleMessenger.cc \
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+ *
+ */
+
+#include "common/RefCountedObj.h"
+
+void intrusive_ptr_add_ref(RefCountedObject *p) {
+ p->get();
+}
+void intrusive_ptr_release(RefCountedObject *p) {
+ p->put();
+}
+
#ifndef CEPH_REFCOUNTEDOBJ_H
#define CEPH_REFCOUNTEDOBJ_H
+#include "common/Mutex.h"
+#include "common/Cond.h"
#include "include/atomic.h"
}
};
+void intrusive_ptr_add_ref(RefCountedObject *p);
+void intrusive_ptr_release(RefCountedObject *p);
#endif
#define dout_subsys ceph_subsys_ms
-void intrusive_ptr_add_ref(Message *p)
-{
- p->get();
-}
-
-void intrusive_ptr_release(Message *p)
-{
- p->put();
-}
-
void Message::encode(uint64_t features, bool datacrc)
{
// encode and copy out of *m
extern void encode_message(Message *m, uint64_t features, bufferlist& bl);
extern Message *decode_message(CephContext *cct, bufferlist::iterator& bl);
-void intrusive_ptr_add_ref(Message *p);
-void intrusive_ptr_release(Message *p);
-
-
#endif