diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/lwlock.h | 5 | ||||
| -rw-r--r-- | src/include/storage/proc.h | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index 09654a873e3..c84970a7add 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -14,6 +14,7 @@ #ifndef LWLOCK_H #define LWLOCK_H +#include "lib/ilist.h" #include "storage/s_lock.h" struct PGPROC; @@ -50,9 +51,7 @@ typedef struct LWLock char exclusive; /* # of exclusive holders (0 or 1) */ int shared; /* # of shared holders (0..MaxBackends) */ int tranche; /* tranche ID */ - struct PGPROC *head; /* head of list of waiting PGPROCs */ - struct PGPROC *tail; /* tail of list of waiting PGPROCs */ - /* tail is undefined when head is NULL */ + dlist_head waiters; /* list of waiting PGPROCs */ } LWLock; /* diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 4ad4164927e..e868f0cd9f1 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -15,6 +15,7 @@ #define _PROC_H_ #include "access/xlogdefs.h" +#include "lib/ilist.h" #include "storage/latch.h" #include "storage/lock.h" #include "storage/pg_sema.h" @@ -104,7 +105,7 @@ struct PGPROC /* Info about LWLock the process is currently waiting for, if any. */ bool lwWaiting; /* true if waiting for an LW lock */ uint8 lwWaitMode; /* lwlock mode being waited for */ - struct PGPROC *lwWaitLink; /* next waiter for same LW lock */ + dlist_node lwWaitLink; /* position in LW lock wait list */ /* Info about lock the process is currently waiting for, if any. */ /* waitLock and waitProcLock are NULL if not currently waiting. */ |
