Paul Durrant wrote:

On 3/28/07, Tom Chen <[EMAIL PROTECTED]> wrote:

Guys, thanks for your help! Finally I find that this is because one thread holding mutex is preempted by a high priority timer (soft) interrupt which also seeks the same mutex. thus dead lock happens.


This alone should not be a problem. Unless your interrupt is high
priority, there's nothing wrong with grabbing a mutex at interrupt
level that's used elsewhere. Your use of timeout() is probably the
problem; you need to be very careful:
Don't take a lock within your timeout function that's held across
schedulng it. That can lead to precisely the sort of cycle you're
experiencing. (I think there's some notes on the timeout() manpage
about this). Self re-scheduling using timeout() can be very tricky. If
this is what you're doing then consider switching to use a cyclic
function (see cyclic.h).


Is there any documentation for this interface?

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to