diff options
author | Miles Bader <miles@gnu.org> | 1996-02-21 20:17:26 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-02-21 20:17:26 +0000 |
commit | 17bffcb948a03407c527337af6d0652622f7d4cc (patch) | |
tree | a72a6c074991c46892efa2b9ef93afe07752cad7 /libpager | |
parent | 356382a974a7bfb0dcb22e644286f4546433125b (diff) |
(_pager_seqnos_memory_object_init): Be picky about always releasing SEQNO.
Diffstat (limited to 'libpager')
-rw-r--r-- | libpager/object-init.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libpager/object-init.c b/libpager/object-init.c index 0d2f0e5a..eeb50993 100644 --- a/libpager/object-init.c +++ b/libpager/object-init.c @@ -1,5 +1,5 @@ /* Implementation of memory_object_init for pager library - Copyright (C) 1994, 1995 Free Software Foundation + Copyright (C) 1994, 1995, 1996 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -34,16 +34,15 @@ _pager_seqnos_memory_object_init (mach_port_t object, if (!p) return EOPNOTSUPP; + mutex_lock (&p->interlock); + _pager_wait_for_seqno (p, seqno); + if (pagesize != __vm_page_size) { printf ("incg init: bad page size"); goto out; } - mutex_lock (&p->interlock); - - _pager_wait_for_seqno (p, seqno); - if (p->pager_state != NOTINIT) { #ifdef KERNEL_INIT_RACE @@ -71,10 +70,10 @@ _pager_seqnos_memory_object_init (mach_port_t object, p->pager_state = NORMAL; + out: _pager_release_seqno (p, seqno); mutex_unlock (&p->interlock); - - out: ports_port_deref (p); + return 0; } |