Lock the window of the card in the selected socket
#include <sys/pccard.h>
int pccard_lock( pccard_t handle, 
                 int socket, 
                 int index, 
                 int oflag );
- handle
  
 
- The handle returned by
      pccard_attach(). 
  
 
- socket
  
 
- Contains both the socket number as well as the function within the socket. 
      This is achieved by shifting the function number left 8 bits and ORing it with the socket number.
      The socket number is zero-based. 
  
 
- index
  
 
- The window/function number that you want to lock.
    You can get the window number from the _pccard_info
    structure (see 
      pccard_info()).
  
  
 
- oflag 
  
 
- Created by ORing the values required (e.g. O_RDWR | O_EXCL) for read/write and exclusive access.
      
      
 
libpccard
Use the -l pccard option to
qcc
to link against this library.
The pccard_lock() function call provides exclusive or 
shared access to the PC Card in socket and also sets 
access permissions.
- A positive integer
  
 
- Success. 
  
 
- -1
  
 
- An error occurred
    (errno is set).
 
- EBADF
  
 
- Invalid handle parameter.
      
  
 
- EBUSY
  
 
- The window is already locked by another process.
      
  
 
- ENODEV
  
 
- Invalid socket parameter, no PC Card is present in the socket,
      or invalid index parameter.
      
 
See pccard_arm().
QNX Neutrino
| Safety: |  | 
| Cancellation point | 
    Yes | 
| Interrupt handler | 
    No | 
| Signal handler | 
    Yes | 
| Thread | 
    Yes | 
pccard_arm(),
pccard_attach(),
pccard_detach(),
pccard_info(),
pccard_raw_read(),
pccard_unlock()