+
+ if ((file->f_mode & FMODE_WRITE) && !(file->f_flags & O_SYNC)) {
+ poll_wait(file, &qends->endinfo.fileinfo.writeq, wait);
+
+ spin_lock_irqsave(&qends->ends_lock, flags);
+ list_for_each(entry,&qends->inlist){
+ edge=list_entry(entry,struct canque_edge_t,inpeers);
+ if(canque_fifo_test_fl(&edge->fifo,FULL))
+ full=1;
+ }
+ spin_unlock_irqrestore(&qends->ends_lock, flags);
+
+ if(!full)
+ mask |= POLLOUT | POLLWRNORM;
+ }
+
+ if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_SYNC)) {
+ poll_wait(file, &qends->endinfo.fileinfo.emptyq, wait);
+
+ spin_lock_irqsave(&qends->ends_lock, flags);
+ list_for_each(entry,&qends->inlist){
+ edge=list_entry(entry,struct canque_edge_t,inpeers);
+ if(!canque_fifo_test_fl(&edge->fifo,EMPTY))
+ full=1;
+ }
+ spin_unlock_irqrestore(&qends->ends_lock, flags);
+
+ if(!full)
+ mask |= POLLOUT | POLLWRNORM;