i386_io_port_add.html   [plain text]

<strong>Function</strong> - Permit target thread to invoke operations on the specified device.
<strong>kern_return_t   i386_io_port_add</strong>
                <strong>(thread_act_t</strong>                        <var>target_act</var>,
                 <strong>device_t</strong>                                <var>device</var><strong>);</strong>
<dt> <var>target_act</var> 
[in thread send right]
Thread whose permission bitmap is to be set.
<dt> <var>device</var> 
[in device send right]
The device to which I/O instructions are to be
The <strong>i386_io_port_add</strong> function adds a device to the
I/O permission bitmap for a 
thread, thereby permitting the thread to execute I/O instructions against the
Normally, the thread must have called <strong>i386_io_port_add</strong> 
for all devices to which it will execute I/O instructions.  However, possessing
send rights to the <var>iopl</var> device port will cause the 
<var>iopl</var> device to be automatically added to the 
thread's I/O map upon first attempted access.  This is a backward
compatibility feature for the DOS emulator.
Only generic errors apply.
<a href="i386_io_port_list.html"><strong>i386_io_port_list<strong></a>,
<a href="i386_io_port_remove.html"><strong>i386_io_port_remove<strong></a>.