amazzzzzing

导航

2024年3月11日 #

锁的实现

摘要: 锁的实现 互斥锁 锁的开销 机制 摘录自:https://www.cnblogs.com/MrLiuZF/p/15143976.html 现在锁的机制一般使用futex(fast userspace mutexes),即内核态和用户态的混合机制。 在futex之前,内核维护一个对象,这个对象对所有进 阅读全文

posted @ 2024-03-11 12:34 amazzzzzing 阅读(72) 评论(0) 推荐(0)

rvalue

摘要: 右值和右值引用 ref https://en.cppreference.com/w/cpp/language/reference https://www.cnblogs.com/KillerAery/p/12802771.html 左值和右值 左值:表达式结束之后仍然存在的持久对象; 右值:表达式结 阅读全文

posted @ 2024-03-11 12:29 amazzzzzing 阅读(19) 评论(0) 推荐(0)

stdarg

摘要: stdarg Question How does va_arg (and so on) implemented? What will happen if you call printf("%d", char)? Answer Question 1: It is not implemented as 阅读全文

posted @ 2024-03-11 12:28 amazzzzzing 阅读(31) 评论(0) 推荐(0)