C++: When should i use _disable() _enable()

时间:2015-10-06 08:24:52

标签: c++ visual-studio intrinsics

Visual Studio allows instructs to clear the processors interrupt flag via _disable or _enable (see link). When, it is recommended to use such tools. Especally, in view of performance. https://msdn.microsoft.com/en-us/library/tzkfha43.aspx

2 个答案:

答案 0 :(得分:2)

_disable() and _enable() are used, respectively, to disable and enable interrupts.

Read more about interrupts here.

If you're a C++ beginner, you probably don't need this, except if your goal is to write an operating system kernel.

答案 1 :(得分:0)

In your case, never. Just forget it exists. :)