mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Update.
* db2/Makefile (distribute): Remove files which do not exist anymore.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Copyright (c) 1996, 1997, 1998
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*
|
||||
* @(#)lock.h 10.15 (Sleepycat) 5/10/98
|
||||
* @(#)lock.h 10.17 (Sleepycat) 1/3/99
|
||||
*/
|
||||
|
||||
typedef struct __db_lockobj DB_LOCKOBJ;
|
||||
@@ -22,6 +22,12 @@ typedef struct __db_lockobj DB_LOCKOBJ;
|
||||
*/
|
||||
#define DB_LOCK_MAXID 0x7fffffff
|
||||
|
||||
/* Check for region catastrophic shutdown. */
|
||||
#define LOCK_PANIC_CHECK(lt) { \
|
||||
if ((lt)->region->hdr.panic) \
|
||||
return (DB_RUNRECOVERY); \
|
||||
}
|
||||
|
||||
/*
|
||||
* The lock region consists of:
|
||||
* The DB_LOCKREGION structure (sizeof(DB_LOCKREGION)).
|
||||
@@ -135,9 +141,23 @@ struct __db_lock {
|
||||
u_int32_t refcount; /* Reference count the lock. */
|
||||
db_lockmode_t mode; /* What sort of lock. */
|
||||
ssize_t obj; /* Relative offset of object struct. */
|
||||
size_t txnoff; /* Offset of holding transaction. */
|
||||
db_status_t status; /* Status of this lock. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is a serious layering violation. To support nested transactions, we
|
||||
* need to be able to tell that a lock is held by a transaction (as opposed to
|
||||
* some other locker) and to be able to traverse the parent/descendent chain.
|
||||
* In order to do this, each lock held by a transaction maintains a reference
|
||||
* to the shared memory transaction structure so it can be accessed during lock
|
||||
* promotion. As the structure is in shared memory, we cannot store a pointer
|
||||
* to it, so we use the offset within the region. As nothing lives at region
|
||||
* offset 0, we use that to indicate that there is no transaction associated
|
||||
* with the current lock.
|
||||
*/
|
||||
#define TXN_IS_HOLDING(L) ((L)->txnoff != 0 /* INVALID_REG_OFFSET */)
|
||||
|
||||
/*
|
||||
* We cannot return pointers to the user (else we cannot easily grow regions),
|
||||
* so we return offsets in the region. These must be converted to and from
|
||||
|
||||
Reference in New Issue
Block a user