How to create kernel semaphore that will timeout?

Bret Indrelee (bindrelee@sbs-cp.com)
Mon, 11 Oct 1999 16:00:50 -0500


What is the best way to create a kernel semaphore that will time out after
so many clock ticks?

The normal kernel semaphore code doesn't provide a timeout value, if you
wait it is assumed to be OK to wait forever.

One of the things I would like to do with such a semaphore is to implement a
timeout on DMA transfers, such that if the transfer doesn't complete in so
much time it will give up. I would also like to implement some simple device
locking using it.

-Bret

-------------------------------------------------------------
SBS Technologies, Connectivity Products
... solutions for real-time connectivity

Bret Indrelee, Engineer
SBS Technologies, Inc., Connectivity Products
1284 Corporate Center Drive, St. Paul MN 55121
Direct: (651) 905-4731
Main: (651) 905-4700 Fax: (651) 905-4701
E-mail: bindrelee@sbs-cp.com http://www.sbs.com
-------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/