diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2016-02-28 17:52:33 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2016-02-28 17:52:33 +0000 |
| commit | 1bdbd705993eab79189dff87b69a9cff5c69b17e (patch) | |
| tree | 93354adb0a612a635964c8498072087760a0f93b /sys/vm/vm_object.c | |
| parent | 3f3af790f95027d0c3b859a53eb82ef5d00dc4f8 (diff) | |
Implement process-shared locks support for libthr.so.3, without
breaking the ABI. Special value is stored in the lock pointer to
indicate shared lock, and offline page in the shared memory is
allocated to store the actual lock.
Reviewed by: vangyzen (previous version)
Discussed with: deischen, emaste, jhb, rwatson,
Martin Simmons <martin@lispworks.com>
Tested by: pho
Sponsored by: The FreeBSD Foundation
Notes
svn path=/head/; revision=296162
Diffstat (limited to 'sys/vm/vm_object.c')
| -rw-r--r-- | sys/vm/vm_object.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index bc0e4c05f126..1b1d532ba1cf 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -264,6 +264,7 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object) #if VM_NRESERVLEVEL > 0 LIST_INIT(&object->rvq); #endif + umtx_shm_object_init(object); } /* @@ -475,6 +476,9 @@ vm_object_vndeallocate(vm_object_t object) } #endif + if (object->ref_count == 1) + umtx_shm_object_terminated(object); + /* * The test for text of vp vnode does not need a bypass to * reach right VV_TEXT there, since it is obtained from @@ -647,6 +651,7 @@ retry: return; } doterm: + umtx_shm_object_terminated(object); temp = object->backing_object; if (temp != NULL) { KASSERT((object->flags & OBJ_TMPFS_NODE) == 0, |
