LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Block driver question (MPC852 with DoC)
@ 2006-06-16  8:37 deepesh
  0 siblings, 0 replies; only message in thread
From: deepesh @ 2006-06-16  8:37 UTC (permalink / raw)
  To: linuxppc-dev

Processor: MPC852
OS : linuxppc-2.4.20 from denx
DoC: Disk On Chip, A block device.


We are using DiskOnChip on our board. And we have got a block driver from
the vendor, which can be insmoded.

The request function of the block driver:
DeviceRequest() {
   some error checkings;
   list_add_tail(&queue,&requestsList);
   wake_up(&waitQueueHead);
}

There is an kernel thread which does the final block read-writes to the
disk on chip:

IOKernelThread() {
    while(1) {
       set_current_state(TASK_INTERRUPTIBLE);
       interruptible_sleep_on_timeout(&waitQueueHead,1);
       while(!list_empty(&requestsList)) {
          read/write to the disk;
          list_del(&queue);
       }
    }

}

The list manipulations happen in the DeviceRequest and the IOKernelThread.
Is there a potential chance of a race condition, when a timer interrupt
occurs?

Thank you,
Deepesh

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-16  9:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-16  8:37 Block driver question (MPC852 with DoC) deepesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox