-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PHP 8.4] pcntl add cpu affinity calls.
- Loading branch information
Showing
3 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- $Revision$ --> | ||
<refentry xml:id="function.pcntl-getcpuaffinity" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>pcntl_getcpuaffinity</refname> | ||
<refpurpose>Get the cpu affinity of a process</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type class="union"><type>bool</type><type>array</type></type><methodname>pcntl_getcpuaffinity</methodname> | ||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>pid</parameter><initializer>&null;</initializer></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
<function>pcntl_getcpuaffinity</function> gets the cpu affinity | ||
<parameter>pid</parameter>. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<para> | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>pid</parameter></term> | ||
<listitem> | ||
<para> | ||
If &null;, the process id of the current process is used. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
<function>pcntl_getcpuaffinity</function> returns the cpu affinity mask of | ||
the process or &false; on error. | ||
</para> | ||
&return.falseproblem; | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<para> | ||
<simplelist> | ||
<member><function>pcntl_setcpuaffinity</function></member> | ||
</simplelist> | ||
</para> | ||
</refsect1> | ||
|
||
</refentry> | ||
<!-- Keep this comment at the end of the file | ||
Local variables: | ||
mode: sgml | ||
sgml-omittag:t | ||
sgml-shorttag:t | ||
sgml-minimize-attributes:nil | ||
sgml-always-quote-attributes:t | ||
sgml-indent-step:1 | ||
sgml-indent-data:t | ||
indent-tabs-mode:nil | ||
sgml-parent-document:nil | ||
sgml-default-dtd-file:"~/.phpdoc/manual.ced" | ||
sgml-exposed-tags:nil | ||
sgml-local-catalogs:nil | ||
sgml-local-ecat-files:nil | ||
End: | ||
vim600: syn=xml fen fdm=syntax fdl=2 si | ||
vim: et tw=78 syn=sgml | ||
vi: ts=1 sw=1 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- $Revision$ --> | ||
<refentry xml:id="function.pcntl-setcpuaffinity" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>pcntl_setcpuaffinity</refname> | ||
<refpurpose>Set the cpu affinity of a process</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type>bool</type><methodname>pcntl_setcpuaffinity</methodname> | ||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>pid</parameter><initializer>&null;</initializer></methodparam> | ||
<methodparam choice="opt"><type>array</type><parameter>hmask</parameter></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
<function>pcntl_setcpuaffinity</function> sets the cpu affinity | ||
<parameter>pid</parameter> with the cpu affinity mask <parameter>hmask</parameter>. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<para> | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>pid</parameter></term> | ||
<listitem> | ||
<para> | ||
If &null;, the process id of the current process is used. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>hmask</parameter></term> | ||
<listitem> | ||
<para> | ||
The cpu affinity mask comprised of 1 or more cpu id for binding the process to. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
<function>pcntl_setcpuaffinity</function> returns &true; if the cpu binding | ||
is successful or &false; on error. | ||
</para> | ||
&return.falseproblem; | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<para> | ||
<simplelist> | ||
<member><function>pcntl_setcpuaffinity</function></member> | ||
</simplelist> | ||
</para> | ||
</refsect1> | ||
|
||
</refentry> | ||
<!-- Keep this comment at the end of the file | ||
Local variables: | ||
mode: sgml | ||
sgml-omittag:t | ||
sgml-shorttag:t | ||
sgml-minimize-attributes:nil | ||
sgml-always-quote-attributes:t | ||
sgml-indent-step:1 | ||
sgml-indent-data:t | ||
indent-tabs-mode:nil | ||
sgml-parent-document:nil | ||
sgml-default-dtd-file:"~/.phpdoc/manual.ced" | ||
sgml-exposed-tags:nil | ||
sgml-local-catalogs:nil | ||
sgml-local-ecat-files:nil | ||
End: | ||
vim600: syn=xml fen fdm=syntax fdl=2 si | ||
vim: et tw=78 syn=sgml | ||
vi: ts=1 sw=1 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters