1 <h2>i386_io_port_add
</h2> 
   4 <strong>Function
</strong> - Permit target thread to invoke operations on the specified device.
 
   7 <strong>kern_return_t   i386_io_port_add
</strong> 
   8                 <strong>(thread_act_t
</strong>                        <var>target_act
</var>,
 
   9                  <strong>device_t
</strong>                                <var>device
</var><strong>);
</strong> 
  14 <dt> <var>target_act
</var>  
  16 [in thread send right]
 
  17 Thread whose permission bitmap is to be set.
 
  19 <dt> <var>device
</var>  
  21 [in device send right]
 
  22 The device to which I/O instructions are to be
 
  27 The 
<strong>i386_io_port_add
</strong> function adds a device to the
 
  28 I/O permission bitmap for a 
 
  29 thread, thereby permitting the thread to execute I/O instructions against the
 
  33 Normally, the thread must have called 
<strong>i386_io_port_add
</strong>  
  34 for all devices to which it will execute I/O instructions.  However, possessing
 
  35 send rights to the 
<var>iopl
</var> device port will cause the 
 
  36 <var>iopl
</var> device to be automatically added to the 
 
  37 thread's I/O map upon first attempted access.  This is a backward
 
  38 compatibility feature for the DOS emulator.
 
  39 <h3>RETURN VALUES
</h3> 
  41 Only generic errors apply.
 
  42 <h3>RELATED INFORMATION
</h3> 
  45 <a href=
"i386_io_port_list.html"><strong>i386_io_port_list
<strong></a>,
 
  46 <a href=
"i386_io_port_remove.html"><strong>i386_io_port_remove
<strong></a>.