Podskasite kto znaet!
Chitau i pishy v ttyS0 iz prerevanija taimera, primerno tak:
void ndt_irq (unsigned long data)
{
spin_lock_bh(&timer_lock);
struct my_buf *tbf;
tbf = &rbuffer;
fs=get_fs();
set_fs(KERNEL_DS);
if (f && f->f_dentry &&
f->f_op && f->f_op->read) {
.......
retval = f->f_op->read(f, &tbf->rc, 1, &f->f_pos);
........
f->f_op->write(f, "NICHEVO NE CHITAET", 18, &f->f_pos);
if (retval <= 0) printk("<0> ^tstnd: READE returns: %d\n", retval);
}
else printk("<0> ^tstnd: stuct FILE is empty\n");
set_fs(fs);
mod_timer(&timer, jiffies + HZ);
spin_unlock_bh(&timer_lock);
}
Pishetsa vse normalno, no nichego ne chitaet. Vozvrashaet kod oshibki -11 (try eshe)