Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/posix.sgml')
-rw-r--r--winsup/cygwin/posix.sgml40
1 files changed, 35 insertions, 5 deletions
diff --git a/winsup/cygwin/posix.sgml b/winsup/cygwin/posix.sgml
index b532e6e5c..af9cd2b9a 100644
--- a/winsup/cygwin/posix.sgml
+++ b/winsup/cygwin/posix.sgml
@@ -188,7 +188,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
fchown
fchownat
fclose
- fcntl
+ fcntl (see chapter "Implementation Notes")
fdatasync
fdim
fdimf
@@ -418,7 +418,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
localeconv
localtime
localtime_r
- lockf
+ lockf (see chapter "Implementation Notes")
log
log10
log10f
@@ -954,6 +954,13 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
<sect1 id="std-bsd"><title>System interfaces compatible with BSD functions:</title>
<screen>
+ __b64_ntop
+ __b64_pton
+ arc4random
+ arc4random_addrandom
+ arc4random_buf
+ arc4random_stir
+ arc4random_uniform
bindresvport
bindresvport_sa
cfmakeraw
@@ -970,7 +977,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
finite
finitef
fiprintf
- flock
+ flock (see chapter "Implementation Notes")
forkpty
fpurge
freeifaddrs
@@ -1138,6 +1145,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
pthread_getattr_np
pthread_sigqueue
ptsname_r
+ rawmemchr
removexattr
scandirat
setxattr
@@ -1460,10 +1468,32 @@ CLOCK_REALTIME and CLOCK_MONOTONIC. <function>clock_setres</function>,
<function>clock_settime</function>, and <function>timer_create</function>
currently support only CLOCK_REALTIME.</para>
+<para>POSIX file locks via <function>fcntl</function> or
+<function>lockf</function>, as well as BSD <function>flock</function> locks
+are advisory locks. They don't interact with Windows mandatory locks, nor
+do POSIX fcntl locks interfere with BSD flock locks or vice versa.</para>
+
<para>BSD file locks created via <function>flock</function> are only
propagated to the direct parent process, not to grand parents or sibling
-processes. The locks are only valid in the creating process, its parent,
-and subsequently started child processes sharing the same file descriptor.
+processes. The locks are only valid in the creating process, its parent
+process, and subsequently started child processes sharing the same file
+descriptor.</para>
+
+<para>In very rare circumstances an application would want to use Windows
+mandatory locks to interact with non-Cygwin Windows processes accessing the
+same file (databases, etc). For these purposes, the entire locking mechanism
+(fcntl/flock/lockf) can be switched to Windows mandatory locks on a
+per-descriptor/per-process basis. For this purpose, use the call
+
+<screen>
+ fcntl (fd, F_LCK_MANDATORY, 1);
+</screen>
+
+After that, all file locks on this descriptor will follow Windows mandatory
+record locking semantics: Locks are per-descriptor/per-process; locks are not
+propagated to child processes, not even via <function>execve</function>;
+no atomic replacement of read locks with write locks and vice versa on the
+same descriptor; locks have to be unlocked exactly as they have been locked.
</para>
<para><function>fpclassify</function>, <function>isfinite</function>,