[previous] [index] [next]

The Basics of Real-Time Linux

RT Linux Tasks are Kernel Modules, not Linux Programs

Kernel Modules are Dynamically Loaded

C is the Preferred Language

Here is the minimal C code that illustrates this:
/* simple.c */

#define __KERNEL__
#define MODULE
#include <linux/kernel.h>
#include <linux/module.h>

int init_module(void)
{
  printk("hello, world!\n"); /* printk = kernel printf, to the console */

  return 0;
}

void cleanup_module(void)
{
  printk("goodbye, world!\n");

  return;
}

/* end of simple.c */

The Mechanics of Compiling and Running


Next: Example 1, Pure Periodic Scheduling of a Single Task

Back: Start of Tutorial