1 #ifndef WRITE_LOCK_MECHANISM_H__
2 #define WRITE_LOCK_MECHANISM_H__
7 #define MAX_LOCKNAME_LEN 512
11 #define LOCK_STALE_SEC 300
15 #define LOCK_TIMEOUT 9000
19 #define LOCK_INVALID -1
22 #define LOCK_FILESET_FAIL -6
23 #define LOCK_TIMEOUT_ERROR -5
24 #define LOCK_FILE_ERROR -4
25 #define LOCK_STALE_ERROR -3
26 #define LOCK_PARSE_ERROR -2
27 #define LOCK_PROCESS_NO_PRIORITY -1
28 #define LOCK_STATUS_OK 0
29 #define LOCK_PROCESS_HAS_PRIORITY 1
char * rootname(rootsum *rsumm)
Definition: rootname.c:29
void init_lockfile_data(lockfile_data_struct *data)
Definition: create_lockfile.c:31
void remove_lockfile()
Definition: create_lockfile.c:48
lockfile_data_struct global_lockfile_data
Definition: fourfit3.c:72
int parse_lockfile_name(char *lockfile_name_base, lockfile_data_struct *result)
Definition: create_lockfile.c:57
unsigned long int time_usec
Definition: write_lock_mechanism.h:39
int at_front(char *rootname, char *lockfile_name, int cand_seq_no)
Definition: wait_for_write_lock.c:32
unsigned long int time_sec
Definition: write_lock_mechanism.h:38
#define MAX_LOCKNAME_LEN
Definition: write_lock_mechanism.h:7
void clear_global_lockfile_data()
Definition: create_lockfile.c:43
int create_lockfile(char *rootname, char *lockfile_name, int cand_seq_no)
Definition: create_lockfile.c:170
int validity
Definition: write_lock_mechanism.h:35
int wait_for_write_lock(char *rootname, char *lockfile_name, struct fileset *fset)
Definition: wait_for_write_lock.c:163
int check_stale(lockfile_data_struct *other)
Definition: create_lockfile.c:95
char lockfile_name[MAX_LOCKNAME_LEN]
Definition: write_lock_mechanism.h:41
char hostname[256]
Definition: write_lock_mechanism.h:40
unsigned int pid
Definition: write_lock_mechanism.h:37
unsigned int seq_number
Definition: write_lock_mechanism.h:36
int lock_has_priority(lockfile_data_struct *other)
Definition: create_lockfile.c:120
Definition: write_lock_mechanism.h:34