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

int SYS_UnlockFile ( int  iHandle  ) 

Unlocks the file.

Parameters:
[in] iHandle File descriptor.
Returns:
Error code.
Return values:
0 Success.
-1 An error ocurred.

Definition at line 256 of file sys_unix.c.

{
#ifdef HAVE_FLOCK
      return flock(iHandle, LOCK_UN);
#else
      struct flock lock_s;

      lock_s.l_type = F_UNLCK;
      lock_s.l_whence = 0;
      lock_s.l_start = 0L;
      lock_s.l_len = 0L;

      return fcntl(iHandle, F_SETLK, &lock_s);
#endif
}


Generated by  Doxygen 1.6.0   Back to index