From: deepesh@india.tejasnetworks.com
To: linuxppc-dev@ozlabs.org
Subject: Block driver question (MPC852 with DoC)
Date: Fri, 16 Jun 2006 14:07:18 +0530 (IST) [thread overview]
Message-ID: <34765.192.168.90.80.1150447038.squirrel@pop-mail> (raw)
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
reply other threads:[~2006-06-16 9:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34765.192.168.90.80.1150447038.squirrel@pop-mail \
--to=deepesh@india.tejasnetworks.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).