summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-07-28 12:19:01 +1000
committerChris Johns <chrisj@rtems.org>2016-07-28 12:19:01 +1000
commitb6c170f7133940e841268e6c498431277b811e90 (patch)
tree5beda6014ef4b77b09926f44c932ee7754ab5758
parentRevert "kern/sleepqueue: Update due to API changes" (diff)
downloadrtems-libbsd-b6c170f7133940e841268e6c498431277b811e90.tar.bz2
kern/sleepqueue: Update due to API changes
-rw-r--r--freebsd/sys/kern/subr_sleepqueue.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/freebsd/sys/kern/subr_sleepqueue.c b/freebsd/sys/kern/subr_sleepqueue.c
index df3882e1..b6b12374 100644
--- a/freebsd/sys/kern/subr_sleepqueue.c
+++ b/freebsd/sys/kern/subr_sleepqueue.c
@@ -381,7 +381,7 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
sq->sq_blockedcnt[queue]++;
#ifdef __rtems__
executing = td->td_thread;
- _Thread_Lock_acquire_default(executing, &lock_context);
+ _Thread_Wait_acquire_default(executing, &lock_context);
td->td_sq_state = TD_SQ_TIRED;
#endif /* __rtems__ */
td->td_sleepqueue = NULL;
@@ -395,7 +395,7 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
}
thread_unlock(td);
#else /* __rtems__ */
- _Thread_Lock_release_default(executing, &lock_context);
+ _Thread_Wait_release_default(executing, &lock_context);
#endif /* __rtems__ */
}
@@ -612,7 +612,7 @@ sleepq_switch(void *wchan, int pri)
sleepq_release(wchan);
- executing = _Thread_Lock_acquire_default_for_executing(&lock_context);
+ executing = _Thread_Wait_acquire_default_for_executing(&lock_context);
td = rtems_bsd_get_thread(executing);
BSD_ASSERT(td != NULL);
@@ -640,11 +640,11 @@ sleepq_switch(void *wchan, int pri)
bool unblock;
cpu_self = _Thread_Dispatch_disable_critical(&lock_context);
- _Thread_Lock_release_default(executing, &lock_context);
+ _Thread_Wait_release_default(executing, &lock_context);
_Thread_Set_state(executing, STATES_WAITING_FOR_BSD_WAKEUP);
- _Thread_Lock_acquire_default(executing, &lock_context);
+ _Thread_Wait_acquire_default(executing, &lock_context);
unblock = false;
switch (td->td_sq_state) {
@@ -665,7 +665,7 @@ sleepq_switch(void *wchan, int pri)
break;
}
- _Thread_Lock_release_default(executing, &lock_context);
+ _Thread_Wait_release_default(executing, &lock_context);
if (unblock) {
_Thread_Timer_remove(executing);
@@ -674,7 +674,7 @@ sleepq_switch(void *wchan, int pri)
_Thread_Dispatch_enable(cpu_self);
- _Thread_Lock_acquire_default(executing, &lock_context);
+ _Thread_Wait_acquire_default(executing, &lock_context);
switch (td->td_sq_state) {
case TD_SQ_NIGHTMARE:
@@ -689,7 +689,7 @@ sleepq_switch(void *wchan, int pri)
}
}
- _Thread_Lock_release_default(executing, &lock_context);
+ _Thread_Wait_release_default(executing, &lock_context);
if (remove) {
sleepq_remove(td, wchan);
@@ -924,7 +924,7 @@ sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri)
(void)sc;
thread = td->td_thread;
_ISR_lock_ISR_disable(&lock_context);
- _Thread_Lock_acquire_default_critical(thread, &lock_context);
+ _Thread_Wait_acquire_default_critical(thread, &lock_context);
#endif /* __rtems__ */
td->td_wmesg = NULL;
@@ -971,14 +971,14 @@ sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri)
Per_CPU_Control *cpu_self;
cpu_self = _Thread_Dispatch_disable_critical(&lock_context);
- _Thread_Lock_release_default(thread, &lock_context);
+ _Thread_Wait_release_default(thread, &lock_context);
_Thread_Timer_remove(thread);
_Thread_Clear_state(thread, STATES_WAITING_FOR_BSD_WAKEUP);
_Thread_Dispatch_enable(cpu_self);
} else {
- _Thread_Lock_release_default(thread, &lock_context);
+ _Thread_Wait_release_default(thread, &lock_context);
}
#endif /* __rtems__ */
return (0);
@@ -1180,7 +1180,7 @@ sleepq_timeout(Watchdog_Control *watchdog)
BSD_ASSERT(td != NULL);
_ISR_lock_ISR_disable(&lock_context);
- _Thread_Lock_acquire_default_critical(thread, &lock_context);
+ _Thread_Wait_acquire_default_critical(thread, &lock_context);
unblock = false;
switch (td->td_sq_state) {
@@ -1200,13 +1200,13 @@ sleepq_timeout(Watchdog_Control *watchdog)
Per_CPU_Control *cpu_self;
cpu_self = _Thread_Dispatch_disable_critical(&lock_context);
- _Thread_Lock_release_default(thread, &lock_context);
+ _Thread_Wait_release_default(thread, &lock_context);
_Thread_Clear_state(thread, STATES_WAITING_FOR_BSD_WAKEUP);
_Thread_Dispatch_enable(cpu_self);
} else {
- _Thread_Lock_release_default(thread, &lock_context);
+ _Thread_Wait_release_default(thread, &lock_context);
}
}
#endif /* __rtems__ */