summaryrefslogtreecommitdiff
path: root/sys/external/bsd/common/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sys/external/bsd/common/include/linux')
-rw-r--r--sys/external/bsd/common/include/linux/completion.h16
-rw-r--r--sys/external/bsd/common/include/linux/errno.h11
-rw-r--r--sys/external/bsd/common/include/linux/list.h14
3 files changed, 38 insertions, 3 deletions
diff --git a/sys/external/bsd/common/include/linux/completion.h b/sys/external/bsd/common/include/linux/completion.h
index b41c451502d..bbb92902cda 100644
--- a/sys/external/bsd/common/include/linux/completion.h
+++ b/sys/external/bsd/common/include/linux/completion.h
@@ -1,4 +1,4 @@
-/* $NetBSD: completion.h,v 1.3 2014/05/05 15:59:11 skrll Exp $ */
+/* $NetBSD: completion.h,v 1.4 2014/07/03 20:48:19 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,6 +29,20 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * Notes on porting:
+ *
+ * - Linux does not have destroy_completion. You must add it yourself
+ * in the appropriate place.
+ *
+ * - Some Linux code does `completion->done++' or similar. Convert
+ * that to complete(completion) and suggest the same change upstream,
+ * unless it turns out there actually is a good reason to do that, in
+ * which case the Linux completion API should be extended with a
+ * sensible name for this that doesn't expose the guts of `struct
+ * completion'.
+ */
+
#ifndef _LINUX_COMPLETION_H_
#define _LINUX_COMPLETION_H_
diff --git a/sys/external/bsd/common/include/linux/errno.h b/sys/external/bsd/common/include/linux/errno.h
index 9210a886039..cccf42a8c2a 100644
--- a/sys/external/bsd/common/include/linux/errno.h
+++ b/sys/external/bsd/common/include/linux/errno.h
@@ -1,4 +1,4 @@
-/* $NetBSD: errno.h,v 1.1 2014/04/07 11:55:29 riastradh Exp $ */
+/* $NetBSD: errno.h,v 1.2 2014/07/03 20:48:19 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,6 +29,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * Notes on porting:
+ *
+ * - Linux consistently passes around negative errno values. NetBSD
+ * consistently passes around positive ones, except the special magic
+ * in-kernel ones (EJUSTRETURN, ERESTART, &c.) which should not be
+ * exposed to userland. Be careful!
+ */
+
#ifndef _LINUX_ERRNO_H_
#define _LINUX_ERRNO_H_
diff --git a/sys/external/bsd/common/include/linux/list.h b/sys/external/bsd/common/include/linux/list.h
index 4d9bb7839d6..2fc2a250abc 100644
--- a/sys/external/bsd/common/include/linux/list.h
+++ b/sys/external/bsd/common/include/linux/list.h
@@ -1,4 +1,4 @@
-/* $NetBSD: list.h,v 1.1 2013/09/05 15:28:07 skrll Exp $ */
+/* $NetBSD: list.h,v 1.2 2014/07/03 20:48:19 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,6 +29,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * Notes on porting:
+ *
+ * - LIST_HEAD(x) means a declaration `struct list_head x =
+ * LIST_HEAD_INIT(x)' in Linux, but something else in NetBSD.
+ * Replace by the expansion.
+ *
+ * - The `_rcu' routines here are not actually pserialize(9)-safe.
+ * They need dependent read memory barriers added. Please fix this
+ * if you need to use them with pserialize(9).
+ */
+
#ifndef _LINUX_LIST_H_
#define _LINUX_LIST_H_