<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Here are C source codes with in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089182#M64637</link>
    <description>Here are C source codes with a call to &lt;STRONG&gt;CrtSetThreadPriority&lt;/STRONG&gt; function:

		...
		&lt;STRONG&gt;CrtSetThreadPriority&lt;/STRONG&gt;( THREADPRIORITY_HIGH );
		...</description>
    <pubDate>Fri, 23 Sep 2016 15:07:26 GMT</pubDate>
    <dc:creator>SergeyKostrov</dc:creator>
    <dc:date>2016-09-23T15:07:26Z</dc:date>
    <item>
      <title>Internals of SetThreadPriority Win32 API function</title>
      <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089179#M64634</link>
      <description>&lt;STRONG&gt;*** Internals of SetThreadPriority Win32 API function ***&lt;/STRONG&gt;</description>
      <pubDate>Fri, 23 Sep 2016 14:54:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089179#M64634</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2016-09-23T14:54:14Z</dc:date>
    </item>
    <item>
      <title>[ Abstract ]</title>
      <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089180#M64635</link>
      <description>&lt;STRONG&gt;[ Abstract ]&lt;/STRONG&gt;

An investigation of internals of Win32 API &lt;STRONG&gt;SetThreadPriority&lt;/STRONG&gt; function.</description>
      <pubDate>Fri, 23 Sep 2016 14:58:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089180#M64635</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2016-09-23T14:58:41Z</dc:date>
    </item>
    <item>
      <title>Consider C source codes with</title>
      <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089181#M64636</link>
      <description>Consider C source codes with Win32 API &lt;STRONG&gt;SetThreadPriority&lt;/STRONG&gt; function:

		...
		_RTINLINE RTvoid &lt;STRONG&gt;CrtSetThreadPriority&lt;/STRONG&gt;( RTint iThreadPriority )
		{
			#ifdef _RTHRTFUNCTION_TRACEMESSAGE
			&lt;STRONG&gt;CrtPrintf&lt;/STRONG&gt;( RTU("[ CrtSetThreadPriority ]\n") );
			#endif
			BOOL bOK = ::&lt;STRONG&gt;SetThreadPriority&lt;/STRONG&gt;( ::&lt;STRONG&gt;GetCurrentThread&lt;/STRONG&gt;(), ( RTint )iThreadPriority );
		}
		...</description>
      <pubDate>Fri, 23 Sep 2016 15:03:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089181#M64636</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2016-09-23T15:03:23Z</dc:date>
    </item>
    <item>
      <title>Here are C source codes with</title>
      <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089182#M64637</link>
      <description>Here are C source codes with a call to &lt;STRONG&gt;CrtSetThreadPriority&lt;/STRONG&gt; function:

		...
		&lt;STRONG&gt;CrtSetThreadPriority&lt;/STRONG&gt;( THREADPRIORITY_HIGH );
		...</description>
      <pubDate>Fri, 23 Sep 2016 15:07:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089182#M64637</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2016-09-23T15:07:26Z</dc:date>
    </item>
    <item>
      <title>Here are disassembled codes</title>
      <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089183#M64638</link>
      <description>Here are disassembled codes that show internals how Win32 API &lt;STRONG&gt;SetThreadPriority&lt;/STRONG&gt; functionsets a thread priority:

		...
		00403758  push        eax
		00403759  call        dword ptr ds:[4161B0h]
		...

		...
		&lt;STRONG&gt;SetThreadPriority&lt;/STRONG&gt;:
		7C80C1A8  mov         edi, edi
		7C80C1AA  push        ebp
		7C80C1AB  mov         ebp, esp
		7C80C1AD  mov         eax, dword ptr [ebp+0Ch]
		7C80C1B0  cmp         eax, 0Fh
		7C80C1B3  mov         dword ptr [ebp+0Ch], eax
		7C80C1B6  je          AddAtomW+2Fh (7C8330F0h)
		7C80C1BC  cmp         eax, 0FFFFFFF1h
		7C80C1BF  je          SetProcessShutdownParameters+0E7h (7C82E10Ch)
		7C80C1C5  push        4
		7C80C1C7  lea         eax, [ebp+0Ch]
		7C80C1CA  push        eax
		7C80C1CB  push        3
		7C80C1CD  push        dword ptr [ebp+8]
		7C80C1D0  &lt;STRONG&gt;call        dword ptr ds:[7C8013B0h]&lt;/STRONG&gt;		;; call to &lt;STRONG&gt;NtSetInformationThread&lt;/STRONG&gt;
		7C80C1D6  test        eax, eax
		7C80C1D8  jl          7C844901
		7C80C1DE  xor         eax, eax
		7C80C1E0  inc         eax
		7C80C1E1  pop         ebp
		7C80C1E2  ret         8
		7C80C1E5  cmp         dword ptr ds:[7C88576Ch], 0
		7C80C1EC  je          7C82BDC9
		7C80C1F2  mov         eax, dword ptr ds:[7C88576Ch]
		7C80C1F7  jmp         GetUserDefaultLCID+6Ah (7C80A01Ah)
		7C80C1FC  push        0C000000Dh
		7C80C201  call        GetTickCount+0CFh (7C809419h)
		7C80C206  jmp         SearchPathW+0F6h (7C80E872h)
		7C80C20B  nop
		7C80C20C  nop
		7C80C20D  nop
		7C80C20E  nop
		7C80C20F  nop
		...

		...
		&lt;STRONG&gt;NtSetInformationThread&lt;/STRONG&gt;:
		7C90DCAE  mov         eax, 0E5h
		7C90DCB3  mov         edx, 7FFE0300h
		7C90DCB8  &lt;STRONG&gt;call        dword ptr [edx]&lt;/STRONG&gt;			;; call to &lt;STRONG&gt;KiFastSystemCall&lt;/STRONG&gt;
		7C90DCBA  ret         10h
		7C90DCBD  nop
		...

		...
		&lt;STRONG&gt;KiFastSystemCall&lt;/STRONG&gt;:
		7C90E510  mov         edx, esp
		7C90E512  &lt;STRONG&gt;sysenter&lt;/STRONG&gt;
		...</description>
      <pubDate>Fri, 23 Sep 2016 15:13:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089183#M64638</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2016-09-23T15:13:02Z</dc:date>
    </item>
    <item>
      <title>A sysenter instruction</title>
      <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089184#M64639</link>
      <description>A &lt;STRONG&gt;sysenter&lt;/STRONG&gt; instruction executes and control is returned to a next instruction after &lt;STRONG&gt;CS:00403759&lt;/STRONG&gt;:

		...
		00403758  push        eax
		00403759  call        dword ptr ds:[4161B0h]
		...

