摘要:
常用于网络文件传输 正常的网络传输 4次 上下文切换与拷贝 如下图 零拷贝使用诸如 mmap+write 或 sendfile ,只有一次cpu拷贝+mmap/write 阅读全文
摘要:
代码大概如下 do { old_value = atomic_load(&c->count); // 获取当前值 //1 } while (!atomic_compare_exchange_weak(&c->count, &old_value, old_value + 1)); 1处c->count 阅读全文