The translation is temporarily closed for contributions due to maintenance, please come back later.

Translation

(itstool) path: sect3/programlisting
English
<sys/kernel.h>
Context English Portuguese (Brazil) State
<primary>SYSINIT</primary> <primary> SYSINIT </primary>
<primary>dynamic initialization</primary> <primary> inicializa��o din�mica </primary>
<primary>kernel initialization</primary> <secondary>dynamic</secondary> <primary> inicializa��o do kernel </primary><secondary> din�mico </secondary>
<primary>kernel modules</primary> <primary> m�dulos do kernel </primary>
<primary>kernel linker</primary> <primary> linker de kernel </primary>
SYSINIT is the framework for a generic call sort and dispatch mechanism. FreeBSD currently uses it for the dynamic initialization of the kernel. SYSINIT allows FreeBSD's kernel subsystems to be reordered, and added, removed, and replaced at kernel link time when the kernel or one of its modules is loaded without having to edit a statically ordered initialization routing and recompile the kernel. This system also allows kernel modules, currently called <firstterm>KLD's</firstterm>, to be separately compiled, linked, and initialized at boot time and loaded even later while the system is already running. This is accomplished using the <quote>kernel linker</quote> and <quote>linker sets</quote>. SYSINIT � o framework para um mecanismo gen�rico de ordena��o e envio de chamadas. O FreeBSD atualmente o utiliza para a inicializa��o din�mica do kernel. SYSINIT permite que os subsistemas de kernel do FreeBSD sejam reordenados, adicionados, removidos e substitu�dos no momento do link do kernel quando o kernel ou um de seus m�dulos � carregado sem ter que editar um roteamento de inicializa��o ordenado estaticamente e recompilar o kernel.Este sistema tamb�m permite m�dulos do kernel, atualmente chamados <firstterm> KLD';s </firstterm> , para ser compilado, vinculado e inicializado separadamente no momento da inicializa��o e carregado ainda mais tarde enquanto o sistema j� est� em execu��o. Isso � feito usando o <quote> linker de kernel </quote> e <quote> conjuntos de linkers </quote>
Linker Set Left Set
A linker technique in which the linker gathers statically declared data throughout a program's source files into a single contiguously addressable unit of data. Uma t�cnica de linker na qual o linker re�ne dados estaticamente declarados atrav�s dos arquivos de c�digo-fonte de um programa em uma �nica unidade de dados contiguamente endere��vel.
SYSINIT Operation Opera��o SYSINIT
<primary>linker sets</primary> <primary> conjuntos de linkers </primary>
SYSINIT relies on the ability of the linker to take static data declared at multiple locations throughout a program's source and group it together as a single contiguous chunk of data. This linker technique is called a <quote>linker set</quote>. SYSINIT uses two linker sets to maintain two data sets containing each consumer's call order, function, and a pointer to the data to pass to that function. O SYSINIT depende da capacidade do vinculador de obter dados est�ticos declarados em v�rios locais ao longo da origem de um programa e agrup�-los como um �nico bloco cont�guo de dados. Essa t�cnica de vinculador � chamada de <quote> conjunto de linker </quote> . O SYSINIT usa dois conjuntos de linkers para manter dois conjuntos de dados contendo cada ordem de chamada do consumidor, fun��o e um ponteiro para os dados a serem passados ​​para essa fun��o.
SYSINIT uses two priorities when ordering the functions for execution. The first priority is a subsystem ID giving an overall order for SYSINIT's dispatch of functions. Current predeclared ID's are in <filename>&lt;sys/kernel.h&gt;</filename> in the enum list <literal>sysinit_sub_id</literal>. The second priority used is an element order within the subsystem. Current predeclared subsystem element orders are in <filename>&lt;sys/kernel.h&gt;</filename> in the enum list <literal>sysinit_elem_order</literal>. O SYSINIT usa duas prioridades ao ordenar as fun��es para execu��o. A primeira prioridade � um ID de subsistema dando uma ordem geral para o despacho de fun��es do SYSINIT. As IDs pr�-declaradas atuais est�o em <filename> &lt;sys / kernel.h&gt; </filename> na lista enum <literal> sysinit_sub_id </literal> . A segunda prioridade usada � uma ordem de elemento no subsistema. As atuais ordens de elementos do subsistema pr�-declarado est�o em <filename> &lt;sys / kernel.h&gt; </filename> na lista enum <literal> sysinit_elem_order </literal>
<primary>pseudo-devices</primary> <primary> pseudo-dispositivos </primary>
There are currently two uses for SYSINIT. Function dispatch at system startup and kernel module loads, and function dispatch at system shutdown and kernel module unload. Kernel subsystems often use system startup SYSINIT's to initialize data structures, for example the process scheduling subsystem uses a SYSINIT to initialize the run queue data structure. Device drivers should avoid using <literal>SYSINIT()</literal> directly. Instead drivers for real devices that are part of a bus structure should use <literal>DRIVER_MODULE()</literal> to provide a function that detects the device and, if it is present, initializes the device. It will do a few things specific to devices and then call <literal>SYSINIT()</literal> itself. For pseudo-devices, which are not part of a bus structure, use <literal>DEV_MODULE()</literal>. Existem atualmente dois usos para SYSINIT. O despacho de fun��es na inicializa��o do sistema e do m�dulo kernel e o envio de fun��es no desligamento do sistema e no m�dulo kernel descarregam. Os subsistemas Kernel geralmente usam SYSINIT';s para inicializar estruturas de dados, por exemplo, o subsistema de agendamento de processos SYSINIT para inicializar a estrutura de dados da fila de execu��o.Os drivers de dispositivo devem evitar o uso <literal> SYSINIT () </literal> diretamente. Em vez disso, os drivers para dispositivos reais que fazem parte de uma estrutura de barramento devem usar <literal> DRIVER_MODULE () </literal> para fornecer uma fun��o que detecta o dispositivo e, se estiver presente, inicializa o dispositivo. Ele far� algumas coisas espec�ficas para os dispositivos e, em seguida, chamar� <literal> SYSINIT () </literal> em si. Para pseudo-dispositivos, que n�o fazem parte de uma estrutura de barramento, use <literal> DEV_MODULE () </literal>
Using SYSINIT Usando SYSINIT
&lt;sys/kernel.h&gt; &lt;sys/kernel.h&gt;
SYSINIT(uniquifier, subsystem, order, func, ident)
SYSUNINIT(uniquifier, subsystem, order, func, ident)
SYSINIT(uniquifier, subsystem, order, func, ident)
SYSUNINIT(uniquifier, subsystem, order, func, ident)
Startup Comece
The <literal>SYSINIT()</literal> macro creates the necessary SYSINIT data in SYSINIT's startup data set for SYSINIT to sort and dispatch a function at system startup and module load. <literal>SYSINIT()</literal> takes a uniquifier that SYSINIT uses to identify the particular function dispatch data, the subsystem order, the subsystem element order, the function to call, and the data to pass the function. All functions must take a constant pointer argument. O <literal> SYSINIT () </literal> macro cria os dados SYSINIT necess�rios no conjunto de dados de inicializa��o do SYSINIT para SYSINIT para classificar e despachar uma fun��o na inicializa��o do sistema e no carregamento do m�dulo. <literal> SYSINIT () </literal> pega um uniquificador que SYSINIT usa para identificar os dados de despacho da fun��o espec�fica, a ordem do subsistema, a ordem do elemento do subsistema, a fun��o a ser chamada e os dados para passar a fun��o. Todas as fun��es devem ter um argumento de ponteiro constante.
Example of a <literal>SYSINIT()</literal> Exemplo de um <literal> SYSINIT () </literal>
#include &lt;sys/kernel.h&gt;

