kernel object(rtthread)

2021/12/16 6:10:37

本文主要是介绍kernel object(rtthread),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

 
/* date type defination */
typedef signed char rt_int8_t;
typedef signed short rt_int16_t;
typedef signed long rt_int32_t;
typedef unsigned char rt_uint8_t;
typedef unsigned short rt_uint16_t;
typedef unsigned long rt_uint32_t;
typedef int rt_bool_t;

/* 32bit CPU */
typedef long rt_base_t;
typedef unsigned long rt_ubase_t;
struct rt_filesystem_interface
{
	/* file api*/
	int(*open)(const char *file, int flags, int mode);
	int(*close)(int d);
};
#define DFS_PATH_MAX 255
/* file descriptor */
#define RT_NULL 						((void *)0)
 
struct rt_list_node
{
	struct rt_list_node 				*next;			/* point to next node. 						*/
	struct rt_list_node 				*prev;			/* point to prev node. 						*/
};
typedef struct rt_list_node rt_list_t;					/* Type for lists.*/
/**
* @addtogroup KernelObject
*/
/*@{*/
/*
* Base structure of Kernel object
*/

/* RT_NAME_MAX*/
#define RT_NAME_MAX	20

struct rt_object
{
	/* name of kernel object			*/
	char      	name[RT_NAME_MAX];
	/* type of kernel object 			*/
	rt_uint8_t  type;
	/* flag of kernel object			*/
	rt_uint8_t  flag;
	/* list pointer of kernel object 	*/
	rt_list_t	list;
};
typedef struct rt_object* rt_object_t;

 内核对象 

rt_object 32字节
双链表-->



这篇关于kernel object(rtthread)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程