summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-05-31 09:14:48 +0000
committerattilio <attilio@FreeBSD.org>2007-05-31 09:14:48 +0000
commitd5fdf88defcbe076276ea5c8e96424d58a8b5bcf (patch)
treeac96e36a0eae4dea31bd5da59eb1f4eb098e0041 /sys/vm
parente8b7aa9ff02914f7012edecc64911cee76524e3a (diff)
downloadFreeBSD-src-d5fdf88defcbe076276ea5c8e96424d58a8b5bcf.zip
FreeBSD-src-d5fdf88defcbe076276ea5c8e96424d58a8b5bcf.tar.gz
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)
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c4
1 files changed, 2 insertions, 2 deletions
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
OpenPOWER on IntegriCloud