Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/external/bsd/drm2/include/linux



Module Name:    src
Committed By:   riastradh
Date:           Mon Sep 15 20:24:55 UTC 2014

Modified Files:
        src/sys/external/bsd/drm2/include/linux: ww_mutex.h

Log Message:
Fix mistakes in Linux ww_mutex code.

I wrote some cases for the WW_WANTOWN state forgetting that there is
an acquisition context associated with it.

- On acceptance of a lock, allow WW_WANTOWN as well as WW_CTX.
- On unlock when WW_WANTOWN, decrement the context's acquire count.

Fixes KASSERT(ctx->wwx_acquired == 0) failure in ww_acquire_fini, and
would fix unlikely but possible kasserts in ww_mutex_lock* if another
lwp swoops in to lock without a context quickly enough.

While here, add some comments and kassert up the wazoo.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/include/linux/ww_mutex.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index