*** Warning: "hrtimer_start" ... undefined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kernelnewbies:
    Hi I wonder if anyone can help me to get rid off the following
message:

*** Warning: "hrtimer_close" ...undefined!!

Here is my source code

#include <linux/module.h>/* Needed by all modules */
#include <linux/kernel.h>/* Needed for KERN_INFO */
#include <linux/ktime.h>
#include <linux/hrtimer.h>

struct hrtimer timer;
int imprime (void);
int imprime (){
  printk ("hola in printk \n");
  return HRTIMER_RESTART;
}
/*int hola (void);

int hola () {
  ktime_t starts=ktime_set(1,0);
  hrtimer_init (&timer, CLOCK_MONOTONIC, HRTIMER_REL);
  one second, zero nsecs
timer.expires=ktime_set(0, 400000000);
  timer.function=&imprime;
  hrtimer_start(&timer, starts, HRTIMER_REL);
  printk ("hola \n");
  return 0;
}
*/
int init_module(void)
{

  ktime_t starts=ktime_set(10,9);
  printk(KERN_INFO "Hello world 1.\n");
  hrtimer_init (&timer, CLOCK_MONOTONIC, HRTIMER_REL);
  timer.function=imprime;
  hrtimer_start(&timer, starts, HRTIMER_REL);
  /*  hrtimer_cancel(&timer); */
  /*  hrtimer_cancel; */
  /*
   * A non 0 return means init_module failed; module can't be loaded.
   */
  return 0;
}


Regards

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux