Hi, Daniel. I'm wondering why we need a Locked state at all. We still want to 
support an unbalanced unlock, and if we want to handle recursive locks 
(PR10418) we'd have to do more work anyway than just "locked" or "unlocked". 
(The existence of recursive locks means that a double-unlock warning isn't 
always correct.)

I didn't look at the patch too closely, but it mostly looks sensible. What do 
you think about this, though?
Jordan


On Mar 13, 2014, at 16:32 , Daniel Fahlgren <[email protected]> wrote:

> Hi Jordan,
> 
> This patch makes the pthread checker detect double unlocks. I have
> copied the idea with a map from the stream checker, not sure if that is
> the best approach?
> 
> Tracking the state will later make it possible to warn if you lock a
> destroyed mutex, calls pthread_init twice etc. But I haven't had time
> for that yet.
> 
> Best regards,
> Daniel Fahlgren
> <pthread.diff>

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to