Please enable JavaScript to view this site.

Thread Lock Checker Help

Search

 

/dir

 Specifies the directory hierarchy that will be scanned by Thread Lock Checker.

 

 /dir directory

 

 Example: /dir e:\om\c\

 

 

Detect

 

All /detectXXXX options are followed by :On or :Off to enable or disable the option

 

/detectLocked

 Thread Lock Checker will detect locks configured as CSingleLock   lock(&sect, TRUE);

 

 This lock is locked. That's usually desirable behaviour. This checking option is normally turned off as you don't normally want to detect correct behaviour.

 

 /detectLocked:On|Off

 

 Example: /detectLocked:On

 Example: /detectLocked:Off

 

/detectUnlocked

 Thread Lock Checker will detect locks configured as CSingleLock   lock(&sect, FALSE);

 

 This lock isn't locked. Is this really what you want?

 

 /detectUnlocked:On|Off

 

/detectDefaultUnlocked

 Thread Lock Checker will detect locks configured as CSingleLock   lock(&sect);

 

 This looks like it's locked, but it's actually not locked (the default value for the second parameter is FALSE).

 

 /detectDefaultUnlocked:On|Off

 

/detectUnknownUnlocked

 Thread Lock Checker will detect locks configured as CSingleLock   lock(&sect, variable);

 

 In this case we don't know if variable is TRUE or FALSE, so we bring this to your attention for manual checking.

 

 /detectUnknownUnlocked:On|Off

 

/detectNoLockVariable

 Thread Lock Checker will detect locks configured as CSingleLock(&sect, variable);

 

 Note, the variable 'lock' in the other examples is missing.

 

 /detectNoLockVariable:On|Off

 

/detectNoLock

 Thread Lock Checker will detect locks configured as CSingleLock(, variable);

 

 This last case is a compile error. As such it is unlikely to get to the point where you'll need to catch this before a commit to your version control system. But we detect such errors for completeness of error detection.

 

 /detectNoLock:On|Off

 

/turnAllDetectOff

 

 Turns off all detect options.

 

 You should put this before any /detectXXXXX options if you wish to start from a known (nothing detected) state when setting detect options.

 

 /turnAllDetectOff

 

 

Lock Types

 

/addLockType

 

 Adds a lock type to the list of lock types Thread Lock Checker will check.

 

 /addLockType type

 

 Example: ./addLockType CSingleLock

 

/removeAllLockTypes

 

 Removes all lock types from the list of lock types Thread Lock Checker will check.

 

 This option should be used before any use of /addLockType.

 

 /removeAllLockTypes

 

 

File Filters

 

/addFileFilter

 

 Adds a filename or directory to the list of file filters Thread Lock Checker will examine when checking for thread locking errors.

 

 /addFileFilter filename

 /addFileFilter directory

 

 Example: /addFileFilter e:\om\c\threadLockChecker\tlcExample\tlcExample.cpp

 Example: /addFileFilter e:\om\c\threadLockChecker\tlcExample\

 

/removeAllFileFilters

 

 Removes all file filters from the list of file filters Thread Lock Checker will use to check which files and directories to ignore when checking for thread locking errors.

 

 This option should be used before any use of /addFileFilter.

 

 /removeAllFileFilters

 

 

Line Pragma

 

/linePragmaEnable

 

 Enables or disables the ignoring of locks if a line pragma is found in a comment on the same line as the lock declaration.

 

 If you use this option to enable line pragmas you must use /linePragma to specify a line pragma to use. If you don't specify a line pragma this option does nothing.

 

 /linePragmaEnable:On|Off

 

 Example: /linePragmaEnable:On

 Example: /linePragmaEnable:Off

 

/linePragma

 

 Specifies the line pragma to use if line pragmas are enabled.

 

 /linePragma pragma

 

 Example: /linePragma SVL_TLC_PRAGMA

 

 Example usage of the pragma in code:

 

         CSingleLock        lock(&critSect, FALSE);                // SVL_TLC_PRAGMA, this lock is intentionally unlocked to start with

 

 

Miscellaneous

 

/loadSettings

 

 Specifies a file to load that contains settings that will override the current settings for this command line search.

 

 /loadSettings filename

 

 Example: /loadSettings e:\tests\test1\testSettings.tlc

 

/output

 Specifies a filename to write the results of the command line search.

 

 If no errors are found any file with this name will be deleted.

 

 If errors are found a text file will be written containing error information. Error information will be listed one error per line.

 

 /output filename

 

 Example: /output e:\tests\test1\testResults.txt

 

/reset

 Reset all settings to the default values for this command line search.

 

 You should put this first on your command line to create a known default state prior to setting values using the command line.

 

 /reset