• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @file op_lockfile.h
3  * PID-based lockfile management
4  *
5  * @remark Copyright 2002 OProfile authors
6  * @remark Read the file COPYING
7  *
8  * @author John Levon
9  * @author Philippe Elie
10  */
11 
12 #ifndef OP_LOCKFILE_H
13 #define OP_LOCKFILE_H
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #include <sys/types.h>
20 
21 /**
22  * op_write_lock_file - write a lock file
23  * \return errno on failure, or 0 on success
24  *
25  * Write the pid into the given lock file. Stale
26  * lock files are detected and reset.
27  */
28 int op_write_lock_file(char const * file);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* OP_LOCKFILE_H */
35