[rtems-libbsd commit] Dummy PHOLD() and PRELE()

Sebastian Huber sebh at rtems.org
Tue Apr 26 13:22:24 UTC 2016


Module:    rtems-libbsd
Branch:    master
Commit:    fa69a12153a690c8020311a78cb64c3b97e3d2a5
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=fa69a12153a690c8020311a78cb64c3b97e3d2a5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Oct 30 08:00:59 2015 +0100

Dummy PHOLD() and PRELE()

---

 freebsd/sys/sys/proc.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/freebsd/sys/sys/proc.h b/freebsd/sys/sys/proc.h
index e31f199..c393e71 100644
--- a/freebsd/sys/sys/proc.h
+++ b/freebsd/sys/sys/proc.h
@@ -795,6 +795,7 @@ extern pid_t pid_max;
 #define	SESS_LOCKED(s)	mtx_owned(&(s)->s_mtx)
 #define	SESS_LOCK_ASSERT(s, type)	mtx_assert(&(s)->s_mtx, (type))
 
+#ifndef __rtems__
 /* Hold process U-area in memory, normally for ptrace/procfs work. */
 #define	PHOLD(p) do {							\
 	PROC_LOCK(p);							\
@@ -828,6 +829,10 @@ extern pid_t pid_max;
 #define PROC_ASSERT_NOT_HELD(p) do {					\
 	KASSERT((p)->p_lock == 0, ("process held"));			\
 } while (0)
+#else /* __rtems__ */
+#define	PHOLD(x) do { } while (0)
+#define	PRELE(x) do { } while (0)
+#endif /* __rtems__ */
 
 /* Check whether a thread is safe to be swapped out. */
 #define	thread_safetoswapout(td)	((td)->td_flags & TDF_CANSWAP)



More information about the vc mailing list