# QFLOCK

> [HTML Version](qflock.htm)

_Added November 2024_

The QFLOCK.SYS file, created dynamically along with its sibling [JOBTBL.SYS](job-table.md), keeps track of various kinds of inter-job lock queues. While A-Shell applications are free to implement their own locking schemes to manage race conditions, typically using system file locks either directly or as proxies, QFLOCK.SYS provides a convenient mechanism for managing multi-process access to files or any other abstract resource. Note that when a [JOB](job-table.md) exits, any entries it may have left in the QFLOCK.SYS are automatically cleared. See the following topics for more details:

**System Parameters**

•	[QUEUE](queue_sp.md):  specifies location for both QFLOCK.SYS and JOBTBL.SYS

•	[SBR=MXLOCK](mxlock.md):  determines whether a [JOB](job-table.md) may lock itself out

•	[SBR=AXLOCK](axlock.md):  affects handling of wildcard lock conflicts

**System Commands**

•	[QUTL](qutl_lit.md):  view/manage QFLOCK.SYS entries

**Subroutines**

•	[MX\_GETQUEUE](mx_getqueue.md):  read a queue block

•	[MX\_QLOCK](mx_q_lock_unlok.md):  lock QFLOCK.SYS

•	[MX\_QUNLOK](mx_q_lock_unlok.md):  unlock QFLOCK.SYS

•	[MX\_QRBLD](mx_qrbld.md):  rebuild QFLOCK.SYS

•	[XLOCK](xlock_sbr.md):  general purpose lock operations

•	[FLOCK](flocksbr.md):  file locking based on QFLOCK.SYS