|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- $Revision$ --> |
| 3 | +<refentry xml:id="function.pcntl-setcpuaffinity" xmlns="http://docbook.org/ns/docbook"> |
| 4 | + <refnamediv> |
| 5 | + <refname>pcntl_setcpuaffinity</refname> |
| 6 | + <refpurpose>Set the cpu affinity of a process</refpurpose> |
| 7 | + </refnamediv> |
| 8 | + |
| 9 | + <refsect1 role="description"> |
| 10 | + &reftitle.description; |
| 11 | + <methodsynopsis> |
| 12 | + <type>bool</type><methodname>pcntl_setcpuaffinity</methodname> |
| 13 | + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>pid</parameter><initializer>&null;</initializer></methodparam> |
| 14 | + <methodparam choice="opt"><type>array</type><parameter>hmask</parameter></methodparam> |
| 15 | + </methodsynopsis> |
| 16 | + <para> |
| 17 | + <function>pcntl_setcpuaffinity</function> sets the cpu affinity |
| 18 | + <parameter>pid</parameter> with the cpu affinity mask <parameter>hmask</parameter>. |
| 19 | + </para> |
| 20 | + </refsect1> |
| 21 | + |
| 22 | + <refsect1 role="parameters"> |
| 23 | + &reftitle.parameters; |
| 24 | + <para> |
| 25 | + <variablelist> |
| 26 | + <varlistentry> |
| 27 | + <term><parameter>pid</parameter></term> |
| 28 | + <listitem> |
| 29 | + <para> |
| 30 | + If &null;, the process id of the current process is used. |
| 31 | + </para> |
| 32 | + </listitem> |
| 33 | + </varlistentry> |
| 34 | + <varlistentry> |
| 35 | + <term><parameter>hmask</parameter></term> |
| 36 | + <listitem> |
| 37 | + <para> |
| 38 | + The cpu affinity mask comprised of 1 or more cpu id for binding the process to. |
| 39 | + </para> |
| 40 | + </listitem> |
| 41 | + </varlistentry> |
| 42 | + </variablelist> |
| 43 | + </para> |
| 44 | + </refsect1> |
| 45 | + |
| 46 | + <refsect1 role="returnvalues"> |
| 47 | + &reftitle.returnvalues; |
| 48 | + <para> |
| 49 | + <function>pcntl_setcpuaffinity</function> returns &true; if the cpu binding |
| 50 | + is successful or &false; on error. |
| 51 | + </para> |
| 52 | + &return.falseproblem; |
| 53 | + </refsect1> |
| 54 | + |
| 55 | + <refsect1 role="seealso"> |
| 56 | + &reftitle.seealso; |
| 57 | + <para> |
| 58 | + <simplelist> |
| 59 | + <member><function>pcntl_setcpuaffinity</function></member> |
| 60 | + </simplelist> |
| 61 | + </para> |
| 62 | + </refsect1> |
| 63 | + |
| 64 | +</refentry> |
| 65 | +<!-- Keep this comment at the end of the file |
| 66 | +Local variables: |
| 67 | +mode: sgml |
| 68 | +sgml-omittag:t |
| 69 | +sgml-shorttag:t |
| 70 | +sgml-minimize-attributes:nil |
| 71 | +sgml-always-quote-attributes:t |
| 72 | +sgml-indent-step:1 |
| 73 | +sgml-indent-data:t |
| 74 | +indent-tabs-mode:nil |
| 75 | +sgml-parent-document:nil |
| 76 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 77 | +sgml-exposed-tags:nil |
| 78 | +sgml-local-catalogs:nil |
| 79 | +sgml-local-ecat-files:nil |
| 80 | +End: |
| 81 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 82 | +vim: et tw=78 syn=sgml |
| 83 | +vi: ts=1 sw=1 |
| 84 | +--> |
0 commit comments