Forum Discussion
Altera_Forum
Honored Contributor
16 years agoDid I descript it clearly?The test process is las follows:
1.fd=open("/dev/pio_button",O_RDONLY); 2.ret=read(fd,&key_value,sizeof(key_value)); I had not press any button,so it blocked itself and called schedule(),then I pressed a button,so pio_button_isr() was called,in the end it schedule work_queue,(here the handle is button_handle_event()),in button_handle_event(),so down(&dev->mutex) appears,it never return!That's the problem! I don't think there are any dead lock! I have see some source code(NIOSSerial.c,altspi.c ),they don't use down()!