# vim: set ft=c:

MPI_Add_error_class:
    .desc: Add an MPI error class to the known classes

MPI_Add_error_code:
    .desc: Add an MPI error code to an MPI error class

MPI_Add_error_string:
    .desc: Associates an error string with an MPI error code or class

MPI_Error_class:
    .desc: Converts an error code into an error class
    .skip: initcheck, global_cs

MPI_Error_string:
    .desc: Return a string for a given error code
    .skip: initcheck

MPI_Errhandler_create:
    comm_errhandler_fn: FUNCTION_SMALL, func_type=MPI_Comm_errhandler_function, [user defined error handling procedure]
    errhandler: ERRHANDLER, direction=out
    .desc: Creates an MPI-style errorhandler
    .replace: removed with MPI_Comm_create_errhandler
    .seealso: MPI_Comm_create_errhandler, MPI_Errhandler_free

MPI_Errhandler_free:
    .desc: Frees an MPI-style errorhandler

MPI_Errhandler_get:
    comm: COMMUNICATOR
    errhandler: ERRHANDLER, direction=out, [error handler currently associated with communicator]
    .desc: Gets the error handler for a communicator
    .replace: removed with MPI_Comm_get_errhandler

MPI_Errhandler_set:
    comm: COMMUNICATOR, direction=lis:inout, param:in
    errhandler: ERRHANDLER, [new error handler for communicator]
    .desc: Sets the error handler for a communicator
    .replace: removed with MPI_Comm_set_errhandler
    .seealso: MPI_Comm_set_errhandler, MPI_Errhandler_create, MPI_Comm_create_errhandler

MPI_Comm_call_errhandler:
    .desc: Call the error handler installed on a communicator
    .docnotes: ThreadSafeNoUpdate
    .extra: ignore_revoked_comm
    .skip: global_cs

MPI_Comm_create_errhandler:
    .desc: Create a communicator error handler

MPI_Comm_get_errhandler:
    .desc: Get the error handler attached to a communicator
    .extra: ignore_revoked_comm
    .docnotes: ThreadSafeNoUpdate

MPI_Comm_set_errhandler:
    .desc: Set the error handler for a communicator
    .seealso: MPI_Comm_get_errhandler, MPI_Comm_call_errhandler
    .extra: ignore_revoked_comm
    .docnotes: ThreadSafeNoUpdate

MPI_File_call_errhandler:
    .desc: Call the error handler installed on a file
    .docnotes: ThreadSafeNoUpdate
    .skip: global_cs

MPI_File_create_errhandler:
    .desc: Create a file error handler

MPI_File_get_errhandler:
    .desc: Get the error handler attached to a file
    .docnotes: ThreadSafeNoUpdate

MPI_File_set_errhandler:
    .desc: Set the error handler for an MPI file
    .docnotes: ThreadSafeNoUpdate
{ -- error_check --
    if (!HANDLE_IS_BUILTIN(errhandler) && errhandler_ptr->kind != MPIR_FILE) {
        mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
                                         __func__, __LINE__, MPI_ERR_ARG,
                                         "**errhandnotfile", NULL);
        goto fn_fail;
    }
}

MPI_Remove_error_class:
    .desc: Remove an MPI error class from the known classes

MPI_Remove_error_code:
    .desc: Remove an MPI error code

MPI_Remove_error_string:
    .desc: Remove the error string associated with an MPI error code or class

MPI_Win_call_errhandler:
    .desc: Call the error handler installed on a window
    .docnotes: ThreadSafeNoUpdate
    .skip: global_cs

MPI_Win_create_errhandler:
    .desc: Create an error handler for use with MPI window

MPI_Win_get_errhandler:
    .desc: Get the error handler for the MPI RMA window
    .docnotes: ThreadSafeNoUpdate

MPI_Win_set_errhandler:
    .desc: Set window error handler
    .docnotes: ThreadSafeNoUpdate
{ -- error_check --
    if (!HANDLE_IS_BUILTIN(errhandler) && errhandler_ptr->kind != MPIR_WIN) {
        mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
                                         __func__, __LINE__, MPI_ERR_ARG,
                                         "**errhandnotwin", NULL);
        goto fn_fail;
    }
}

MPI_Session_call_errhandler:
    .desc: Call the error handler installed on a MPI session
    .docnotes: ThreadSafeNoUpdate
    .skip: global_cs

MPI_Session_create_errhandler:
    .desc: Create an error handler for use with MPI session
    .skip: initcheck

MPI_Session_get_errhandler:
    .desc: Get the error handler for the MPI session
    .docnotes: ThreadSafeNoUpdate

MPI_Session_set_errhandler:
    .desc: Set MPI session error handler
    .docnotes: ThreadSafeNoUpdate
{ -- error_check --
    if (!HANDLE_IS_BUILTIN(errhandler) && errhandler_ptr->kind != MPIR_SESSION) {
        mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
                                         __func__, __LINE__, MPI_ERR_ARG,
                                         "**errhandnotsession", NULL);
        goto fn_fail;
    }
}
