svn: /phpdoc/en/trunk/reference/win32service/ constants.xml functions/win32-create-service.xml
| From: | Richard Quadling | Date: | Wed, 10 Nov 2010 17:02:54 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/win32service/ constants.xml functions/win32-create-service.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7401@lists.php.net to get a copy of this message | ||
rquadling Wed, 10 Nov 2010 17:02:54 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305252
Log:
Added support to set base priority of the service. This way, PHP won't hog the machine when
running as a service.
Changed paths:
U phpdoc/en/trunk/reference/win32service/constants.xml
U phpdoc/en/trunk/reference/win32service/functions/win32-create-service.xml
Modified: phpdoc/en/trunk/reference/win32service/constants.xml
===================================================================
--- phpdoc/en/trunk/reference/win32service/constants.xml 2010-11-10 16:49:54 UTC (rev 305251)
+++ phpdoc/en/trunk/reference/win32service/constants.xml 2010-11-10 17:02:54 UTC (rev 305252)
@@ -543,6 +543,79 @@
</tgroup>
</table>
+ <table xml:id="win32service.constants.basepriorities">
+ <title>Win32 Base Priority Classes</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Constant</entry>
+ <entry>Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><constant>WIN32_ABOVE_NORMAL_PRIORITY_CLASS</constant></entry>
+ <entry>0x00008000</entry>
+ <entry>
+ Process that has priority above WIN32_NORMAL_PRIORITY_CLASS but below
+ WIN32_HIGH_PRIORITY_CLASS.
+ </entry>
+ </row>
+ <row>
+ <entry><constant>WIN32_BELOW_NORMAL_PRIORITY_CLASS</constant></entry>
+ <entry>0x00004000</entry>
+ <entry>
+ Process that has priority above WIN32_IDLE_PRIORITY_CLASS but below
+ WIN32_NORMAL_PRIORITY_CLASS.
+ </entry>
+ </row>
+ <row>
+ <entry><constant>WIN32_HIGH_PRIORITY_CLASS</constant></entry>
+ <entry>0x00000080</entry>
+ <entry>
+ Process that performs time-critical tasks that must be executed
+ immediately. The threads of the process preempt the threads of normal or
+ idle priority class processes. An example is the Task List, which must
+ respond quickly when called by the user, regardless of the load on the
+ operating system. Use extreme care when using the high-priority class,
+ because a high-priority class application can use nearly all available
+ CPU time.
+ </entry>
+ </row>
+ <row>
+ <entry><constant>WIN32_IDLE_PRIORITY_CLASS</constant></entry>
+ <entry>0x00000040</entry>
+ <entry>
+ Process whose threads run only when the system is idle. The threads of the
+ process are preempted by the threads of any process running in a higher
+ priority class. An example is a screen saver. The idle-priority class is
+ inherited by child processes.
+ </entry>
+ </row>
+ <row>
+ <entry><constant>WIN32_NORMAL_PRIORITY_CLASS</constant></entry>
+ <entry>0x00000020</entry>
+ <entry>
+ Process with no special scheduling needs.
+ </entry>
+ </row>
+ <row>
+ <entry><constant>WIN32_REALTIME_PRIORITY_CLASS</constant></entry>
+ <entry>0x00000100</entry>
+ <entry>
+ Process that has the highest possible priority. The threads of the
+ process preempt the threads of all other processes, including operating
+ system processes performing important tasks. For example, a real-time
+ process that executes for more than a very brief interval can cause disk
+ caches not to flush or cause the mouse to be unresponsive.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
</appendix>
<!-- Keep this comment at the end of the file
Modified: phpdoc/en/trunk/reference/win32service/functions/win32-create-service.xml
===================================================================
--- phpdoc/en/trunk/reference/win32service/functions/win32-create-service.xml 2010-11-10 16:49:54
UTC (rev 305251)
+++ phpdoc/en/trunk/reference/win32service/functions/win32-create-service.xml 2010-11-10 17:02:54
UTC (rev 305252)
@@ -150,6 +150,20 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>base_priority</parameter></term>
+ <listitem>
+ <para>
+ To reduce the impact on processor utilisation, it may be necessary
+ to set a base priority lower than normal.
+ </para>
+ <para>
+ The <parameter>base_priority</parameter> can be set to one of the
+ constants define in
+ <link linkend="win32service.constants.basepriorities">Win32 Base
Priority Classes</link>.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</listitem>
@@ -204,6 +218,7 @@
<para>
<simplelist>
<member><function>win32_delete_service</function></member>
+ <member><link linkend="win32service.constants.basepriorities">Win32 Base
Priority Classes</link></member>
<member><link linkend="win32service.constants.errors">Win32 Error
Codes</link></member>
</simplelist>
</para>