Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

INTERNAL void* SYS_PublicMemoryMap ( int  iSize,
int  iFid,
int  iOffset 

Map the file iFid in memory only for reading.

[in] iSize Size of the memmory mapped.
[in] iFid File which will be mapped in memory.
[in] iOffset Start point of the file to be mapped in memory.
Address of the memory map.

Definition at line 252 of file sys_unix.c.

Referenced by SCardEstablishContextTH().


      void *vAddress;

      vAddress = 0;
      vAddress = mmap(0, iSize, PROT_READ, MAP_SHARED, iFid, iOffset);
      if (vAddress == (void*)-1) /* mmap returns -1 on error */
            Log2(PCSC_LOG_CRITICAL, "SYS_PublicMemoryMap() failed: %s",
            vAddress = NULL;

      return vAddress;

Generated by  Doxygen 1.6.0   Back to index