早教吧 育儿知识 作业答案 考试题库 百科 知识分享

linuxmanpselect中的race含义Thereasonthatpselect()isneededisthatifonewantstowaitforeitherasignalorforafiledescriptortobecomeready,thenanatomictestisneededtopreventraceconditions.这段话中,thenanatomictestis

题目详情
linux man pselect 中的race含义
The reason that pselect() is needed is that if one wants to wait for
either a signal or for a file descriptor to become ready,then an
atomic test is needed to prevent race conditions.
这段话中,then an atomic test is needed to prevent race conditions 中的race 与 atomic 应该如何理解
▼优质解答
答案和解析
atomic 自动地【前后文:is equivalent to atomically executing the following calls:】race 竞争【前后文:hang indefinitely if the signal arrived just after the test but just before the call】...