Kernel Object Management
[RT-Thread Kernel API]


Enumerations

enum  rt_object_class_type

Functions

void rt_system_object_init (void)
void rt_object_init (struct rt_object *object, enum rt_object_class_type type, const char *name)
void rt_object_detach (rt_object_t object)
rt_object_t rt_object_allocate (enum rt_object_class_type type, const char *name)
void rt_object_delete (rt_object_t object)
rt_object_t rt_object_find (enum rt_object_class_type type, const char *name)
rt_err_t rt_object_is_systemobject (rt_object_t object)

Detailed Description

The Kernel object system can access and manage all of the kernel objects.

Kernel objects include most of the facilities in the kernel:


Enumeration Type Documentation

The object type can be one of the follows with specific macros enabled:

  • Thread
  • Process
  • Semaphore
  • Mutex
  • FastEvent
  • Event
  • MailBox
  • MessageQueue
  • MemPool

Device

  • Timer
  • Unknown
  • Static


Function Documentation

rt_object_t rt_object_allocate ( enum rt_object_class_type  type,
const char *  name 
)

This function will allocate an object from object system

Parameters:
type the type of object
name the object name. In system, the object's name must be unique.
Returns:
object

void rt_object_delete ( rt_object_t  object  ) 

This function will delete an object and release object memory.

Parameters:
object the specified object to be deleted.

void rt_object_detach ( rt_object_t  object  ) 

This function will detach a static object from object system, and the memory of static object is not freed.

Parameters:
object the specified object to be detached.

rt_object_t rt_object_find ( enum rt_object_class_type  type,
const char *  name 
)

This fucntion will find the object id by specified object name

Parameters:
type the type of object
name the specified object name
Returns:
object id for successful

void rt_object_init ( struct rt_object *  object,
enum rt_object_class_type  type,
const char *  name 
)

This function will init an object and add it to object system management.

Parameters:
object the specified object to be initialized.
type the object type.
name the object name. In system, the object's name must be unique.

rt_err_t rt_object_is_systemobject ( rt_object_t  object  ) 

This function will judge the object is system object or not. Normally, the system object is a static object and the type of object set to RT_Object_Class_Static.

Parameters:
object the specified object to be judged.
Returns:
RT_EOK if a system object, RT_ERROR for others.

void rt_system_object_init ( void   ) 

This function will initialize system object management


Generated on Thu Oct 9 07:19:09 2008 for RT-Thread Kernel by  doxygen 1.5.7