xref: /libCEED/rust/libceed-sys/c-src/backends/weak/ceed-backend-weak.h (revision b1c579f084fff6512b7ecdc5f1776714eaea68ae)
1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3 //
4 // SPDX-License-Identifier: BSD-2-Clause
5 //
6 // This file is part of CEED:  http://github.com/ceed
7 
8 #include <ceed.h>
9 #include <ceed/backend.h>
10 #include <stdarg.h>
11 
12 CEED_INTERN int CeedRegister_Weak(const char *name, int num_prefixes, ...);
13 
14 #define CEED_BACKEND(name, num_prefixes, ...) \
15   CEED_INTERN int __attribute__((weak)) name(void) { return CeedRegister_Weak(__func__, num_prefixes, __VA_ARGS__); }
16