The priority of the thread is set.</description>
      <pubDate>Fri, 23 Sep 2016 15:20:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089184#M64639</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2016-09-23T15:20:27Z</dc:date>
    </item>
    <item>
      <title>Latencies of Win32 API</title>
      <link>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089185#M64640</link>
      <description>Latencies of Win32 API &lt;STRONG&gt;SetThreadPriority&lt;/STRONG&gt; function are as follows:

	&lt;STRONG&gt;[ Run-Time testing - Extended Tracing - Yes ]&lt;/STRONG&gt;
	&lt;STRONG&gt;[ Microsoft C++ compiler ]&lt;/STRONG&gt;

		* CRuntimeSet Start *
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;2896&lt;/STRONG&gt; clock cycles
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;3280&lt;/STRONG&gt; clock cycles
		...
		* CRuntimeSet End *

	&lt;STRONG&gt;[ Run-Time testing - Extended Tracing - Yes ]&lt;/STRONG&gt;
	&lt;STRONG&gt;[ Borland C++ compiler ]&lt;/STRONG&gt;

		* CRuntimeSet Start *
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;28364&lt;/STRONG&gt; clock cycles
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;11976&lt;/STRONG&gt; clock cycles
		...
		* CRuntimeSet End *

	&lt;STRONG&gt;[ Run-Time testing - Extended Tracing - Yes ]&lt;/STRONG&gt;
	&lt;STRONG&gt;[ Intel C++ compiler ]&lt;/STRONG&gt;

		* CRuntimeSet Start *
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;2400&lt;/STRONG&gt; clock cycles
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;6548&lt;/STRONG&gt; clock cycles
		...
		* CRuntimeSet End *

	&lt;STRONG&gt;[ Run-Time testing - Extended Tracing - Yes ]&lt;/STRONG&gt;
	&lt;STRONG&gt;[ MinGW C++ compiler ]&lt;/STRONG&gt;

		* CRuntimeSet Start *
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;3128&lt;/STRONG&gt; clock cycles
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;4284&lt;/STRONG&gt; clock cycles
		...
		* CRuntimeSet End *

	&lt;STRONG&gt;[ Run-Time testing - Extended Tracing - Yes ]&lt;/STRONG&gt;
	&lt;STRONG&gt;[ Watcom C++ compiler ]&lt;/STRONG&gt;

		* CRuntimeSet Start *
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;3776&lt;/STRONG&gt; clock cycles
		...
		[ CrtSetThreadPriority ] - Executed in &lt;STRONG&gt;4908&lt;/STRONG&gt; clock cycles
		...
		* CRuntimeSet End *</description>
      <pubDate>Fri, 23 Sep 2016 15:29:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Internals-of-SetThreadPriority-Win32-API-function/m-p/1089185#M64640</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2016-09-23T15:29:23Z</dc:date>
    </item>
  </channel>
</rss>

