diff options
author | alc <alc@FreeBSD.org> | 1999-03-06 07:11:33 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-03-06 07:11:33 +0000 |
commit | 4e7ebf3dd0ba819f6d63ad062c0925dfeadf9c23 (patch) | |
tree | 7730d8e364526dd823c9e8d89e0d021f67f32fde /sys/vm | |
parent | 7435c5f5ec48b06ac7dc9f54f26ace430fdfe4ca (diff) | |
download | FreeBSD-src-4e7ebf3dd0ba819f6d63ad062c0925dfeadf9c23.zip FreeBSD-src-4e7ebf3dd0ba819f6d63ad062c0925dfeadf9c23.tar.gz |
Upgrading a map's lock to exclusive status should increment
the map's timestamp. In general, whenever an exclusive lock is
acquired the timestamp should be incremented.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_map.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 1be6f4e..330c24a 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.h,v 1.36 1999/02/19 14:25:36 luoqi Exp $ + * $Id: vm_map.h,v 1.37 1999/03/02 05:43:18 alc Exp $ */ /* @@ -244,10 +244,14 @@ typedef struct { static __inline__ int _vm_map_lock_upgrade(vm_map_t map, struct proc *p) { + int error; #if defined(MAP_LOCK_DIAGNOSTIC) printf("locking map LK_EXCLUPGRADE: 0x%x\n", map); #endif - return lockmgr(&(map)->lock, LK_EXCLUPGRADE, (void *)0, p); + error = lockmgr(&map->lock, LK_EXCLUPGRADE, (void *)0, p); + if (error == 0) + map->timestamp++; + return error; } #define vm_map_lock_upgrade(map) _vm_map_lock_upgrade(map, curproc) |