[8208] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: semaphores and queueing commands

daemon@ATHENA.MIT.EDU (Alan Cox)
Thu Feb 24 06:59:02 2000

To: mdharm-scsi@one-eyed-alien.net (Matthew Dharm)
Date:   Thu, 24 Feb 2000 11:51:48 +0000 (GMT)
Cc: linux-scsi@vger.rutgers.edu (The Linux SCSI list)
In-Reply-To: <Pine.LNX.4.10.10002232135460.29543-100000@ziggy.one-eyed-alien.net> from "Matthew Dharm" at Feb 23, 2000 10:02:25 PM
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <E12NwoA-0005gm-00@the-village.bc.nu>
From: Alan Cox <alan@lxorguk.ukuu.org.uk>

> do lots more stuff
> call the scsi_done() function

Do you call scsi_done holding the io_request lock ?

> And, while I'm writting this, is there some generic kernel queuing code
> that I can use somewhere?  i.e. something that allows me to declare a

The sk_buff code has some examples of generic irq safe queueing code. It
basically does

add_
	spin_lock_irqsave(&queue_lock, flags);
	item->next=NULL;
	queue->tail=item;
	spin_unlock_irqrestore(queue_lock, flags)

etc. and spinlocks very short pieces of code.



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post