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

int SYS_LockAndBlock ( int  iHandle  ) 

Makes a blocking request to lock a file exclusively.

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

Definition at line 231 of file sys_unix.c.

      return flock(iHandle, LOCK_EX);
      struct flock lock_s;

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

      return fcntl(iHandle, F_SETLKW, &lock_s);

Generated by  Doxygen 1.6.0   Back to index