Question for kernel progarmmer's(module compiletion problem)

This is a discussion about Question for kernel progarmmer's(module compiletion problem) in the Everything Linux category; i am try to compile a simple hello world module = #include <linux/module. h> /* Needed by all modules */ #include <linux/kernel. h> /* Needed for KERN_ALERT */ #if CONFIG_MODVERSIONS1 #define MODVERSIONS #include <linux/modversions.

Everything Linux 1800 This topic was started by , . Last reply by ,


data/avatar/default/avatar39.webp

8 Posts
Location -
Joined 2003-11-12
i am try to compile a simple hello world module
===================
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_ALERT */
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
int init_module(void)
{
printk("Hello world 1.\n");
// A non 0 return means init_module failed; module can't be loaded.
return 0;
}
void cleanup_module(void)
{
printk("Goodbye world 1.\n");
}
===============
on there included linux/modue.h have a structure atomic_t
this sturcture no have any defnition in any part of this header file or in any dependent header file
 
so plese help me to solve this proble this proble create a compiletion error

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Jan 6
Created
Jan 6
Last Response
0
Likes
1 minute
Read Time
User
Users