---
name: "pci_cfg_access_trylock"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/pci_cfg_access_trylock"
---

# pci\_cfg\_access\_trylock(9)

try to lock PCI config reads/writes

## NAME

pci\_cfg\_access\_trylock - try to lock PCI config reads/writes

## SYNOPSIS

**bool pci\_cfg\_access\_trylock(struct pci\_dev \*** *dev***);**

## ARGUMENTS

*dev*

pci device struct

## DESCRIPTION

Same as pci\_cfg\_access\_lock, but will return 0 if access is already locked, 1 otherwise. This function can be used from atomic contexts.

## COPYRIGHT
