summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/opencrypto
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-10 14:33:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-31 13:18:46 +0100
commit3842b81723eb96ae16919b3cc09dffd81124ecfd (patch)
tree39c45b4eb44950e3794cb02ab40d878b0d213a25 /freebsd/sys/opencrypto
parentDelete unused struct proc fields (diff)
downloadrtems-libbsd-3842b81723eb96ae16919b3cc09dffd81124ecfd.tar.bz2
Delete struct proc p_mtx lock
Usage of this lock is highly dangerous since agents may assume that this lock is actually used for process management. There is only one process in RTEMS.
Diffstat (limited to 'freebsd/sys/opencrypto')
-rw-r--r--freebsd/sys/opencrypto/crypto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/freebsd/sys/opencrypto/crypto.c b/freebsd/sys/opencrypto/crypto.c
index 006d33ea..2a1b3ed0 100644
--- a/freebsd/sys/opencrypto/crypto.c
+++ b/freebsd/sys/opencrypto/crypto.c
@@ -264,10 +264,15 @@ crypto_terminate(struct proc **pp, void *q)
*pp = NULL;
if (p) {
wakeup_one(q);
+#ifndef __rtems__
PROC_LOCK(p); /* NB: insure we don't miss wakeup */
CRYPTO_DRIVER_UNLOCK(); /* let crypto_finis progress */
msleep(p, &p->p_mtx, PWAIT, "crypto_destroy", 0);
PROC_UNLOCK(p);
+#else /* __rtems__ */
+ /* FIXME: The hacks with the PROC_LOCK() do not work on RTEMS */
+ BSD_ASSERT(0);
+#endif /* __rtems__ */
CRYPTO_DRIVER_LOCK();
}
}