-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial translation in pcntl/functions
- Loading branch information
1 parent
93bd617
commit 52f8792
Showing
3 changed files
with
284 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,83 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: 262ca5a53247283e8e927a4a52367474e7f9838a Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="function.pcntl-getcpuaffinity" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>pcntl_getcpuaffinity</refname> | ||
<refpurpose>Obtém a afinidade de CPU de um processo</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> | ||
<simpara> | ||
Obtém a afinidade de CPU de um <parameter>pid</parameter>. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>pid</parameter></term> | ||
<listitem> | ||
<simpara> | ||
Se &null;, o ID do processo atual será usado. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
Retorna a máscara de afinidade de CPU do processo, &return.falseforfailure;. | ||
</simpara> | ||
&return.falseproblem; | ||
</refsect1> | ||
|
||
<refsect1 role="errors"> | ||
&reftitle.errors; | ||
<simpara> | ||
Uma exceção <classname>ValueError</classname> é lançada quando | ||
<parameter>pid</parameter> é um ID de processo inválido | ||
ou quando há falha na criação da máscara da CPU. | ||
</simpara> | ||
<simpara> | ||
Se <parameter>pid</parameter> for um processo para o qual o usuário | ||
atual não tem permissões, um <constant>E_WARNING</constant> | ||
é emitido. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><function>pcntl_setcpuaffinity</function></member> | ||
</simplelist> | ||
</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,111 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: e251b5cfdb995dfac897b7f9ed9aa8194f8dc50f Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="function.pcntl-getpriority" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>pcntl_getpriority</refname> | ||
<refpurpose>Obtém a prioridade de um processo</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type class="union"><type>int</type><type>false</type></type><methodname>pcntl_getpriority</methodname> | ||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>process_id</parameter><initializer>&null;</initializer></methodparam> | ||
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>PRIO_PROCESS</constant></initializer></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
<function>pcntl_getpriority</function> obtém a prioridade de | ||
<parameter>process_id</parameter>. Como os níveis de prioridade podem mudar | ||
dependendo do tipo do sistema e das versões de kernel, consulte o manual de getpriority(2) | ||
do sistema em uso para detalhes específicos. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<para> | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>process_id</parameter></term> | ||
<listitem> | ||
<para> | ||
Se &null;, o ID do processo atual é usado. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>mode</parameter></term> | ||
<listitem> | ||
<para> | ||
Uma das constantes <constant>PRIO_PGRP</constant>, <constant>PRIO_USER</constant>, | ||
<constant>PRIO_PROCESS</constant>, | ||
<constant>PRIO_DARWIN_BG</constant> ou <constant>PRIO_DARWIN_THREAD</constant>. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
<function>pcntl_getpriority</function> retorna a prioridade do processo | ||
ou &false; em caso de erro. Um valor numérico menor dá maior prioridade | ||
no processo. | ||
</para> | ||
&return.falseproblem; | ||
</refsect1> | ||
|
||
<refsect1 role="changelog"> | ||
&reftitle.changelog; | ||
<informaltable> | ||
<tgroup cols="2"> | ||
<thead> | ||
<row> | ||
<entry>&Version;</entry> | ||
<entry>&Description;</entry> | ||
</row> | ||
</thead> | ||
<tbody> | ||
<row> | ||
<entry>8.0.0</entry> | ||
<entry> | ||
<parameter>process_id</parameter> agora pode ser nulo. | ||
</entry> | ||
</row> | ||
</tbody> | ||
</tgroup> | ||
</informaltable> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<para> | ||
<simplelist> | ||
<member><function>pcntl_setpriority</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,90 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: 5af24e453c46b4b8611cca1dfc1b8628ae9fd368 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="function.pcntl-setcpuaffinity" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>pcntl_setcpuaffinity</refname> | ||
<refpurpose>Define a afinidade de CPU de um processo</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> | ||
<simpara> | ||
Define a afinidade de CPU para <parameter>pid</parameter> com a máscara de afinidade informada em | ||
<parameter>hmask</parameter>. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>pid</parameter></term> | ||
<listitem> | ||
<simpara> | ||
Se &null;, o ID do processo atual será usado. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>hmask</parameter></term> | ||
<listitem> | ||
<simpara> | ||
A máscara de afinidade de CPU consistindo em uma ou mais IDs de CPU para vincular o processo. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
&return.success; | ||
</simpara> | ||
&return.falseproblem; | ||
</refsect1> | ||
|
||
<refsect1 role="errors"> | ||
&reftitle.errors; | ||
<simpara> | ||
Uma exceção <classname>TypeError</classname> é lançada se uma | ||
das IDs de CPU de <parameter>hmask</parameter> for inválida. | ||
Uma exceção <classname>ValueError</classname> é lançada se | ||
<parameter>pid</parameter> for um ID de processo inválido | ||
ou se a houver erro na criação da máscara. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><function>pcntl_setcpuaffinity</function></member> | ||
</simplelist> | ||
</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 | ||
--> |