@@ -138,6 +138,18 @@ static void __rwsem_mark_wake(struct rw_semaphore *sem,
waiter = list_first_entry(&sem->wait_list, struct rwsem_waiter, list);
if (waiter->type == RWSEM_WAITING_FOR_WRITE) {
+ if ((waiter->task->policy != SCHED_NORMAL)
+ &&(waiter->task->policy != SCHED_BATCH))
+ ;
+ else {
+ list_for_each_entry(tmp, sem->wait_list.next, list) {
+ if ((tmp->task->policy != SCHED_NORMAL)
+ &&(tmp->task->policy != SCHED_BATCH)) {
+ wake_q_add(wake_q, tmp->task);
+ return;
+ }
+ }
+ }
if (wake_type == RWSEM_WAKE_ANY) {
/*
* Mark writer at the front of the queue for wakeup.