]> rtime.felk.cvut.cz Git - arc.git/blob - system/kernel/include/com_internal.h
Again, loads of refactoring and removing and adding files.
[arc.git] / system / kernel / include / com_internal.h
1 \r
2 #ifndef COM_INTERNAL_H_\r
3 #define COM_INTERNAL_H_\r
4 \r
5 \r
6 /*-----------------------------------------------------------------*/\r
7 \r
8 /*\r
9  * The only information about the COM that is valid is\r
10  * in the COM specification ..SWS_COM.pdf.\r
11  *\r
12  * The most important requirements are COM010 and COM013\r
13  *\r
14  * Com_Init()\r
15  * Com_DeInit()\r
16  *\r
17  * No error hooks..\r
18  * No. GetMessageStatus()\r
19  * No. SendZeroMessage()\r
20  * No. SendDynamicMessage(), RecieveDynamicMessage()\r
21  * Yes. SendMessage()\r
22  *\r
23  * */\r
24 \r
25 typedef enum OsMessageProperty {\r
26         // ???\r
27         SEND_STATIC_INTERNAL,\r
28         // messages are not consumed during read\r
29         RECEIVE_UNQUEUED_INTERNAL,\r
30         // We have an internal queue\r
31         RECEIVE_QUEUE_INTERNAL,\r
32 } OsMessagePropertyType;\r
33 \r
34 \r
35 \r
36 typedef enum OsMessageNotificationAction {\r
37         MESSAGE_NOTIFICATION_ACTION_NONE=0,\r
38         MESSAGE_NOTIFICATION_ACTION_ACTIVATETASK,\r
39         MESSAGE_NOTIFICATION_ACTION_SETEVENT,\r
40 } OsMessageNotificationActionType;\r
41 \r
42 typedef struct OsMessageNotification {\r
43         OsMessageNotificationActionType type;\r
44         TaskType                task_id;\r
45         EventMaskType   event_id;\r
46 } OsMessageNotificationType;\r
47 \r
48 \r
49 typedef struct OsMessage {\r
50         OsMessagePropertyType           property;               // send/recieve...\r
51         OsMessageNotificationType       notification;\r
52         int                                             q_size;                 // 0-Not queued\r
53 \r
54         // TODO: This is not a good solution but it will have to do for now\r
55         void *data;\r
56         int data_size;\r
57 } OsMessageType;\r
58 \r
59 \r
60 #endif /* COM_INTERNAL_H_ */\r