os/ossrv/genericopenlibs/openenvcore/include/sys/fcntl.dosc
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /** @file  ../include/sys/fcntl.h
     2 @internalComponent
     3 */
     4 
     5 /** @fn  open(const char *file, int flags, ...)
     6 @param file
     7 @param flags
     8 @param ...
     9 @return   If successful, open returns a non-negative integer, termed a file descriptor. It returns 
    10 -1 on failure and sets errno to indicate the error.
    11 
    12   The file name specified by file is opened for reading and/or writing, as specified by the argument flags , and the file descriptor returned to the calling process. The flags argument may indicate that the file is to be created if it does 
    13 not exist (by specifying the O_CREAT flag). In this case open requires a third argument, mode_t mode , and the file is created with mode as described in chmod and modified by the process' umask 
    14 value (see umask )
    15 
    16 
    17 
    18  The flags specified are formed by OR'ing the following values
    19 
    20 @code
    21 
    22 O_RDONLYopen for reading only
    23 O_WRONLYopen for writing only
    24 O_RDWRopen for reading and writing
    25 O_NONBLOCKdo not block on open
    26 O_APPENDappend on each write
    27 O_CREATcreate file if it does not exist
    28 O_TRUNCtruncate size to 0
    29 O_EXCLerror if create and file exists
    30 O_SHLOCKatomically obtain a shared lock
    31 O_EXLOCKatomically obtain an exclusive lock
    32 O_DIRECTeliminate or reduce cache effects
    33 O_FSYNCsynchronous writes
    34 O_NOFOLLOWdo not follow symlinks
    35 Following options are currently not supported :
    36 O_NONBLOCK, O_SHLOCK, O_EXLOCK, O_DIRECT, O_FSYNC, O_NOFOLLOW.
    37 @endcode
    38 O_LARGEFILE
    39 This flag, if passed into the open() API, enables it to open a large file (files with 64 bit file sizes)
    40 
    41 
    42  Opening a file with O_APPEND set causes each write on the file
    43 to be appended to the end.
    44 
    45  If O_TRUNC is specified, and the file exists, the file is truncated to 
    46   zero length.
    47 
    48  If O_EXCL is set with O_CREAT and the file already
    49 exists, open returns an error.
    50 This may be used to
    51 implement a simple exclusive access locking mechanism.
    52 
    53  If O_EXCL is set and the last component of the pathname is
    54 a symbolic link, open will fail even if the symbolic
    55 link points to a non-existent name.
    56 
    57  If the O_NONBLOCK flag is specified and the open system call would result in the process being blocked for some 
    58   reason (e.g., waiting for carrier on a dialup line), open returns immediately. The descriptor remains in non-blocking mode 
    59   for subsequent operations. This mode need not have any effect on files other 
    60   than FIFOs.
    61 
    62  If O_FSYNC is used in the mask all writes will immediately be written 
    63   to disk, the kernel will not cache written data and all writes on the descriptor 
    64   will not return until the data to be written completes.
    65 
    66  If O_NOFOLLOW is used in the mask and the target file passed to open is a symbolic link the open will fail.
    67 
    68  When opening a file, a lock with flock semantics can be obtained by setting O_SHLOCK for a shared lock or O_EXLOCK for an exclusive lock. If creating a file with O_CREAT, the request for the lock will never fail (provided that the 
    69   underlying file system supports locking).
    70 
    71  O_DIRECT may be used to minimize or eliminate the cache effects of 
    72   reading and writing. The system will attempt to avoid caching the data being 
    73   read or written. If it cannot avoid caching the data, it will minimize the impact 
    74   the data has on the cache. Use of this flag can drastically reduce performance 
    75   if not used with care.
    76 
    77  If successful, open returns a non-negative integer termed a file descriptor. It returns 
    78   -1 on failure. The file pointer used to mark the current position within the 
    79   file is set to the beginning of the file.
    80 
    81  When a new file is created it is given the group of the directory
    82 which contains it.
    83 
    84  The new descriptor is set to remain open across execve system calls.; See close and fcntl .
    85 
    86  The system imposes a limit on the number of file descriptors
    87 open simultaneously by one process.
    88 The getdtablesize system call returns the current system limit.
    89 
    90 
    91 
    92  Notes:
    93 
    94  1) Mode values for group and others are ignored
    95 
    96  2) Execute bit and setuid on exec bit are ignored.
    97 
    98  3) The default working directory of a process is initalized to C: \\private\\UID 
    99   (UID of the calling application) and any data written into this directory persists 
   100   between phone resets.
   101 
   102  4) If the specified file is a symbolic link and the file it is pointing to 
   103   is invalid, the symbolic link file will be automatically removed.
   104 
   105  5) A file in cannot be created with write-only permissions. Attempting to create 
   106   a file with write-only permissions will result in a file with read-write permission.
   107 
   108  6) Creating a new file with the O_CREAT flag does not alter the time stamp 
   109   of the parent directory.
   110 
   111  7) A file has only two time stamps: access and modification. Creation time 
   112   stamp of the file is not supported and access time stamp is initially set equal 
   113   to modification time stamp.
   114 
   115  8) Users should not use O_DIRECT flag as the underlying implementation makes explicit
   116    use of O_DIRECT by default. Instead if the users want to use read/write 
   117    buffering they can use O_BUFFERED.
   118 
   119  9) Users should not use O_BINARY flag as the underlying implementation opens a file 
   120    in binary mode by default. Instead if the users want to open the file in text mode 
   121    they can use O_TEXT.
   122 
   123 Examples:
   124 @code
   125 /* This example creates a file in the current working directory and 
   126  * opens it in read-write mode. */
   127 #include <sys/types.h>
   128 #include <sys/stat.h>
   129 #include <fcntl.h>
   130 int main()
   131 {
   132   int fd = 0;
   133    fd = open("Example.txt" , O_CREAT | O_EXCL , 0666);
   134    if(fd < 0 ) 
   135    {
   136       printf("Failed to create and open file in current working directory 
   137 ");
   138       return -1;
   139    }
   140    printf("File created and opened in current working directory 
   141 "  );
   142    return 0;
   143 }
   144 
   145 @endcode
   146  Output
   147 @code
   148 File created and opened in current working directory
   149 
   150 @endcode
   151 @see chmod()
   152 @see close()
   153 @see dup()
   154 @see getdtablesize()
   155 @see lseek()
   156 @see read()
   157 @see umask()
   158 @see write()
   159 @see fopen()
   160 
   161 Limitations:
   162 
   163 KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
   164 not found or filesystem not mounted on the drive.
   165 
   166 @capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&) const
   167 
   168 @publishedAll
   169 @externallyDefinedApi
   170 */
   171 
   172 
   173 /** @fn  open64(const char *file, int flags, ...)
   174 @param file
   175 @param flags
   176 @param ...
   177 @return   If successful, open64() returns a non-negative integer, termed a file descriptor. It returns 
   178 -1 on failure and sets errno to indicate the error.
   179 
   180 
   181 For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
   182 
   183 @see open()
   184 
   185 @publishedAll
   186 @externallyDefinedApi
   187 */
   188 
   189 /**@typedef typedef	__off_t		off64_t;
   190 
   191 Large file offsets.
   192 
   193 @publishedAll
   194 @externallyDefinedApi
   195 */
   196 
   197 /** @fn  creat(const char *file, mode_t mode)
   198 @param file
   199 @param mode
   200 @return   open and creat return the new file descriptor, or -1 if an error occurred (in 
   201   which case errno is set appropriately).  
   202 
   203   This interface is made obsolete by: open
   204 
   205  The creat function
   206 is the same as: open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); Limitation :Creating a new file doesn't alter the time stamp of parent directory, created entry has only two time stamps access and modification timestamps.
   207 Creation time stamp of the file is not supported, here accesstime stamp is equal to modification time stamp.
   208 
   209 Examples:
   210 @code
   211 /* Detailed description   : This test code demonstrates creat system call usage, it creates a
   212  * in current working directory(if file exists then it is truncated. Preconditions : None */
   213 #include <sys/types.h>
   214 #include <sys/stat.h>
   215 #include <fcntl.h>
   216 int main()
   217 {
   218  int fd = 0;
   219   fd = creat("Example.txt" , 0666);
   220   if(fd < 0 )  
   221   {
   222     printf("File creation failed 
   223 ");
   224     return -1;
   225   }
   226   printf("Example.txt file created 
   227 ");
   228   return 0;
   229 }
   230 
   231 @endcode
   232  Output
   233 @code
   234 Example.txt file created
   235 
   236 @endcode
   237 @see open()
   238 
   239 Limitations:
   240 
   241 KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
   242 not found or filesystem not mounted on the drive.
   243 
   244 @capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&) const
   245 
   246 @publishedAll
   247 @externallyDefinedApi
   248 */
   249 
   250 /** @fn  creat64(const char *file, mode_t mode)
   251 @param file
   252 @param mode
   253 @return   creat64() returns the new file descriptor, or -1 if an error occurred (in 
   254   which case errno is set appropriately).  
   255 
   256 For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
   257 
   258 @see creat()
   259 
   260 @publishedAll
   261 @externallyDefinedApi
   262 */
   263 
   264 /** @fn  fcntl(int aFid, int aCmd, ...)
   265 @param aFid
   266 @param aCmd
   267 @param ...
   268 @return   Upon successful completion, the value returned depends on cmd as follows: F_DUPFD A new file descriptor. F_GETFD Value of flag (only the low-order bit is defined). F_GETFL Value of flags. F_GETOWN Value of file descriptor owner (Not supported). other Value other than -1. Otherwise, a value of -1 is returned and errno is set to indicate the error.
   269 
   270 @code
   271 The fcntl system call provides for control over descriptors. The argument fd is a descriptor to be operated on by cmd as described below. Depending on the value of cmd, fcntl can take an additional third argument int arg.
   272 
   273  F_DUPFD Return a new descriptor as follows: Lowest numbered available descriptor greater than or equal to arg. Same object references as the original descriptor. New descriptor shares the same file offset if the object
   274  was a file. Same access mode (read, write or read/write). Same file status flags (i.e., both file descriptors
   275  share the same file status flags). The close-on-exec flag associated with the new file descriptor
   276  is set to remain open across execve
   277  system calls. 
   278  
   279  Limitations: 
   280  
   281  The difference between two file descriptors passed must not 
   282        be greater than 8. If the difference is greater than 8 then behaviour of 
   283        fcntl system call is undefined.F_SELKW flag is not supported because of underlying platform limitations.
   284  F_RDLCK is not supported because  the native platform only supports exclusive locks and not shared locks.
   285 
   286 
   287 @code
   288 
   289  O_NONBLOCK Non-blocking I/O; if no data is available to a read system call, or if a write operation would block, the read or 
   290        write call returns -1 with the error EAGAIN. (This flag is Not supported for files)
   291  O_APPEND Force each write to append at the end of file;
   292  corresponds to the O_APPEND flag of open .
   293  (Setting this flag in fcntl currently has no effect on subsequent write system calls)
   294  O_DIRECT Minimize or eliminate the cache effects of reading and writing. The system 
   295        will attempt to avoid caching data during read or write. If it cannot avoid 
   296        caching the data it will minimize the impact the data has on the cache. 
   297        Use of this flag can drastically reduce performance if not used with care 
   298        (Not supported).
   299  O_ASYNC Enable the SIGIO signal to be sent to the process group when I/O is possible, 
   300        e.g. upon availability of data to be read (Not supported).
   301 
   302  F_GETLK Get the first lock that blocks the lock description pointed to by the
   303  third argument, arg, taken as a pointer to a struct flock (see above).
   304  The information retrieved overwrites the information passed to fcntl in the flock structure.
   305  If no lock is found that would prevent this lock from being created,
   306  the structure is left unchanged by this system call except for the
   307  lock type which is set to F_UNLCK .
   308  F_SETLK Set or clear a file segment lock according to the lock description
   309  pointed to by the third argument, arg, taken as a pointer to a struct flock (see above). 
   310  F_SETLK is used to establish shared (or read) locks ( F_RDLCK )( "F_RDLCK"  is  not supported)
   311  or exclusive (or write) locks, ( F_WRLCK, ) as well as remove either type of lock ( F_UNLCK. )
   312  If a shared or exclusive lock cannot be set, fcntl returns immediately with EAGAIN. (Not supported)
   313   
   314  F_SETLKW This command is the same as F_SETLK except that if a shared or exclusive lock is blocked by other locks,
   315  the process waits until the request can be satisfied.(Not Supported)
   316  If a signal that is to be caught is received while fcntl is waiting for a region, the fcntl will be interrupted if the signal handler has not specified the SA_RESTART . (Not supported)
   317 
   318 @endcode
   319 
   320 The fcntl system call provides for control over descriptors.
   321 The argument fd is a descriptor to be operated on by cmd as described below.
   322 Depending on the value of cmd, fcntl can take an additional third argument int arg . F_DUPFD Return a new descriptor as follows:
   323 
   324 Lowest numbered available descriptor greater than or equal to arg. Same object references as the original descriptor. New descriptor shares the same file offset if the object
   325 was a file. Same access mode (read, write or read/write). Same file status flags (i.e., both file descriptors
   326 share the same file status flags). The close-on-exec flag associated with the new file descriptor
   327 is set to remain open across execve
   328 system calls. Limitation: The difference between two file descriptors passed must not 
   329  be greater than 8. If the difference is greater than 8 then behaviour of 
   330 fcntl system call is undefined. F_GETFD Get the close-on-exec flag associated with the file descriptor fd as FD_CLOEXEC. If the returned value ANDed with FD_CLOEXEC is 0 the file will remain open across exec, otherwise the file will be closed upon execution of exec (arg is ignored). F_SETFD Set the close-on-exec flag associated with fd to arg, where arg is either 0 or FD_CLOEXEC, as described above. F_GETFL Get descriptor status flags, as described below (arg is ignored). F_SETFL Set descriptor status flags to arg . F_GETOWN Get the process ID or process group currently receiving SIGIO and SIGURG signals. Process groups are returned as negative values (arg is ignored)(Not supported). F_SETOWN Set the process or process group to receive SIGIO and SIGURG signals. Process groups are specified by supplying arg as negative, otherwise arg is interpreted as a process ID (Not supported).
   331 
   332  The flags for the F_GETFL and F_SETFL flags are as follows: O_NONBLOCK No	n-blocking I/O; if no data is available to a read system call, or if a write operation would block, the read or 
   333       write call returns -1 with the error EAGAIN. (This flag is Not supported for files) O_APPEND Force each write to append at the end of file;
   334 corresponds to the O_APPEND flag of open .
   335 (Setting this flag in fcntl currently has no effect on subsequent write system calls) O_DIRECT Minimize or eliminate the cache effects of reading and writing. The system 
   336       will attempt to avoid caching data during read or write. If it cannot avoid 
   337       caching the data it will minimize the impact the data has on the cache. 
   338       Use of this flag can drastically reduce performance if not used with care 
   339       (Not supported). O_ASYNC Enable the SIGIO signal to be sent to the process group when I/O is possible, 
   340       e.g. upon availability of data to be read (Not supported).
   341 
   342  Several commands are available for doing advisory file locking;
   343 they all operate on the following structure: 
   344 
   345 @code
   346 
   347 struct flock {
   348 off_tl_start;/* starting offset */
   349 off_tl_len;/* len = 0 means until end of file */
   350 pid_tl_pid;/* lock owner */
   351 shortl_type;/* lock type: read/write, etc. */
   352 shortl_whence;/* type of l_start */
   353 }; 
   354 
   355 @endcode
   356 
   357 The commands available for advisory record locking are as follows: 
   358 
   359 F_GETLK Get the first lock that blocks the lock description pointed to by the
   360 third argument, arg, taken as a pointer to a struct flock (see above).
   361 The information retrieved overwrites the information passed to fcntl in the flock structure.
   362 If no lock is found that would prevent this lock from being created,
   363 the structure is left unchanged by this system call except for the
   364 lock type which is set to F_UNLCK .
   365 
   366 F_SETLK  Set or clear a file segment lock according to the lock description
   367 pointed to by the third argument, arg, taken as a pointer to a struct flock (see above). 
   368 F_SETLK is used to establish shared (or read) locks ( F_RDLCK ) . Note "F_RDLCK"  is  not supported)
   369 or exclusive (or write) locks, ( F_WRLCK, ) as well as remove either type of lock ( F_UNLCK. )
   370 If a shared or exclusive lock cannot be set, fcntl returns immediately with EAGAIN. (Not supported) 
   371 
   372 F_SETLKW This command is the same as F_SETLK except that if a shared or exclusive lock is blocked by other locks,
   373 the process waits until the request can be satisfied.
   374 If a signal that is to be caught is received while fcntl is waiting for a region, the fcntl will be interrupted if the signal handler has not specified the SA_RESTART . (Not supported)
   375 
   376  When a shared lock has been set on a segment of a file,other processes can set shared locks on that segment
   377 or a portion of it.A shared lock prevents any other process from setting an exclusive lock on any portion of the protected area.
   378 A request for a shared lock fails if the file descriptor was not opened with read access.
   379 
   380 An exclusive lock prevents any other process from setting a shared lock or an exclusive lock on any portion of the protected area.
   381 A request for an exclusive lock fails if the file was not opened with write access.
   382 
   383  The value of l_whence is SEEK_SET, SEEK_CUR, or SEEK_END to indicate that the relative offset, l_start bytes, will be measured from the start of the file,
   384 current position, or end of the file, respectively.
   385 The value of l_len is the number of consecutive bytes to be locked.
   386 If l_len is negative, l_start means end edge of the region.
   387 The l_pid field is only used with F_GETLK to return the process ID of the process holding a blocking lock .( Not Supported  )
   388 After a successful F_GETLK request, the value of l_whence is SEEK_SET.
   389 
   390  Locks may start and extend beyond the current end of a file,
   391 but may not start or extend before the beginning of the file.
   392 A lock is set to extend to the largest possible value of the
   393 file offset for that file if l_len is set to zero.
   394 If l_whence and l_start point to the beginning of the file, and l_len is zero, the entire file is locked.
   395 If an application wishes only to do entire file locking, the flock system call is much more efficient.
   396 
   397 There is at most one type of lock set for each byte in the file.
   398 Before a successful return from an F_SETLK or an F_SETLKW ( Not Supported  ) request when the calling process has previously existing locks on bytes in the region specified by the request,
   399 the previous lock type for each byte in the specified
   400 region is replaced by the new lock type.
   401 As specified above under the descriptions
   402 of shared locks and exclusive locks, an F_SETLK or an F_SETLKW request fails or blocks respectively when another process has existing
   403 locks on bytes in the specified region and the type of any of those
   404 locks conflicts with the type specified in the request.
   405 
   406  This interface follows the completely stupid [sic] semantics of System 
   407   V and -p1003.1-88 that require that all locks associated with a file for a 
   408   given process are removed when any file descriptor for that file is closed by that process. This semantic 
   409   means that applications must be aware of any files that a subroutine library 
   410   may access. For example if an application for updating the password file locks 
   411   the password file database while making the update, and then calls getpwnam to retrieve a record, the lock will 
   412   be lost because getpwnam opens, reads, and closes the password 
   413   database. The database close will release all locks that the process has associated 
   414   with the database, even if the library routine never requested a lock on the 
   415   database. Another minor semantic problem with this interface is that locks are 
   416   not inherited by a child process created using the fork system 
   417   call. The flock interface has much more rational last close semantics and allows locks to be 
   418   inherited by child processes. The flock system call is recommended for applications that want to ensure the integrity 
   419   of their locks when using library routines or wish to pass locks to their children.
   420 
   421  The fcntl, flock ,
   422 and lockf locks are compatible.
   423 Processes using different locking interfaces can cooperate
   424 over the same file safely.
   425 However, only one of such interfaces should be used within
   426 the same process.
   427 If a file is locked by a process through flock ,
   428 any record within the file will be seen as locked
   429 from the viewpoint of another process using fcntl or lockf ,
   430 and vice versa.
   431 Note that fcntl (F_GETLK); returns -1 in l_pid if the process holding a blocking lock previously locked the
   432 file descriptor by flock .
   433 
   434  All locks associated with a file for a given process are
   435 removed when the process terminates.
   436 
   437  All locks obtained before a call to execve remain in effect until the new program releases them.
   438 If the new program does not know about the locks, they will not be
   439 released until the program exits.
   440 
   441  A potential for deadlock occurs if a process controlling a locked region
   442 is put to sleep by attempting to lock the locked region of another process.
   443 This implementation detects that sleeping until a locked region is unlocked
   444 would cause a deadlock and fails with an EDEADLK error.
   445 
   446 If 'aFid' corresponds to a shared memory object the only values of cmd that are supported are 
   447 F_DUPFD, F_GETFD, F_SETFD, F_SETFL, F_GETFL.
   448 
   449 Examples:
   450 @code
   451 /* Detailed description : Sample usafe of fcntl system call */
   452 #include <stdio.h>
   453 #include <fcntl.h>
   454 int main()
   455 {
   456   int fd  = 0;
   457   int flags = 0;
   458   fd = open("Example.txt " , O_CREAT | O_RDWR  , 0666);
   459   if(fd < 0 ) 
   460   {
   461      printf("Failed to open file Example.txt
   462 ");
   463      return -1;
   464   }
   465   if( (flags = fcntl(fd , F_GETFL) ) < 0 )  
   466   {
   467      printf("Fcntl system call failed 
   468 ");
   469      return -1;
   470   }
   471   printf("Flags of the file %o 
   472 " , flags);
   473   return 0;
   474 }
   475 
   476 @endcode
   477  Output
   478 @code
   479 Flags of the file 2
   480 
   481 @endcode
   482 @see close()
   483 @see flock()
   484 @see getdtablesize()
   485 @see open()
   486 
   487 
   488  
   489 
   490 @publishedAll
   491 @externallyDefinedApi
   492 */
   493 
   494 
   495 /** @def O_RDONLY
   496 
   497 open for reading only
   498 
   499 @publishedAll
   500 @externallyDefinedApi
   501 */
   502 
   503 /** @def O_WRONLY
   504 
   505 open for writing only
   506 
   507 @publishedAll
   508 @externallyDefinedApi
   509 */
   510 
   511 /** @def O_RDWR	
   512 
   513 open for reading and writing 
   514 
   515 @publishedAll
   516 @externallyDefinedApi
   517 */
   518 
   519 
   520 /** @def O_ACCMODE
   521 
   522 mask for above modes
   523 
   524 @publishedAll
   525 @externallyDefinedApi
   526 */
   527 
   528 /** @def O_NONBLOCK
   529 
   530 no delay
   531 
   532 @publishedAll
   533 @externallyDefinedApi
   534 */
   535 
   536 /** @def O_APPEND
   537 
   538 set append mode 
   539 
   540 @publishedAll
   541 @externallyDefinedApi
   542 */
   543 
   544 /** @def O_CREAT	
   545 
   546 create if nonexistent 
   547 
   548 @publishedAll
   549 @externallyDefinedApi
   550 */
   551 
   552 /** @def O_TRUNC	
   553 
   554 truncate to zero length
   555 
   556 @publishedAll
   557 @externallyDefinedApi
   558 */
   559 
   560 
   561 /** @def O_EXCL	
   562 
   563 error if already exists
   564 
   565 @publishedAll
   566 @externallyDefinedApi
   567 */
   568 
   569 /** @def O_NOCTTY	
   570 
   571 don't assign controlling terminal
   572 
   573 @publishedAll
   574 @externallyDefinedApi
   575 */
   576 
   577 /** @def F_DUPFD	
   578 
   579 Duplicate file descriptor.
   580 	
   581 @publishedAll
   582 @externallyDefinedApi
   583 */
   584 
   585 
   586 /** @def F_GETFD	
   587 
   588 Get file descriptor flags.
   589 	
   590 @publishedAll
   591 @externallyDefinedApi
   592 */
   593 
   594 /** @def F_SETFD	
   595 
   596 set file descriptor flags
   597 		
   598 @publishedAll
   599 @externallyDefinedApi
   600 */
   601 
   602 /** @def F_GETFL
   603 
   604 get file status flags
   605 		
   606 @publishedAll
   607 @externallyDefinedApi
   608 */
   609 
   610 /** @def F_SETFL	
   611 
   612 set file status flags 		
   613 
   614 @publishedAll
   615 @externallyDefinedApi
   616 */
   617 
   618 /** @def F_GETOWN		
   619 
   620 get SIGIO/SIGURG proc/pgrp
   621 
   622 @publishedAll
   623 @externallyDefinedApi
   624 */
   625 
   626 /** @def F_SETOWN		
   627 
   628 set SIGIO/SIGURG proc/pgrp 
   629 	
   630 @publishedAll
   631 @externallyDefinedApi
   632 */
   633 
   634 /** @def F_GETLK	
   635 
   636 get record locking information
   637 		
   638 @publishedAll
   639 @externallyDefinedApi
   640 */
   641 
   642 
   643 /** @def F_SETLK	
   644 
   645 set record locking information
   646 			
   647 @publishedAll
   648 @externallyDefinedApi
   649 */
   650 
   651 /** @def F_SETLKW	
   652 
   653 F_SETLK; wait if blocked
   654 		
   655 @publishedAll
   656 @externallyDefinedApi
   657 */
   658 
   659 /** @def F_GETLK64	
   660 
   661 get record locking information of large file
   662 		
   663 @publishedAll
   664 @externallyDefinedApi
   665 */
   666 
   667 
   668 /** @def F_SETLK64	
   669 
   670 set record locking information to a large file
   671 			
   672 @publishedAll
   673 @externallyDefinedApi
   674 */
   675 
   676 /** @def F_SETLKW64	
   677 
   678 F_SETLK; wait if blocked in a large file
   679 		
   680 @publishedAll
   681 @externallyDefinedApi
   682 */
   683 
   684 /** @def F_RDLCK	
   685 
   686 shared or read lock 
   687 		
   688 @publishedAll
   689 @externallyDefinedApi
   690 */
   691 
   692 /** @def F_UNLCK	
   693 
   694 unlock 
   695 	
   696 @publishedAll
   697 @externallyDefinedApi
   698 */
   699 
   700 /** @def F_WRLCK
   701 
   702 exclusive or write lock 
   703 	
   704 @publishedAll
   705 @externallyDefinedApi
   706 */
   707 
   708 /** @def O_SYNC		
   709 
   710 POSIX synonym for O_FSYNC 
   711 	
   712 @publishedAll
   713 @externallyDefinedApi
   714 */
   715 
   716 /** @def FD_CLOEXEC	
   717 
   718 close-on-exec flag 
   719 
   720 @publishedAll
   721 @externallyDefinedApi
   722 */
   723 
   724 
   725 /** @def FREAD
   726 
   727 Kernel encoding of open mode; separate read and write bits that are independently testable: 1 greater than the above.
   728 FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, which was documented to use FREAD/FWRITE, continues to work.
   729 
   730 @publishedAll
   731 @externallyDefinedApi
   732 */
   733 
   734 
   735 /** @def FWRITE	
   736 
   737 Kernel encoding of open mode; separate read and write bits that are independently testable: 1 greater than the above.
   738 FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, which was documented to use FREAD/FWRITE, continues to work.
   739 
   740 @publishedAll
   741 @externallyDefinedApi
   742 */
   743 
   744 
   745 
   746 
   747 
   748 
   749 
   750 
   751 
   752 
   753 
   754