提交 4bd258ce 编写于 作者: B bernard.xiong

remove fast event

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@46 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 3bfe93e3
......@@ -169,7 +169,6 @@ typedef struct rt_object* rt_object_t; /* Type for kernel objects. */
* - Process
* - Semaphore
* - Mutex
* - FastEvent
* - Event
* - MailBox
* - MessageQueue
......@@ -188,9 +187,6 @@ enum rt_object_class_type
#ifdef RT_USING_MUTEX
RT_Object_Class_Mutex, /* The object is a mutex. */
#endif
#ifdef RT_USING_FASTEVENT
RT_Object_Class_FastEvent, /* The object is a fast event. */
#endif
#ifdef RT_USING_EVENT
RT_Object_Class_Event, /* The object is a event. */
#endif
......@@ -323,7 +319,7 @@ struct rt_thread
#endif
rt_uint32_t number_mask;
#if defined(RT_USING_EVENT) || defined(RT_USING_FASTEVENT)
#if defined(RT_USING_EVENT)
/* thread event */
rt_uint32_t event_set;
rt_uint8_t event_info;
......@@ -424,27 +420,12 @@ struct rt_mutex
typedef struct rt_mutex* rt_mutex_t;
#endif
#if defined(RT_USING_EVENT) || defined(RT_USING_FASTEVENT)
#if defined(RT_USING_EVENT)
#define RT_EVENT_FLAG_AND 0x01
#define RT_EVENT_FLAG_OR 0x02
#define RT_EVENT_FLAG_CLEAR 0x04
#endif
#ifdef RT_USING_FASTEVENT
/*
* fast_event
*/
struct rt_fast_event
{
struct rt_object parent;
rt_uint32_t set; /* event set. */
rt_list_t thread_list[RT_EVENT_LENGTH]; /* threads blocked on this resource. */
};
typedef struct rt_fast_event* rt_fast_event_t;
#endif
#ifdef RT_USING_EVENT
/*
* event
......
......@@ -204,20 +204,6 @@ rt_err_t rt_mutex_release(rt_mutex_t mutex);
rt_err_t rt_mutex_control(rt_mutex_t mutex, rt_uint8_t cmd, void* arg);
#endif
#ifdef RT_USING_FASTEVENT
/*
* fast_event interface
*/
rt_err_t rt_fast_event_init(rt_fast_event_t event, const char* name, rt_uint8_t flag);
rt_err_t rt_fast_event_detach(rt_fast_event_t event);
rt_fast_event_t rt_fast_event_create (const char* name, rt_uint8_t flag);
rt_err_t rt_fast_event_delete (rt_fast_event_t event);
rt_err_t rt_fast_event_send(rt_fast_event_t event, rt_uint8_t bit);
rt_err_t rt_fast_event_recv(rt_fast_event_t event, rt_uint8_t bit, rt_uint8_t opt, rt_int32_t timeout);
rt_err_t rt_fast_event_control (rt_fast_event_t event, rt_uint8_t cmd, void* arg);
#endif
#ifdef RT_USING_EVENT
/*
* event interface
......
......@@ -38,7 +38,7 @@ void (*rt_object_put_hook)(struct rt_object* object);
/**
* This function will set a hook function, which will be invoked when object
* attaches to kernel object system.
*
*
* @param hook the hook function
*/
void rt_object_attach_sethook(void (*hook)(struct rt_object* object))
......@@ -49,7 +49,7 @@ void rt_object_attach_sethook(void (*hook)(struct rt_object* object))
/**
* This function will set a hook function, which will be invoked when object
* detaches from kernel object system.
*
*
* @param hook the hook function
*/
void rt_object_detach_sethook(void (*hook)(struct rt_object* object))
......@@ -60,14 +60,14 @@ void rt_object_detach_sethook(void (*hook)(struct rt_object* object))
/**
* This function will set a hook function, which will be invoked when object
* is taken from kernel object system.
*
* The object is taken means that
*
* The object is taken means that
* semaphore - semaphore is taken by thread
* mutex - mutex is taken by thread
* event/fast event - event/fast event is received by thread
* event - event is received by thread
* mailbox - mail is received by thread
* message queue - message is received by thread
*
*
* @param hook the hook function
*/
void rt_object_trytake_sethook(void (*hook)(struct rt_object* object))
......@@ -78,15 +78,15 @@ void rt_object_trytake_sethook(void (*hook)(struct rt_object* object))
/**
* This function will set a hook function, which will be invoked when object
* have been taken from kernel object system.
*
* The object have been taken means that
*
* The object have been taken means that
* semaphore - semaphore have been taken by thread
* mutex - mutex have been taken by thread
* event/fast event - event/fast event have been received by thread
* event - event have been received by thread
* mailbox - mail have been received by thread
* message queue - message have been received by thread
* timer - timer is started
*
*
* @param hook the hook function
*/
void rt_object_take_sethook(void (*hook)(struct rt_object* object))
......@@ -97,7 +97,7 @@ void rt_object_take_sethook(void (*hook)(struct rt_object* object))
/**
* This function will set a hook function, which will be invoked when object
* is put to kernel object system.
*
*
* @param hook the hook function
*/
void rt_object_put_sethook(void (*hook)(struct rt_object* object))
......@@ -142,13 +142,6 @@ void rt_system_object_init(void)
rt_object_container[RT_Object_Class_Mutex].type = RT_Object_Class_Mutex;
#endif
#ifdef RT_USING_FASTEVENT
/* init object container - fast event */
rt_list_init(&(rt_object_container[RT_Object_Class_FastEvent].object_list));
rt_object_container[RT_Object_Class_FastEvent].object_size = sizeof(struct rt_fast_event);
rt_object_container[RT_Object_Class_FastEvent].type = RT_Object_Class_FastEvent;
#endif
#ifdef RT_USING_EVENT
/* init object container - event */
rt_list_init(&(rt_object_container[RT_Object_Class_Event].object_list));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册