timing out on a semaphore

Tim Waugh (twaugh@redhat.com)
Sun, 25 Feb 2001 22:40:39 +0000


--2F7AbV2suvT8PGoH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I'm trying to chase down a semaphore time-out problem. I want to
sleep on a semaphore until either

(a) it's signalled, or
(b) some amount of time has elapsed.

What I'm doing is calling add_timer, and then down_interruptible, and
finally del_timer. The timer's function ups the semaphore.

The code is in parport_wait_event, in drivers/parport/ieee1284.c.

Can anyone see anything obviously wrong with it? It seems to
sometimes get stuck.

Tim.
*/

--2F7AbV2suvT8PGoH
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6mYnmONXnILZ4yVIRAlWEAJ97NiWiFb6bDGd+ZFYtdgk7Z4zWfACfUNpq
wb68SnMgjcPgXBEO6KZmeaI=
=W8Fn
-----END PGP SIGNATURE-----

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