rtl_cpp.c
来自「rtlinux3.0 的源代码」· C语言 代码 · 共 71 行
C
71 行
/* * RTLinux C++ support * Written by Michael Barabanov, baraban@fsmlabs.com * (C) 2000 FSMLabs, GPL * * Parts of this code are based on glibc, copyright FSF Inc */#include <rtl_printf.h>#include <linux/config.h>#include <linux/kernel.h>#include <linux/module.h>void __pure_virtual (void){ rtl_printf("__pure_virtual called\n");}void __this_fixmap_does_not_exist(void){ rtl_printf("__this_fixmap_does_not_exist called\n");}/* the following is from glibc, Copyright FSF Inc */void__assert_fail (const char *assertion, const char *file, unsigned int line, const char *function){ /* Print the message. */ (void) rtl_printf ("%s:%u: %s%sAssertion `%s' failed.\n", file, line, function ? function : "", function ? ": " : "", assertion);}#ifdef __i386__typedef unsigned long u_int32_t;typedef long int32_t;typedef union{ double value; struct { u_int32_t lsw; u_int32_t msw; } parts;} ieee_double_shape_type;#endif#define EXTRACT_WORDS(ix0,ix1,d) \do { \ ieee_double_shape_type ew_u; \ ew_u.value = (d); \ (ix0) = ew_u.parts.msw; \ (ix1) = ew_u.parts.lsw; \} while (0)int __isnan(double x){ int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); hx &= 0x7fffffff; hx |= (u_int32_t)(lx|(-lx))>>31; hx = 0x7ff00000 - hx; return (int)((u_int32_t)(hx))>>31;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?