mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-26 05:31:07 +08:00
SLEEPQUEUE(9): Add wmesg to thread wait info
This commit is contained in:
parent
ee94f8a8ea
commit
1fd5083234
@ -399,12 +399,13 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
|
||||
executing = td->td_thread;
|
||||
_Thread_Wait_acquire_default(executing, &lock_context);
|
||||
td->td_sq_state = TD_SQ_TIRED;
|
||||
executing->Wait.return_argument_second.immutable_object = wmesg;
|
||||
#endif /* __rtems__ */
|
||||
td->td_sleepqueue = NULL;
|
||||
td->td_sqqueue = queue;
|
||||
td->td_wchan = wchan;
|
||||
td->td_wmesg = wmesg;
|
||||
#ifndef __rtems__
|
||||
td->td_wmesg = wmesg;
|
||||
if (flags & SLEEPQ_INTERRUPTIBLE) {
|
||||
td->td_flags |= TDF_SINTR;
|
||||
td->td_flags &= ~TDF_SLEEPABORT;
|
||||
@ -968,7 +969,9 @@ sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri)
|
||||
_Thread_Wait_acquire_default_critical(thread, &lock_context);
|
||||
#endif /* __rtems__ */
|
||||
|
||||
#ifndef __rtems__
|
||||
td->td_wmesg = NULL;
|
||||
#endif /* __rtems__ */
|
||||
td->td_wchan = NULL;
|
||||
#ifndef __rtems__
|
||||
td->td_flags &= ~TDF_SINTR;
|
||||
|
@ -260,8 +260,8 @@ struct thread {
|
||||
#endif /* __rtems__ */
|
||||
int td_sqqueue; /* (t) Sleepqueue queue blocked on. */
|
||||
void *td_wchan; /* (t) Sleep address. */
|
||||
const char *td_wmesg; /* (t) Reason for sleep. */
|
||||
#ifndef __rtems__
|
||||
const char *td_wmesg; /* (t) Reason for sleep. */
|
||||
volatile u_char td_owepreempt; /* (k*) Preempt on last critical_exit */
|
||||
u_char td_tsqueue; /* (t) Turnstile queue blocked on. */
|
||||
short td_locks; /* (k) Debug: count of non-spin locks */
|
||||
|
Loading…
x
Reference in New Issue
Block a user