summaryrefslogtreecommitdiff
path: root/sys/ddb/db_command.h
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-02-10 10:15:36 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-02-10 10:15:36 +0000
commitd5bce34037bf75f0bf44183231876cc74dc6787d (patch)
treef6f7d29ba1d17b614149b0951199bcd931c9ad74 /sys/ddb/db_command.h
parentbb180ea8a9f82c56b5ef1d42ac28a4165decbe92 (diff)
Assert vm map locks
Introduce vm_map_assert_{wrlock,rdlock,anylock,unlocked}() in rwlock(9) fashion and back up function comments about locking assumptions with proper assertions. Also add new comments/assertions based on code analysis and sync with NetBSD as much as possible. vm_map_lock() and vm_map_lock_read() are used for exclusive and shared access respectively; currently no code path is purely protected by vm_map_lock_read() alone, i.e. functions called with a read lock held by the callee are also called with a write lock elsewhere. Thus only vm_map_assert_{wrlock,anylock}() are used as of now. This should help with unlocking UVM related syscalls Tested as part of a larger diff through - amd64 package bulk build by naddy - amd64, arm64, powerpc64 base builds and regress by bluhm - amd64 and sparc64 base builds and regress by me Input mpi Feedback OK kettenis
Diffstat (limited to 'sys/ddb/db_command.h')
0 files changed, 0 insertions, 0 deletions