[rtems-libbsd commit] Use _Thread_Get_priority()
Sebastian Huber
sebh at rtems.org
Thu Sep 22 05:23:04 UTC 2016
Module: rtems-libbsd
Branch: master
Commit: 2c44b51475674c54e9b27178acb051f0e485a818
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=2c44b51475674c54e9b27178acb051f0e485a818
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Sep 22 07:21:54 2016 +0200
Use _Thread_Get_priority()
---
freebsd/sys/kern/subr_sleepqueue.c | 4 ++--
rtemsbsd/rtems/rtems-bsd-shell.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/freebsd/sys/kern/subr_sleepqueue.c b/freebsd/sys/kern/subr_sleepqueue.c
index b6b1237..b91806f 100644
--- a/freebsd/sys/kern/subr_sleepqueue.c
+++ b/freebsd/sys/kern/subr_sleepqueue.c
@@ -369,8 +369,8 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
/* FIXME: This is broken with clustered scheduling */
succ = NULL;
TAILQ_FOREACH(succ, &sq->sq_blocked[queue], td_slpq) {
- if (td->td_thread->current_priority <
- succ->td_thread->current_priority)
+ if (_Thread_Get_priority(td->td_thread) <
+ _Thread_Get_priority(succ->td_thread))
break;
}
if (succ == NULL)
diff --git a/rtemsbsd/rtems/rtems-bsd-shell.c b/rtemsbsd/rtems/rtems-bsd-shell.c
index 2cf8ede..b54bb79 100644
--- a/rtemsbsd/rtems/rtems-bsd-shell.c
+++ b/rtemsbsd/rtems/rtems-bsd-shell.c
@@ -49,6 +49,7 @@
#include <inttypes.h>
#include <rtems/netcmds-config.h>
+#include <rtems/score/threadimpl.h>
static void
rtems_bsd_dump_thread(Thread_Control *thread)
@@ -68,7 +69,7 @@ rtems_bsd_dump_thread(Thread_Control *thread)
stdout,
" 0x%08" PRIx32 " | %8" PRIu32 " | %s\n",
thread->Object.id,
- thread->current_priority,
+ _Thread_Get_priority(thread),
name
);
}
More information about the vc
mailing list