MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lf_blocks

Function lf_blocks

freebsd/kern/kern_lockf.c:858–865  ·  view source on GitHub ↗

* Return non-zero if lock 'x' is blocked by lock 'y' (or vice versa). */

Source from the content-addressed store, hash-verified

856 * Return non-zero if lock 'x' is blocked by lock 'y' (or vice versa).
857 */
858static int
859lf_blocks(struct lockf_entry *x, struct lockf_entry *y)
860{
861
862 return x->lf_owner != y->lf_owner
863 && (x->lf_type == F_WRLCK || y->lf_type == F_WRLCK)
864 && lf_overlaps(x, y);
865}
866
867/*
868 * Allocate a lock edge from the free list

Callers 5

lf_advlockasyncFunction · 0.85
lf_add_outgoingFunction · 0.85
lf_add_incomingFunction · 0.85
lf_update_dependanciesFunction · 0.85
lf_getblockFunction · 0.85

Calls 1

lf_overlapsFunction · 0.85

Tested by

no test coverage detected