IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2005, 9:11:15 PM (21 years ago)
Author:
eugene
Message:

cleaning up fsetlockfile / fclearlockfile (dropped setlockfile2/clearlockfile2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libohana/include/ohana.h

    r3522 r3649  
    3636# define DTIME(A,B) ((A.tv_sec - B.tv_sec) + 1e-6*(A.tv_usec - B.tv_usec))
    3737
    38 # define LCK_UNLOCK  0   /* file is unlocked */
    39 # define LCK_ACCESS  1   /* can't get access to file */
    40 # define LCK_TIMEOUT 2   /* timeout setting lock */
    41 # define LCK_HARDLCK 3   /* error setting hard lockfile */
    42 # define LCK_HUNLOCK 4   /* error clearing hard lockfile */
     38enum {
     39 LCK_UNLOCK,        /* file is unlocked */
     40 LCK_INVALID,       /* invalid locktype requested */
     41 LCK_MISSING,       /* soft requested and file missing (error) */
     42 LCK_ACCESS,        /* can't get access to file */
     43 LCK_TIMEOUT,       /* timeout setting lock */
     44 LCK_HARDOPEN,      /* cannot open hard lockfile */
     45 LCK_HARDLOCK,      /* cannot lock hard lockfile */
     46 LCK_HARDLOCKHARD,  /* hard lockfile is locked */
     47 LCK_HARDCLOSE,     /* cannot write to hardlock */
    4348
    44 # define LCK_EMPTY   5   /* locked file is empty */
    45 # define LCK_FULL    6   /* locked file is not empty */
    46 # define LCK_UNKNOWN 7   /* can't stat file to get size */
     49 LCK_EMPTY,         /* file is locked and empty */
     50 LCK_FULL,          /* file is locked and not empty */
     51 LCK_UNKNOWN,       /* file is locked, but can't get size */
    4752
    48 # define LCK_SOFT    10  /* soft lock */
    49 # define LCK_HARD    11  /* hard lock */
    50 # define LCK_XCLD    12  /* exclusive soft lock */
     53 LCK_SOFT,          /* soft lock */
     54 LCK_HARD,          /* hard lock */
     55 LCK_XCLD,          /* exclusive soft lock */
     56};
    5157
    5258# ifndef M_PI
     
    126132FILE *fsetlockfile (char *filename, double timeout, int type, int *state);
    127133int   fclearlockfile (char *filename, FILE *f, int type, int *state);
    128 int   setlockfile2 (char *filename, double timeout, int type, int *state);
    129 int   clearlockfile2 (char *filename, int fd, int type, int *state);
    130134
    131135/* in config.c */
Note: See TracChangeset for help on using the changeset viewer.