lib_locks: Access to hardware and software locks for concurrent C programs

FAVOURITE VERSION RELEASED COMMENTS DOCUMENTATION SOFTWARE
2.4.0 2026-02-11 V2.4.0 introduces support for inter-tile locks VIEW HTML VIEW PDF ZIP
View older versions
2.3.2 2025-08-21 Version adds a locks.h file, which includes all lock functions, and some minor documentation updates. ZIP ZIP
2.3.1 2024-11-11 ZIP ZIP
2.0.3rc3 2016-11-29 PDF ZIP
2.0.2rc1 2016-01-07 PDF ZIP
2.0.1rc1 2015-05-29 PDF ZIP
2.0.0rc1 2015-03-22 PDF ZIP
INFO

Summary

This library provides access to hardware and software locks for use in concurrent C programs. However, it is generally not safe to use these for marshaling within XC, due to the assumptions XC makes about safe concurrent data access.

Features

  • Hardware locks: fast and power efficient but there are a limited number per tile

  • Software locks: slower but an unlimited number can be used

  • Intertile lock (xcore.ai only): single lock available for guarding chip-wide access to resources

Known issues

  • Intertile lock uses a MIPI D-PHY register and so cannot be used when MIPI D-PHY is enabled

  • Intertile lock requires that both tiles are running at the same core frequency. Clocking down one tile may very rarely result in unreliable locking.

Development repo

Required tools

  • XMOS XTC Tools: 15.3.1

Required libraries (dependencies)

  • None

Support

This package is supported by XMOS Ltd. Issues can be raised against the software at www.xmos.com/support

Scroll to Top