Welcome to the Linux Foundation Forum!

Rt Linux Application Development

Options

Hello All ,
I am successfully applied RT linux Patch (patch-4.9.115-rt93.patch.xz) to my Kernel Version (4.9.109) and cross compiled for my Embedded device also. But not able to develop RT linux application in my HOST PC (ubuntu 18.10 64 bit OS).

Because "rtl.h" header file in missing in Ubuntu PC.

Sample RT linux module:

include <rtl.h>

include <time.h>

include <pthread.h>

pthread_t thread;

void * thread_code(void)
{
pthread_make_periodic_np(pthread_self(), gethrtime(), 1000000000);

    while (1)
    {
            pthread_wait_np ();
            rtl_printf("Hello World\n");
    }

    return 0;

}

int init_module(void)
{
return pthread_create(&thread, NULL, thread_code, NULL);
}

void cleanup_module(void)
{
pthread_delete_np(thread);
}

How to install or get RT linux related header files for Ubuntu PC .

Regards,
Kishore P

Categories

Upcoming Training