summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/ntdll.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-06-02 10:22:14 +0000
committerCorinna Vinschen <corinna@vinschen.de>2013-06-02 10:22:14 +0000
commita24ad2c346471f3066e051459112341c02a039fc (patch)
tree6446521c7ebac7e27dcd033815f6a8b1a65da249 /winsup/cygwin/ntdll.h
parentfa35814af1fe24f596142c993f050f5eb0a74914 (diff)
downloadcygnal-a24ad2c346471f3066e051459112341c02a039fc.tar.gz
cygnal-a24ad2c346471f3066e051459112341c02a039fc.tar.bz2
cygnal-a24ad2c346471f3066e051459112341c02a039fc.zip
* autoload.cc (CancelSynchronousIo): Define.
* fcntl.cc (fcntl64): Drop handling of locking commands. * fhandler.h (class fhandler_disk_file): Add mandatory_locking. (fhandler_disk_file::fcntl): Declare. (fhandler_disk_file::mand_lock): Declare. * fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file): Initialize mandatory_locking. (fhandler_disk_file::fcntl): New method. Handle F_LCK_MANDATORY and locking commands. (fhandler_disk_file::dup): Duplicate mandatory_locking. Fix a bug when duplicating prw_handle failed. (fhandler_disk_file::fixup_after_fork): Reset mandatory_locking. * flock.cc (fhandler_disk_file::lock): Add comment. (struct lock_parms): New struct to pass parameters to blocking_lock_thr thread function. (blocking_lock_thr): New thread function. (fhandler_disk_file::mand_lock): New methof implementing mandatory locking with Windows semantics. * ntdll.h (NtLockFile): Declare. (NtUnlockFile): Declare. * include/fcntl.h: Fix a comment. (F_LCK_MANDATORY): Define. Add lengthy comment to explain.
Diffstat (limited to 'winsup/cygwin/ntdll.h')
-rw-r--r--winsup/cygwin/ntdll.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 4d302ffe7..2582bf25f 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -1224,6 +1224,9 @@ extern "C"
PVOID, ULONG);
NTSTATUS NTAPI NtFlushBuffersFile (HANDLE, PIO_STATUS_BLOCK);
NTSTATUS NTAPI NtLoadKey (POBJECT_ATTRIBUTES, POBJECT_ATTRIBUTES);
+ NTSTATUS NTAPI NtLockFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID,
+ PIO_STATUS_BLOCK, PLARGE_INTEGER, PLARGE_INTEGER,
+ ULONG, BOOLEAN, BOOLEAN);
NTSTATUS NTAPI NtLockVirtualMemory (HANDLE, PVOID *, PSIZE_T, ULONG);
NTSTATUS NTAPI NtMapViewOfSection (HANDLE, HANDLE, PVOID *, ULONG_PTR, SIZE_T,
PLARGE_INTEGER, PSIZE_T, SECTION_INHERIT,
@@ -1308,6 +1311,8 @@ extern "C"
NTSTATUS NTAPI NtSetTimerResolution (ULONG, BOOLEAN, PULONG);
NTSTATUS NTAPI NtSetValueKey (HANDLE, PUNICODE_STRING, ULONG, ULONG, PVOID,
ULONG);
+ NTSTATUS NTAPI NtUnlockFile (HANDLE, PIO_STATUS_BLOCK, PLARGE_INTEGER,
+ PLARGE_INTEGER, ULONG);
NTSTATUS NTAPI NtUnlockVirtualMemory (HANDLE, PVOID *, PSIZE_T, ULONG);
NTSTATUS NTAPI NtUnmapViewOfSection (HANDLE, PVOID);
NTSTATUS NTAPI NtWriteFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID,