---
name: "rtapi_module_param"
section: "3rtapi"
platform: "linux"
package: "linuxcnc-uspace-dev"
version: "1:2.9.4-2+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rtapi_module_param"
---

# rtapi\_module\_param(3rtapi)

Specifying module parameters

## NAME

rtapi\_module\_param - Specifying module parameters

## SYNTAX

RTAPI\_MP\_INT(*var*, *description*)

RTAPI\_MP\_LONG(*var*, *description*)

RTAPI\_MP\_STRING(*var*, *description*)

RTAPI\_MP\_ARRAY\_INT(*var*, *num*, *description*)

RTAPI\_MP\_ARRAY\_LONG(*var*, *num*, *description*)

RTAPI\_MP\_ARRAY\_STRING(*var*, *num*, *description*)

MODULE\_LICENSE(*license*)

MODULE\_AUTHOR(*author*)

MODULE\_DESCRIPTION(*description*)

EXPORT\_FUNCTION(*function*)

## ARGUMENTS

- *var*

  The variable where the parameter should be stored

- *description*

  A short description of the parameter or module

- *num*

  The maximum number of values for an array parameter

- *license*

  The license of the module, for instance "GPL"

- *author*

  The author of the module

- *function*

  The pointer to the function to be exported

## DESCRIPTION

These macros are portable ways to declare kernel module parameters.  They must be used in the global scope, and are not followed by a terminating semicolon. They must be used after the associated variable or function has been defined.

## NOTES

EXPORT\_FUNCTION makes a symbol available for use by a subsequently loaded component.  It is unrelated to HAL functions, which are described in [hal\_export\_funct(3hal)](/hal_export_funct/3hal.md)

## Interpretation of license strings

**MODULE\_LICENSE** follows the kernel's definition of license strings.  Notably, "GPL" indicates "GNU General Public License v2 *or later*".  (emphasis ours).

- **"GPL"**

  GNU General Public License v2 or later

- **"GPL v2"**

  GNU General Public License v2

- **"GPL and additional rights"**

  GNU General Public License v2 rights and more

- **"Dual BSD/GPL"**

  GNU General Public License v2 or BSD license choice

- **"Dual MIT/GPL"**

  GNU General Public License v2 or MIT license choice

- **"Dual MPL/GPL"**

  GNU General Public License v2 or Mozilla license choice

- **"Proprietary"**

  Non-free products

It is still good practice to include a license block which indicates the author, copyright date, and disclaimer of warranty as recommended by the GNU GPL.

## REALTIME CONSIDERATIONS

Not available in userspace code.
