summaryrefslogtreecommitdiff
path: root/hurd/hurd/userlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurd/userlink.h')
-rw-r--r--hurd/hurd/userlink.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/hurd/hurd/userlink.h b/hurd/hurd/userlink.h
index 4c6921fd03..f9362557cb 100644
--- a/hurd/hurd/userlink.h
+++ b/hurd/hurd/userlink.h
@@ -1,5 +1,5 @@
/* Support for chains recording users of a resource; `struct hurd_userlink'.
- Copyright (C) 1994-2016 Free Software Foundation, Inc.
+ Copyright (C) 1994-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,11 @@
#define __need_NULL
#include <stddef.h>
-#include <hurd/signal.h>
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
+# include <hurd/signal.h>
+# endif
+#endif
#include <setjmp.h>
@@ -76,11 +80,12 @@ struct hurd_userlink
/* Attach LINK to the chain of users at *CHAINP. */
-void
+extern void
_hurd_userlink_link (struct hurd_userlink **chainp,
struct hurd_userlink *link);
-#if defined __USE_EXTERN_INLINES && defined _LIBC && !defined NOT_IN_libc
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
_HURD_USERLINK_H_EXTERN_INLINE void
_hurd_userlink_link (struct hurd_userlink **chainp,
struct hurd_userlink *link)
@@ -101,15 +106,17 @@ _hurd_userlink_link (struct hurd_userlink **chainp,
link->thread.prevp = thread_chainp;
*thread_chainp = link;
}
+# endif
#endif
/* Detach LINK from its chain. Returns nonzero iff this was the
last user of the resource and it should be deallocated. */
-int _hurd_userlink_unlink (struct hurd_userlink *link);
+extern int _hurd_userlink_unlink (struct hurd_userlink *link);
-#if defined __USE_EXTERN_INLINES && defined _LIBC && !defined NOT_IN_libc
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
_HURD_USERLINK_H_EXTERN_INLINE int
_hurd_userlink_unlink (struct hurd_userlink *link)
{
@@ -132,6 +139,7 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
return dealloc;
}
+# endif
#endif
@@ -141,9 +149,10 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
value is zero, someone is still using the resource and they will
deallocate it when they are finished. */
-int _hurd_userlink_clear (struct hurd_userlink **chainp);
+extern int _hurd_userlink_clear (struct hurd_userlink **chainp);
-#if defined __USE_EXTERN_INLINES && defined _LIBC && !defined NOT_IN_libc
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
_HURD_USERLINK_H_EXTERN_INLINE int
_hurd_userlink_clear (struct hurd_userlink **chainp)
{
@@ -156,6 +165,7 @@ _hurd_userlink_clear (struct hurd_userlink **chainp)
*chainp = NULL;
return 0;
}
+# endif
#endif
#endif /* hurd/userlink.h */