Manfred Koizar <mkoi-pg(at)aon(dot)at> writes:
> [large patch]
Looks reasonable except
> +#define BITS_OFF(i) ~(1 << (i))
I'd put another pair of parens around that. Also, it might be worth
moving into a header file. There is at least one place in proc.c that
manipulates lock masks using explicit shifts, because BITS_ON/BITS_OFF
weren't visible outside lock.c. It'd be good to fix it.
BTW, did you check that the code still compiles with LOCK_DEBUG enabled?
How about contrib/userlock?
regards, tom lane