summaryrefslogtreecommitdiff
path: root/usr/src/lib/librename/common/librename.h
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2014-07-24 00:06:24 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2021-11-03 09:48:48 +0000
commit6e2462f93bf3de7b08885a4677464e11be3c807b (patch)
treefe72b5405f3c0412ebcd028d3b4547524e37422c /usr/src/lib/librename/common/librename.h
parent99e6398ed34e1943640f382fec1971ba1ecc2f99 (diff)
downloadillumos-gate-6e2462f93bf3de7b08885a4677464e11be3c807b.tar.gz
14196 Want librename
Reviewed by: Peter Tribble <peter.tribble@gmail.com> Reviewed by: Yuri Pankov <ypankov@tintri.com> Reviewed by: Andy Fiddaman <andy@omnios.org> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Diffstat (limited to 'usr/src/lib/librename/common/librename.h')
-rw-r--r--usr/src/lib/librename/common/librename.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/usr/src/lib/librename/common/librename.h b/usr/src/lib/librename/common/librename.h
new file mode 100644
index 0000000000..82e0634086
--- /dev/null
+++ b/usr/src/lib/librename/common/librename.h
@@ -0,0 +1,39 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright (c) 2014 Joyent, Inc. All rights reserved.
+ */
+
+#ifndef _LIBRENAME_H
+#define _LIBRENAME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct librename_atomic librename_atomic_t;
+
+#define LIBRENAME_ATOMIC_NOUNLINK 0x01
+#define LIBRENAME_ATOMIC_CLOEXEC 0x02
+extern int librename_atomic_init(const char *, const char *, const char *,
+ int, int, librename_atomic_t **);
+extern int librename_atomic_fdinit(int, const char *, const char *, int, int,
+ librename_atomic_t **);
+extern int librename_atomic_fd(librename_atomic_t *);
+extern int librename_atomic_commit(librename_atomic_t *);
+extern void librename_atomic_fini(librename_atomic_t *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _LIBRENAME_H */