misc update
use condition wait
move more ioctl to codecbase