RE: synchronization question about /sys/dev/vkbd/vkbd.c

2005-06-05 Thread Norbert Koch
> > My question is: > > Is it not possible, that vkbd_dev_intr() could be > > interrupted at any position before the VKBD_LOCK() > > and then vkbd_dev_write() called? > > in theory it is possible. > > > If yes, how should vkbd_dev_write() know, that it should > > call task_enqueue(), as TASK is s

Re: synchronization question about /sys/dev/vkbd/vkbd.c

2005-06-03 Thread Maksim Yevmenkin
Norbert, When looking at /sys/dev/vkbd/vkbd.c I found one thing, that I do not understand. There are three places, where a flag TASK is used: 1. in vkbd_dev_close(): while(state->ks_flag & TASK) VKBD_SLEEP (...); 2. in vkbd_dev_write() VKBD_LOCK (); ... if (!(state->ks_flags & TASK)

synchronization question about /sys/dev/vkbd/vkbd.c

2005-06-03 Thread Norbert Koch
Hello. When looking at /sys/dev/vkbd/vkbd.c I found one thing, that I do not understand. There are three places, where a flag TASK is used: 1. in vkbd_dev_close(): while(state->ks_flag & TASK) VKBD_SLEEP (...); 2. in vkbd_dev_write() VKBD_LOCK (); ... if (!(state->ks_flags & TASK) &&