比较常见的在/target/h/vxworks.h文件中:
LOCAL<=>static
STATUS<=>int
IMPORT<=>extern
FAST<=>register
FUNCPTR在文件target/h/types/vxTypesOld.h中:
#ifdef __cplusplus
typedef int (*FUNCPTR) (...); /* ptr to function returning int */
typedef void (*VOIDFUNCPTR) (...); /* ptr to function returning void */
typedef double (*DBLFUNCPTR) (...); /* ptr to function returning double*/
typedef float (*FLTFUNCPTR) (...); /* ptr to function returning float */
#else
typedef int (*FUNCPTR) (); /* ptr to function returning int */
typedef void (*VOIDFUNCPTR) (); /* ptr to function returning void */
typedef double (*DBLFUNCPTR) (); /* ptr to function returning double*/
typedef float (*FLTFUNCPTR) (); /* ptr to function returning float */
#endif /* _cplusplus */
本文解析了VxWorks操作系统中几个关键宏定义的作用及其实现方式,包括LOCAL、STATUS、IMPORT、FAST以及FUNCPTR等。这些宏定义用于简化编程,并确保代码的兼容性和可维护性。
882





