Print this page
    
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/test/os-tests/tests/file-locking/util.h
          +++ new/usr/src/test/os-tests/tests/file-locking/util.h
   1    1  /*
   2    2   * This file and its contents are supplied under the terms of the
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2016 Joyent, Inc.
  14   14   */
  15   15  
  16   16  #ifndef FLOCK_TEST_UTIL_H
  17   17  #define FLOCK_TEST_UTIL_H
  18   18  
  19   19  #include <fcntl.h>
  20   20  #include <sys/types.h>
  21   21  
  22   22  #define BAD_ARGS_MESSAGE        "Expected to receive 3 arguments, but found %d."
  23   23  #define BAD_MODE_MESSAGE        "Lock mode must be one of " \
  24   24          "\"shared\" or \"exclusive\""
  25   25  #define BAD_LOCK_MESSAGE        "Lock style must be one of " \
  26   26          "\"posix\", \"ofd\", or \"exclusive\""
  27   27  
  28   28  typedef enum lock_style {
  29   29          LSTYLE_POSIX,
  30   30          LSTYLE_OFD,
  31   31          LSTYLE_FLOCK,
  32   32          LSTYLE_LAST
  33   33  } lock_style_t;
  34   34  
  35   35  extern boolean_t        LOG;
  36   36  
  37   37  extern boolean_t        flock_nodata(int);
  38   38  
  39   39  extern void     flock_block(int);
  40   40  extern void     flock_alert(int);
  41   41  extern void     flock_log(const char *, ...);
  42   42  extern void     flock_reinit(struct flock *, int);
  43   43  
  44   44  extern char             *flock_cmdname(int);
  45   45  extern char             *flock_stylename(lock_style_t);
  46   46  extern char             *flock_stylestr(lock_style_t);
  47   47  extern lock_style_t     flock_styleenum(char *);
  48   48  
  49   49  #endif /* FLOCK_TEST_UTIL_H */
  
    | 
      ↓ open down ↓ | 
    49 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX