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.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/hurd/hurd/userlink.h b/hurd/hurd/userlink.h
index 275ce0cdd8..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,6 +80,12 @@ struct hurd_userlink
/* Attach LINK to the chain of users at *CHAINP. */
+extern void
+_hurd_userlink_link (struct hurd_userlink **chainp,
+ struct hurd_userlink *link);
+
+#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)
@@ -96,11 +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. */
+extern int _hurd_userlink_unlink (struct hurd_userlink *link);
+
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
_HURD_USERLINK_H_EXTERN_INLINE int
_hurd_userlink_unlink (struct hurd_userlink *link)
{
@@ -123,6 +139,8 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
return dealloc;
}
+# endif
+#endif
/* Clear all users from *CHAINP. Call this when the resource *CHAINP
@@ -131,6 +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. */
+extern int _hurd_userlink_clear (struct hurd_userlink **chainp);
+
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
_HURD_USERLINK_H_EXTERN_INLINE int
_hurd_userlink_clear (struct hurd_userlink **chainp)
{
@@ -143,5 +165,7 @@ _hurd_userlink_clear (struct hurd_userlink **chainp)
*chainp = NULL;
return 0;
}
+# endif
+#endif
#endif /* hurd/userlink.h */