From d5fdf88defcbe076276ea5c8e96424d58a8b5bcf Mon Sep 17 00:00:00 2001 From: attilio Date: Thu, 31 May 2007 09:14:48 +0000 Subject: Add functions sx_xlock_sig() and sx_slock_sig(). These functions are intended to do the same actions of sx_xlock() and sx_slock() but with the difference to perform an interruptible sleep, so that sleep can be interrupted by external events. In order to support these new featueres, some code renstruction is needed, but external API won't be affected at all. Note: use "void" cast for "int" returning functions in order to avoid tools like Coverity prevents to whine. Requested by: rwatson Tested by: rwatson Reviewed by: jhb Approved by: jeff (mentor) --- sys/vm/vm_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/vm/vm_map.c') diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 8efcc29..7e518606 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -423,7 +423,7 @@ _vm_map_lock(vm_map_t map, const char *file, int line) if (map->system_map) _mtx_lock_flags(&map->system_mtx, 0, file, line); else - _sx_xlock(&map->lock, file, line); + (void)_sx_xlock(&map->lock, 0, file, line); map->timestamp++; } @@ -444,7 +444,7 @@ _vm_map_lock_read(vm_map_t map, const char *file, int line) if (map->system_map) _mtx_lock_flags(&map->system_mtx, 0, file, line); else - _sx_xlock(&map->lock, file, line); + (void)_sx_xlock(&map->lock, 0, file, line); } void -- cgit v1.1