Use thread name support

Update #2858.
This commit is contained in:
Sebastian Huber
2017-01-12 14:56:23 +01:00
parent fb288fabea
commit 172f2acb2b
11 changed files with 9 additions and 128 deletions

View File

@@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$");
#endif
#include <machine/rtems-bsd-thread.h>
#define RTEMSBSD_SWI_WAKEUP_EVENT RTEMS_EVENT_31
#undef ticks
#include <rtems/score/threadimpl.h>
#endif /* __rtems__ */
#include <machine/stdarg.h>
#ifdef DDB
@@ -195,7 +197,11 @@ ithread_update(struct intr_thread *ithd)
pri = TAILQ_FIRST(&ie->ie_handlers)->ih_pri;
/* Update name and priority. */
#ifndef __rtems__
strlcpy(td->td_name, ie->ie_fullname, sizeof(td->td_name));
#else /* __rtems__ */
_Thread_Set_name(td->td_thread, ie->ie_fullname);
#endif /* __rtems__ */
#ifdef KTR
sched_clear_tdname(td);
#endif

View File

@@ -223,7 +223,6 @@ struct thread {
#ifdef __rtems__
Thread_Control *td_thread;
struct rtems_bsd_program_control *td_prog_ctrl;
char td_name[32];
#endif /* __rtems__ */
#ifndef __rtems__
struct mtx *volatile td_lock; /* replaces sched lock */