⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nos_sys.h

📁 igmp for switch in vxworks
💻 H
字号:
/************************************************************************* 
*		Tormado.h
*		Tornado常用的头文件 
*		martin2001年4月6日创建
*		Dragon Copyright . 2000-2001
**************************************************************************/
#ifndef _NOS_SYS_H_
#define _NOS_SYS_H_

#ifdef _cplusplus
extern"C"{
#endif

#define Tornado

#if (_lightsun_bluelight_|_deep_bluelight_|_xdsl_)
#undef CPU
#define CPU PPC603
#endif

#ifdef _MICRO_bluelight_
#undef CPU
#define CPU ARM7TDMI
#endif


#include <vxWorks.h>
#include <fiolib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <iosLib.h>
#include <stdarg.h>
#include <memlib.h>
#include <stdlib.h>
#include <ctype.h>
#include <timers.h>
#include <taskLib.h>
#include <end.h>
#include <ifLib.h>
#include <timers.h>
#include <signal.h>
#include <sys/times.h>
#include <telnetLib.h>

#include <nos_set.h>

#define __const__
#define volatile
/*Added by martin */
/*Generic macro and inline function */
#define inline __inline
#define __inline__ __inline



/*GCC relation macro and function*/
#define __attribute__(a)



/*Memory protection related macro function*/
int copy_from_user(char * dest, char * src , size_t size);
int copy_to_user(char * dest, char * src , size_t size);

/*Linux kernel related*/
#define	KERN_EMERG	"<0>"	/* system is unusable			*/
#define	KERN_ALERT	"<1>"	/* action must be taken immediately	*/
#define	KERN_CRIT	"<2>"	/* critical conditions			*/
#define	KERN_ERR	"<3>"	/* error conditions			*/
#define	KERN_WARNING	"<4>"	/* warning conditions			*/
#define	KERN_NOTICE	"<5>"	/* normal but significant condition	*/
#define	KERN_INFO	"<6>"	/* informational			*/
#define	KERN_DEBUG	"<7>"	/* debug-level messages			*/

#define wait_queue_head_t unsigned long

/*Different cpu parameter*/
#ifndef HZ
#define HZ 100
#endif

/***********************************
Other fake macro
*************************************/
/*Net profile related stub macro*/
#define NET_PROFILE_DEFINE(a) 
#define NET_PROFILE_LEAVE(a)
#define softnet_process 0


/*Other macro stub*/
#define NR_CPUS 1 /*系统中邋CPU的数量*/
#define __cacheline_aligned 
#define printk printf



#define __init

#define NET_TX_SOFTIRQ 1
#define NET_RX_SOFTIRQ 2

#define __setup 



#define ASSERT_RTNL()


/*Other fake macro*/
#define rtmsg_ifinfo(a,b,c)

#define RTM_NEWLINK 0

#define capable(a)  1/*This if for auth the superuser privilege*/
#define request_module(a) /*This is for request load a module in user mode*/

/*
 * GFP bitmasks..
 */
#define __GFP_WAIT	0x010000
#define __GFP_HIGH	0x020000
#define __GFP_IO	0x040000
#define __GFP_DMA	0x080000
#ifdef CONFIG_HIGHMEM
#define __GFP_HIGHMEM	0x100000
#else
#define __GFP_HIGHMEM	0x0 /* noop */
#endif


#define GFP_BUFFER	(__GFP_HIGH | __GFP_WAIT)
#define GFP_ATOMIC	(__GFP_HIGH)
#define GFP_USER	(             __GFP_WAIT | __GFP_IO)
#define GFP_HIGHUSER	(             __GFP_WAIT | __GFP_IO | __GFP_HIGHMEM)
#define GFP_KERNEL	(__GFP_HIGH | __GFP_WAIT | __GFP_IO)
#define GFP_NFS		(__GFP_HIGH | __GFP_WAIT | __GFP_IO)
#define GFP_KSWAPD	(                          __GFP_IO)

/* Flag - indicates that the buffer will be suitable for DMA.  Ignored on some
   platforms, used as appropriate on others */

#define GFP_DMA		__GFP_DMA

/* Flag - indicates that the buffer can be taken from high memory which is not
   permanently mapped by the kernel */

#define GFP_HIGHMEM	__GFP_HIGHMEM

/*The other function stub*/
#define try_inc_mod_count(a) (a++)
#define __MOD_DEC_USE_COUNT(a)


/*The time function stub */
#define get_fast_time(a)
#define jiffies 0

#define tasklet_disable(a)
#define tasklet_enable(a)

/*The lock unlock macro stub*/

/*SMP related function and macro */
#define smp_processor_id() 0
#define smp_mb__before_clear_bit()

/*Debug related macro stub*/
#define BUG_TRAP(a)


#define assert(x) 

/*Protocol address family related macro stub*/
#define NPROTO 0



/*Unknown function and macro stub*/
#define IW_IS_SET(a)
#define IW_IS_GET(a)

/*Linux task related fake macro*/
#define schedule_timeout(a)
#define TASK_INTERRUPTIBLE 0
#define TASK_RUNNING 1

#ifndef INCLUDE_CURRENT
#define INCLUDE_CURRENT
struct cur_struct{
	unsigned long state;
};
struct cur_struct current;
#endif /*end of INCLUDE_CURRENT*/


#define RW_LOCK_UNLOCKED 1

#define current_text_addr() "NULL"

#define in_irq() 0

#define BUG_TO_DO() 
/* #define BUG()   重复定义   gongzb 02/6/12*/

#if 0
	static inline void *ERR_PTR (long error)
	{
		return (void *) error;
	}

static inline long PTR_ERR(const void *ptr)
{
	return (long) ptr;
}

static inline long IS_ERR(const void *ptr)
{
	return (unsigned long)ptr > (unsigned long)-1000L;
}

#endif /*Del by Lulinli 03-05-07 */

#ifdef _cplusplus
}
#endif

#endif /*_TORNADO_H_*/

⌨️ 快捷键说明

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