tty_wakeup 함수 사용 시 유의점?
글쓴이: gksgkszz / 작성시간: 월, 2016/07/04 - 4:46오후
우분투에서 tty layer 위에 하나의 process가 tty를 통해 kernel의 module로 data write를 하려고 합니다.
진행하던 도중에 process가 tty write중 scheduling에 의해 sleep에 빠져서 나오지 못하고 있습니다...
그래서 kernel의 module에서 tty wake up을 시키기 위해 tty_wakeup 함수를 사용하니 sleep에서 빠져나오지 못하는 것은 해결이 된 것처럼 보입니다...
그러나 제가 리눅스에 대해 잘 모르는 상태여서...
이와 같이 sleep에서 깨어나기 위해 주기적으로 tty_wakeup을 수행하여도 괜찮은지...
tty_wakeup을 해줄 때 유의할 점이 있는지 알려주시면 감사하겠습니다 ㅜㅜ
WARN_ON(kfifo_out_locked(dlci->fifo, dp , len, &dlci->lock) != len); /*remain fifo check. wake up tty(hjm)*/ if(kfifo_avail(dlci->fifo) > 3072) { //printk("fifo available. wake up tty\n"); tty = tty_port_tty_get(&dlci->port); if (tty) { tty_wakeup(tty); /*wake up 사용 문제 없음?*/ tty_kref_put(tty); } }
Forums:
댓글 달기