pix.h

来自「VRTX 商用嵌入式实时操作系统」· C头文件 代码 · 共 39 行

H
39
字号
/************************************************************/
/* THIS INFORMATION IS PROPRIETARY TO                       */
/* MICROTEC RESEARCH, INC.                                  */
/*----------------------------------------------------------*/
/* Copyright (c) 1991-1996  Microtec Research, Inc.         */
/* All rights reserved                                      */
/************************************************************/

/***  File pix.h -------------------------------------------*/
/* Position independent code and data.			    */


#ifndef _PIX_H
#define _PIX_H

#if  _PID || _PIC

typedef void (*PIXFPTR)();

#define PIX_REF(ptr) (*((int*)(((char*)ptr + (int)_pix_start_of_data )) )) 
#define PIX_ADD(ptr) ((char*)ptr +(int)_pix_start_of_data)
#define PIX_SUB(ptr) ((char*)ptr -(int)_pix_start_of_data)
#define current_image_is_relocated ((int)_pix_start_of_data != 0)

extern char* _pix_start_of_data ;

void init_pix_code_data();

#else /** !_PID || !_PIC****/

#define PIX_REF(ptr) *ptr
#define PIX_ADD(ptr) ptr
#define PIX_SUB(ptr) ptr
#define current_image_is_relocated  0

#endif /** _PID || _PIC***/

#endif /** _PIX_H ****/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?