]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - db2/mp/mp_fget.c
Update.
[thirdparty/glibc.git] / db2 / mp / mp_fget.c
index 418802a3b9c6d39b449ad4dcf36188546f853643..a0364e92c3f308af3b8b22c1d13cf6c6cc79081d 100644 (file)
@@ -7,7 +7,7 @@
 #include "config.h"
 
 #ifndef lint
-static const char sccsid[] = "@(#)mp_fget.c    10.22 (Sleepycat) 8/19/97";
+static const char sccsid[] = "@(#)mp_fget.c    10.25 (Sleepycat) 9/23/97";
 #endif /* not lint */
 
 #ifndef NO_SYSTEM_INCLUDES
@@ -35,7 +35,7 @@ int
 memp_fget(dbmfp, pgnoaddr, flags, addrp)
        DB_MPOOLFILE *dbmfp;
        db_pgno_t *pgnoaddr;
-       u_long flags;
+       int flags;
        void *addrp;
 {
        BH *bhp, *tbhp;
@@ -293,7 +293,7 @@ found:              /* Increment the reference count. */
                        __db_err(dbmp->dbenv,
                            "%s: too many references to page %lu",
                            dbmfp->path, bhp->pgno);
-                       ret = EAGAIN;
+                       ret = EINVAL;
                        goto err;
                }
                ++bhp->ref;
@@ -337,9 +337,9 @@ found:              /* Increment the reference count. */
                ++mfp->stat.st_cache_hit;
        }
 
-mapret:        LOCKHANDLE(dbmp, &dbmfp->mutex);
+mapret:        LOCKHANDLE(dbmp, dbmfp->mutexp);
        ++dbmfp->pinref;
-       UNLOCKHANDLE(dbmp, &dbmfp->mutex);
+       UNLOCKHANDLE(dbmp, dbmfp->mutexp);
 
        if (0) {
 err:           /*