void foo_null(void *unused)
{
foo_doo();
}
SYSINIT(foo, SI_SUB_FOO, SI_ORDER_FOO, foo_null, NULL);

struct foo foo_voodoo = {
FOO_VOODOO;
}

void foo_arg(void *vdata)
{
struct foo *foo = (struct foo *)vdata;
foo_data(foo);
}
SYSINIT(bar, SI_SUB_FOO, SI_ORDER_FOO, foo_arg, &amp;foo_voodoo);
#include &lt;sys/kernel.h&gt;

void foo_null(void *unused)
{
foo_doo();
}
SYSINIT(foo, SI_SUB_FOO, SI_ORDER_FOO, foo_null, NULL);

struct foo foo_voodoo = {
FOO_VOODOO;
}

void foo_arg(void *vdata)
{
struct foo *foo = (struct foo *)vdata;
foo_data(foo);
}
SYSINIT(bar, SI_SUB_FOO, SI_ORDER_FOO, foo_arg, &amp;foo_voodoo);
Note that <literal>SI_SUB_FOO</literal> and <literal>SI_ORDER_FOO</literal> need to be in the <literal>sysinit_sub_id</literal> and <literal>sysinit_elem_order</literal> enum's as mentioned above. Either use existing ones or add your own to the enum's. You can also use math for fine-tuning the order a SYSINIT will run in. This example shows a SYSINIT that needs to be run just barely before the SYSINIT's that handle tuning kernel parameters. Observe que <literal> SI_SUB_FOO </literal> e <literal> SI_ORDER_FOO </literal> precisa estar no <literal> sysinit_sub_id </literal> e <literal> sysinit_elem_order </literal> enum como mencionado acima. Use os existentes ou adicione os seus aos do enum. Voc� tamb�m pode usar matem�tica para ajustar a ordem na qual um SYSINIT ser� executado. Este exemplo mostra um SYSINIT que precisa ser executado logo antes do SYSINIT tratar os par�metros do kernel de ajuste.
Example of Adjusting <literal>SYSINIT()</literal> Order Exemplo de ajuste <literal> SYSINIT () </literal> Ordem
static void
mptable_register(void *dummy __unused)
{

apic_register_enumerator(&amp;mptable_enumerator);
}

