xref: /freebsd/sys/contrib/openzfs/cmd/zed/zed_file.h (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1 // SPDX-License-Identifier: CDDL-1.0
2 /*
3  * This file is part of the ZFS Event Daemon (ZED).
4  *
5  * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
6  * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
7  * Refer to the OpenZFS git commit log for authoritative copyright attribution.
8  *
9  * The contents of this file are subject to the terms of the
10  * Common Development and Distribution License Version 1.0 (CDDL-1.0).
11  * You can obtain a copy of the license from the top-level file
12  * "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.
13  * You may not use this file except in compliance with the license.
14  */
15 
16 #ifndef	ZED_FILE_H
17 #define	ZED_FILE_H
18 
19 #include <sys/types.h>
20 #include <unistd.h>
21 
22 int zed_file_lock(int fd);
23 
24 int zed_file_unlock(int fd);
25 
26 pid_t zed_file_is_locked(int fd);
27 
28 void zed_file_close_from(int fd);
29 
30 #endif	/* !ZED_FILE_H */
31