C language function:GetCurrentProcessorNumber sample codes

Search sample code in the internet.It is the result.


TITLE : Object pooling and thread safety | Jon Skeet's coding blog
private static extern int GetCurrentProcessorNumber();.......
http://codeblog.jonskeet.uk/2014/08/01/object-pooling-and-thread-safety/


TITLE : Object pooling and thread safety | Jon Skeet's coding blog
var i = GetCurrentProcessorNumber();.......
http://codeblog.jonskeet.uk/2014/08/01/object-pooling-and-thread-safety/
TITLE : GetCurrentProcessorNumber function (Windows)
DWORD WINAPI GetCurrentProcessorNumber(void);.......
http://msdn.microsoft.com/ja-jp/library/windows/desktop/ms683181(v=vs.85).aspx
TITLE : Compare Windows* threads, OpenMP*, Intel‘¬ Threading Building Blocks for parallel programming | Intel‘¬ Software
I think one can also mention atomic/interlocked API. TBB has the best support (finest grained), then Win Threads, and then OpenMP. Also Win Threads contains some rather interesting functions like GetCurrentProcessorNumber(), FlushProcessWriteBuffers(), GetLogicalProcessorInformation(), etc........
http://software.intel.com/en-us/blogs/2008/12/16/compare-windows-threads-openmp-intel-threading-building-blocks-for-parallel-programming
TITLE : c++ - How can you find the processor number a thread is running on? - Stack Overflow
I have found the function GetCurrentProcessorNumber() for Windows, but this only works on Windows Vista and later. Is there a method that works on Windows XP?.......
http://stackoverflow.com/questions/2215063/how-can-you-find-the-processor-number-a-thread-is-running-on
TITLE : c++ - How can you find the processor number a thread is running on? - Stack Overflow
A short look at the implementation of GetCurrentProcessorNumber() on Win7 x64 shows that they use a different mechanism to get the processor number, but in my (few) tests the results were the same for my home-brewn and the official function........
http://stackoverflow.com/questions/2215063/how-can-you-find-the-processor-number-a-thread-is-running-on
search Google

https://www.google.com/#q=GetCurrentProcessorNumber