c - Division in linux kernel -


is possible divide in linux kernel , use double values? when tried:

typedef struct{  ... long long int sbe; ... }connection;  hook_func(){   connection* found    ...   uint32_t time_misec ..   uint32_t bytes_diff ..   ...   double = bytes_diff / time_misec;   found->sbe = / 2 + found->sbe / 2;   ... } 

i got errors:

warning: "__fixunsdfsi" [/home/kir/netfilter/hello.ko] undefined! warning: "__adddf3" [/home/kir/netfilter/hello.ko] undefined! warning: "__floatdidf" [/home/kir/netfilter/hello.ko] undefined! warning: "__muldf3" [/home/kir/netfilter/hello.ko] undefined! warning: "__floatunsidf" [/home/kir/netfilter/hello.ko] undefined! 

for cpu, there no floating point support in linux kernel. reason avoid high cost of saving fpu registers.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -