加载中
RobotThread.cpp

#include "RobotThread.h" RobotThread::RobotThread(int argc, char** pArgv, const char * topic) : m_Init_argc(argc), m_pInit_argv(pArgv), m_topic(topic) {/** Constructor for the ....

ceph源码—条件变量

/** * context to signal a cond * * Generic context to signal a cond and store the return value. We * assume the caller is holding the appropriate lock. */ class C_Cond : p...

06/20 16:10
18
unique_ptr、scoped_ptr、shared_ptr的区别

unique_ptr:禁止拷贝,只能通过Move语义来转移。 release方法放弃内部对象的所有权,将内部指针置为空, 返回所内部对象的指针, 此指针需要手动释放 reset方法销毁内部对象并接受新的对象的所...

06/13 10:44
36
ceph源码——map emplace

void ECBackend::start_read_op( int priority, map<hobject_t, set<int>> &want_to_read, map<hobject_t, read_request_t> &to_read, OpRequestRef _op, bool do_redundant_reads...

06/12 14:39
13
ceph源码片断——类型转换

operator ceph_timespec() const { ceph_timespec ts; ts.tv_sec = sec(); ts.tv_nsec = nsec(); return ts; }...

06/06 15:31
4
ceph源码——using关键字

using lock_guard = std::unique_lock<decltype(watch_lock)>; using unique_lock = std::unique_lock<decltype(watch_lock)>; using shared_lock = boost::shared_lock<decltype(wa...

06/06 14:10
4
ceph源码——reinterpret_cast

void Objecter::handle_watch_notify(MWatchNotify *m) { shared_lock l(rwlock); if (!initialized.read()) { return; } LingerOp *info = reinterpret_cast<LingerOp*>(m->co...

06/06 14:04
2
ceph Dynamic backoff throttle

1 ------ 2 TOPIC: 3 ------ 4 Dynamic backoff throttle is been introduced in the Jewel timeframe to produce 5 a stable and improved performance out from filestore...

05/09 15:42
7
ceph源码片段——std::move

FileStore::Op *FileStore::build_op(vector<Transaction>& tls, Context *onreadable, Context *onreadable_sync, TrackedOpRef osd_op) { uint64_t bytes = 0, ops...

05/09 14:34
3
ceph源码片段——局部变量的cond

void Client::wait_on_list(list<Cond*>& ls) { Cond cond; ls.push_back(&cond); cond.Wait(client_lock); ls.remove(&cond); }...

05/06 15:08
7
关联式容器 - map

另外在使用 map 时,要注意 [] 的一个使用技巧,来看一个例子: #include <map> // 单词 -> 出现次数的 map std::map<std::string, size_t> words_map; // 统计每个单词出现的次数 for (c...

c++
04/29 15:58
4
c++的几种智能指针

scoped_ptr, used to contain ownership of a dynamically allocated object to the current scope; scoped_array, which provides scoped ownership for a dynamically allocated array; sh...

c++
04/28 14:30
19
ceph源码片段——boost::intrusive_ptr

//typedef boost::intrusive_ptr<PG> PGRef; for (list<PGRef>::iterator i = to_remove.begin(); i != to_remove.end(); to_remove.erase(i++)) { RWLock::WLocker loc...

04/28 10:07
6
ceph源码片段——c++引用

void ECBackend::start_read_op( int priority, map<hobject_t, read_request_t, hobject_t::BitwiseComparator> &to_read, OpRequestRef _op, bool do_redundant_reads, bool for...

04/26 17:30
11
解决vdbench的打印messages日志的问题

使用vdbench50406版本,在配置文件最上面增加: messagescan=no

04/24 16:07
22
C++ static、const和static const 以及它们的初始化

#include <iostream> usingnamespace std; class A{ public: A(int a); staticvoid print();//静态成员函数 private: static int aa;//静态数据成员的声明 ...

04/10 15:03
21
ament_package 包

ament_package 在ament_package,这个库包含一个单一的ament Python包,提供了查找和解析package.xml文件的API。 所有的ament包必须包含一个package.xml文件,在包的根目录,不管它们的底层构...

04/08 22:12
8
c++ operator隐式类型转换

#include <iostream> #include <sstream> ...

04/08 19:59
22
c++11中auto&&是什么意思?

By using auto&& var = <initializer> you are saying: I will accept any initializer regardless of whether it is an lvalue or rvalue expression and I will preserve its constness. T...

04/08 19:41
56
使用Jekyll托管github pages的好处

The main advantages of Jekyll are: You can use Markdown instead of HTML. Markdown is simpler to read and write. You can add a Jekyll theme to your site without copying CSS files...

04/07 15:47
20

没有更多内容

加载失败,请刷新页面

下一页

返回顶部
顶部