cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

kmod.h (1045B)


      1/* SPDX-License-Identifier: GPL-2.0-or-later */
      2#ifndef __LINUX_KMOD_H__
      3#define __LINUX_KMOD_H__
      4
      5/*
      6 *	include/linux/kmod.h
      7 */
      8
      9#include <linux/umh.h>
     10#include <linux/gfp.h>
     11#include <linux/stddef.h>
     12#include <linux/errno.h>
     13#include <linux/compiler.h>
     14#include <linux/workqueue.h>
     15#include <linux/sysctl.h>
     16
     17#define KMOD_PATH_LEN 256
     18
     19#ifdef CONFIG_MODULES
     20extern char modprobe_path[]; /* for sysctl */
     21/* modprobe exit status on success, -ve on error.  Return value
     22 * usually useless though. */
     23extern __printf(2, 3)
     24int __request_module(bool wait, const char *name, ...);
     25#define request_module(mod...) __request_module(true, mod)
     26#define request_module_nowait(mod...) __request_module(false, mod)
     27#define try_then_request_module(x, mod...) \
     28	((x) ?: (__request_module(true, mod), (x)))
     29#else
     30static inline int request_module(const char *name, ...) { return -ENOSYS; }
     31static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; }
     32#define try_then_request_module(x, mod...) (x)
     33#endif
     34
     35#endif /* __LINUX_KMOD_H__ */