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
Post a Comment