kernel/acpica/compiler/cvparser.c
/*******************************************************************************
 *
 * FUNCTION:    CvCommentExists
 *
 * PARAMETERS:  Address - check if this address appears in the list
 *
 * RETURN:      BOOLEAN - TRUE if the address exists.
 *
 * DESCRIPTION: Look at the pointer address and check if this appears in the
 *              list of all addresses. If it exists in the list, return TRUE
 *              if it exists. Otherwise add to the list and return FALSE.
 *
 ******************************************************************************/
CvCommentExists
PARAMETERS:  Address - check if this address appears in the list

TRUE if the address exists.

Look at the pointer address and check if this appears in the
list of all addresses. If it exists in the list, return TRUE
if it exists. Otherwise add to the list and return FALSE.
CvCommentExists PARAMETERS : Address - check if this address appears in the list TRUE if the address exists . Look at the pointer address and check if this appears in the list of all addresses . If it exists in the list return TRUE if it exists . Otherwise add to the list and return FALSE .
static BOOLEAN
CvCommentExists (
    UINT8                    *Address)
{
    ACPI_COMMENT_ADDR_NODE   *Current = AcpiGbl_CommentAddrListHead;
    UINT8                    Option;
    if (!Address)
    {
        return (FALSE);
    }
    Option = *(Address + 1);
    if ((Option == FILENAME_COMMENT) ||
        (Option == PARENTFILENAME_COMMENT))
    {
       return (FALSE);
    }
    if (!Current)
    {
        AcpiGbl_CommentAddrListHead =
            AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
        AcpiGbl_CommentAddrListHead->Addr = Address;
        AcpiGbl_CommentAddrListHead->Next = NULL;
        return (FALSE);
    }
    else
    {
        while (Current)
        {
            if (Current->Addr != Address)
            {
                Current = Current->Next;
            }
            else
            {
                return (TRUE);
            }
        }
        Current = AcpiGbl_CommentAddrListHead;
        AcpiGbl_CommentAddrListHead =
            AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
        AcpiGbl_CommentAddrListHead->Addr = Address;
        AcpiGbl_CommentAddrListHead->Next = Current;
        return (FALSE);
    }
}
static BOOLEAN CvCommentExists ( UINT8 * Address ) { ACPI_COMMENT_ADDR_NODE * Current = AcpiGbl_CommentAddrListHead ; UINT8 Option ; if ( ! Address ) { return ( FALSE ) ; } Option = * ( Address + 1 ) ; if ( ( Option == FILENAME_COMMENT ) || ( Option == PARENTFILENAME_COMMENT ) ) { return ( FALSE ) ; } if ( ! Current ) { AcpiGbl_CommentAddrListHead = AcpiOsAcquireObject ( AcpiGbl_RegCommentCache ) ; AcpiGbl_CommentAddrListHead -> Addr = Address ; AcpiGbl_CommentAddrListHead -> Next = NULL ; return ( FALSE ) ; } else { while ( Current ) { if ( Current -> Addr != Address ) { Current = Current -> Next ; } else { return ( TRUE ) ; } } Current = AcpiGbl_CommentAddrListHead ; AcpiGbl_CommentAddrListHead = AcpiOsAcquireObject ( AcpiGbl_RegCommentCache ) ; AcpiGbl_CommentAddrListHead -> Addr = Address ; AcpiGbl_CommentAddrListHead -> Next = Current ; return ( FALSE ) ; } }
FUNCTION:    CvCommentExists
 PARAMETERS:  Address - check if this address appears in the list
FUNCTION : CvCommentExists PARAMETERS : Address - check if this address appears in the list
/*
     * FILENAME_COMMENT and PARENTFILENAME_COMMENT are not treated as
     * comments. They serve as markers for where the file starts and ends.
     */ /*
         * If the execution gets to this point, it means that this
         * address does not exists in the list. Add this address to the
         * beginning of the list.
         */