The translation is temporarily closed for contributions due to maintenance, please come back later.
Context English Portuguese (Brazil) State
_ translator-credits Edson Brandi, ebrandi@FreeBSD.org, 2018
Alexandre Liberato, alexandre@feiler.co,2
Alexandre Vasconcelos, alex.vasconcelos@gmail.com, 2018
André Franciosi, andre@franciosi.org, 2018
#define XREADORG 0x725
#define XREADORG 0x725
if (jailed(td->td_ucred))
return (EPERM);

if (jailed(td->td_ucred))
return (EPERM);
#include <sys/kernel.h>

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, &foo_voodoo);
#include <sys/kernel.h>

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, &foo_voodoo);
#include <sys/kernel.h>

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, &foo_stack);
#include <sys/kernel.h>

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, &foo_stack);

<email>chris@FreeBSD.org</email>
<email>chris@FreeBSD.org</email>

<email>rwatson@FreeBSD.org</email>
<email>rwatson@FreeBSD.org</email>
uint16_t
board_read(struct ni_softc *sc, uint16_t address)
{
return bus_space_read_2(sc-&gt;bar1_bt, sc-&gt;bar1_bh, address);
}
uint16_t
board_read(struct ni_softc *sc, uint16_t address)
{
return bus_space_read_2(sc-&gt;bar1_bt, sc-&gt;bar1_bh, address);
}
void
board_write(struct ni_softc *sc, uint16_t address, uint16_t value)
{
bus_space_write_2(sc-&gt;bar1_bt, sc-&gt;bar1_bh, address, value);
}
void
board_write(struct ni_softc *sc, uint16_t address, uint16_t value)
{
bus_space_write_2(sc-&gt;bar1_bt, sc-&gt;bar1_bh, address, value);
}
uint16_t
board_read(struct ni_softc *sc, uint16_t address)
{
return (bus_read(sc-&gt;bar1res, address));
}
uint16_t
board_read(struct ni_softc *sc, uint16_t address)
{
return (bus_read(sc-&gt;bar1res, address));
}
/* Get the IRQ resource */

sc-&gt;irqid = 0x0;
sc-&gt;irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &amp;(sc-&gt;irqid),
0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
if (sc-&gt;irqres == NULL) {
printf("IRQ allocation failed!\n");
error = ENXIO;
goto fail3;
}

/* Now we should set up the interrupt handler */

error = bus_setup_intr(dev, sc-&gt;irqres, INTR_TYPE_MISC,
my_handler, sc, &amp;(sc-&gt;handler));
if (error) {
printf("Couldn't set up irq\n");
goto fail4;
}
/* Get the IRQ resource */

sc-&gt;irqid = 0x0;
sc-&gt;irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &amp;(sc-&gt;irqid),
0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
if (sc-&gt;irqres == NULL) {
printf("IRQ allocation failed!\n");
error = ENXIO;
goto fail3;
}

/* Now we should set up the interrupt handler */

error = bus_setup_intr(dev, sc-&gt;irqres, INTR_TYPE_MISC,
my_handler, sc, &amp;(sc-&gt;handler));
if (error) {
printf("Couldn't set up irq\n");
goto fail4;
}
#include &lt;vm/vm.h&gt;
#include &lt;vm/pmap.h&gt;

#define vtophys(virtual_address) (...)
#include &lt;vm/vm.h&gt;
#include &lt;vm/pmap.h&gt;

#define vtophys(virtual_address) (...)
#if defined(__alpha__)
#define vtobus(va) alpha_XXX_dmamap((vm_offset_t)va)
#else
#define vtobus(va) vtophys(va)
#endif
#if defined(__alpha__)
#define vtobus(va) alpha_XXX_dmamap((vm_offset_t)va)
#else
#define vtobus(va) vtophys(va)
#endif

<email>asmodai@FreeBSD.org</email>
<email>asmodai@FreeBSD.org</email>

<email>hiten@uk.FreeBSD.org</email>
<email>hiten@uk.FreeBSD.org</email>