def CheckPosixThreading(filename, clean_lines, linenum, error):
line = clean_lines.elided[linenum]<EOL>for single_thread_func, multithread_safe_func, pattern in _THREADING_LIST:<EOL><INDENT>if Search(pattern, line):<EOL><INDENT>error(filename, linenum, '<STR_LIT>', <NUM_LIT:2>,<EOL>'<STR_LIT>' + multithread_safe_func +<EOL>'<STR_LIT>' + single_thread_func +<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>
Checks for calls to thread-unsafe functions.

    Much code has been originally written without consideration of
    multi-threading. Also, engineers are relying on their old experience;
    they have learned posix before threading extensions were added. These
    tests guide the engineers to use thread-safe functions (when using
    posix directly).

    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.