Skip to content

Commit b902259

Browse files
committed
feat: Add ML Replacement macro
1 parent 0a2d0d5 commit b902259

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

include/linux/kermit.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0-or-later */
2+
/*
3+
* kermit.h - KernMLOps Insertion Interface
4+
*
5+
* Copyright (C) 2025 Aditya Tewari <adityaatewari@gmail.com>
6+
*/
7+
8+
#ifndef _LINUX_KERMIT_H_
9+
#define _LINUX_KERMIT_H_
10+
11+
#define ML_REPLACE_FUNCTION(mlfunc, normal_expression) \
12+
((mlfunc) ? mlfunc() : (normal_expression);)
13+
14+
#endif //_LINUX_KERMIT_H_

0 commit comments

Comments
 (0)