There are two ways for you to interact with LockLint: source code annotations and the command-line interface.
Source code annotations are assertions and NOTEs that you place in your source code to pass information to LockLint. LockLint can verify certain assertions about the states of locks at specific points in your code, and annotations can be used to verify that locking behavior is correct or avoid unnecessary error warnings.
See "Source Code Annotations" for more information.
Alternatively, you can use LockLint subcommands to load the relevant .ll files and make assertions. This interface to LockLint consists of a lock_lint command and a set of subcommands that you specify on the lock_lint command line.
The important features of the lock_lint subcommands are:
You can exercise a few additional controls that have no corresponding annotations.
You can make a number of useful queries about the functions, variables, function pointers, and locks in your program.
LockLint subcommands help you analyze your code and discover which variables are not consistently protected by locks. You may make assertions about which variables are supposed to be protected by a lock and which locks are supposed to be held whenever a function is called. Running the analysis with such assertions in place will show you where the assertions are violated.
Most programmers report that they find source code annotations preferable to command-line subcommands. However, there is not always a one-to-one correspondence between the two.