SYSINIT(mptable_register, SI_SUB_TUNABLES - 1, SI_ORDER_FIRST,
mptable_register, NULL);
static void
mptable_register(void *dummy __unused)
{

apic_register_enumerator(&amp;mptable_enumerator);
}

SYSINIT(mptable_register, SI_SUB_TUNABLES - 1, SI_ORDER_FIRST,
mptable_register, NULL);
Shutdown Desligar
The <literal>SYSUNINIT()</literal> macro behaves similarly to the <literal>SYSINIT()</literal> macro except that it adds the SYSINIT data to SYSINIT's shutdown data set. O <literal> SYSUNINIT () </literal> macro se comporta de forma semelhante ao <literal> SYSINIT () </literal> macro, exceto que adiciona os dados SYSINIT ao conjunto de dados de desligamento do SYSINIT.
Example of a <literal>SYSUNINIT()</literal> Exemplo de um <literal> SYSUNINIT () </literal>
#include &lt;sys/kernel.h&gt;

void foo_cleanup(void *unused)
{
foo_kill();
}
SYSUNINIT(foobar, SI_SUB_FOO, SI_ORDER_FOO, foo_cleanup, NULL);

struct foo_stack foo_stack = {
FOO_STACK_VOODOO;
}

void foo_flush(void *vdata)
{
}
SYSUNINIT(barfoo, SI_SUB_FOO, SI_ORDER_FOO, foo_flush, &amp;foo_stack);
#include &lt;sys/kernel.h&gt;

void foo_cleanup(void *unused)
{
foo_kill();
}
SYSUNINIT(foobar, SI_SUB_FOO, SI_ORDER_FOO, foo_cleanup, NULL);

struct foo_stack foo_stack = {
FOO_STACK_VOODOO;
}

void foo_flush(void *vdata)
{
}
SYSUNINIT(barfoo, SI_SUB_FOO, SI_ORDER_FOO, foo_flush, &amp;foo_stack);
The TrustedBSD MAC Framework O framework MAC TrustedBSD

<email>chris@FreeBSD.org</email>
<email>chris@FreeBSD.org</email>
<personname> <firstname>Chris</firstname> <surname>Costello</surname> </personname> <affiliation> <orgname>TrustedBSD Project</orgname> <_:address-1/> </affiliation> <personname><firstname> Chris </firstname><surname> Costello </surname></personname><affiliation><orgname> Projeto TrustedBSD </orgname> <_: endere�o-1 /> </affiliation>

Loading…

New source string a year ago
Browse all component changes

Things to check

Unchanged translation

Source and translation are identical

Reset

Glossary

English Portuguese (Brazil)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect3/programlisting
Flags
no-wrap
Source string location
book.translate.xml:4192
String age
a year ago
Source string age
a year ago
Translation file
books/pt_BR/arch-handbook.po, string 546