<commit_before>/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/import/chips/p9/procedures/hwp/memory/lib/utils/assert_noexit.H $ */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2016                             */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

///
/// @file assert_noexit.H
/// @brief MSS specific assert, but don't exit macro
///
// *HWP HWP Owner: <NAME> <<EMAIL>>
// *HWP HWP Backup: <NAME> <<EMAIL>>
// *HWP Team: Memory
// *HWP Level: 2
// *HWP Consumed by: HB:FSP

#ifndef _MSS_ASSERT_NOEXIT_H_
#define _MSS_ASSERT_NOEXIT_H_

#include <fapi2.H>

///
/// @brief Create an error log based on __conditional__,
/// the FFDC gathering function is called and the
/// trace is output as a FAPI error trace. An error log
/// is created. fapi2::current_err is set to indicate there was
/// an error so the caller can ripple thru accordingly
/// The caller is responsible for handling the error object.
///
/// @param[in] __conditional__ the condition to assert
/// @param[in] __ffdc__ the FFDC gathering function
/// @param[in] ... varargs, as input to FAPI_ERR
///
#define MSS_ASSERT_NOEXIT( __conditional__, __ffdc__, ... )             \
    if (! (__conditional__))                                            \
    {                                                                   \
        __ffdc__.execute(fapi2::FAPI2_ERRL_SEV_UNDEFINED, true);        \
        FAPI_ERR(__VA_ARGS__);                                          \
        fapi2::current_err = fapi2::FAPI2_RC_INVALID_PARAMETER;         \
    }

#endif
<commit_msg>Add macros for MSS_LAB_ASSERT and MSS_LAB_ASSERT_NOEXIT<commit_after>/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/import/chips/p9/procedures/hwp/memory/lib/utils/assert_noexit.H $ */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2016                             */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

///
/// @file assert_noexit.H
/// @brief MSS specific assert, but don't exit macro
///
// *HWP HWP Owner: <NAME> <<EMAIL>>
// *HWP HWP Backup: <NAME> <<EMAIL>>
// *HWP Team: Memory
// *HWP Level: 2
// *HWP Consumed by: HB:FSP

#ifndef _MSS_ASSERT_NOEXIT_H_
#define _MSS_ASSERT_NOEXIT_H_

#include <fapi2.H>

///
/// @brief Create an error log based on __conditional__,
/// the FFDC gathering function is called and the
/// trace is output as a FAPI error trace. An error log
/// is created. fapi2::current_err is set to indicate there was
/// an error so the caller can ripple thru accordingly
/// The caller is responsible for handling the error object.
///
/// @param[in] __conditional__ the condition to assert
/// @param[in] __ffdc__ the FFDC gathering function
/// @param[in] ... varargs, as input to FAPI_ERR
///
#define MSS_ASSERT_NOEXIT( __conditional__, __ffdc__, ... )             \
    if (! (__conditional__))                                            \
    {                                                                   \
        __ffdc__.execute(fapi2::FAPI2_ERRL_SEV_UNDEFINED, true);        \
        FAPI_ERR(__VA_ARGS__);                                          \
        fapi2::current_err = fapi2::FAPI2_RC_FALSE;                     \
    }

#endif

{'fraction_non_alphanumeric': 0.0917661847894406, 'fraction_numerical': 0.005342551854179761, 'mean_word_length': 0.9878201124297314, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 74, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7660726', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1341, 'n_words': 447}