rtai-core/include/rtai_registry.h

Go to the documentation of this file.
00001 
00027 #ifndef _RTAI_REGISTRY_H
00028 #define _RTAI_REGISTRY_H
00029 
00030 #include <rtai_nam2num.h>
00031 
00032 struct task_struct;
00033 
00034 struct rt_registry_entry_struct {
00035         unsigned long name;      // Numerical representation of resource name
00036         void *adr;               // Physical rt memory address of resource
00037         struct task_struct *tsk; // Linux task owner of the resource
00038         int pid;                 // Linux task pid
00039         int type;                // Type of resource
00040         int count;               // Usage registry
00041 };
00042 
00043 #define MAX_SLOTS  CONFIG_RTAI_SCHED_LXRT_NUMSLOTS // Max number of registered objects
00044 
00045 #define IS_TASK  0               // Used to identify registered resources
00046 #define IS_SEM   1
00047 #define IS_RWL   2
00048 #define IS_SPL   3
00049 #define IS_MBX   4
00050 #define IS_PRX   5
00051 #define IS_BIT   6
00052 #define IS_TBX   7
00053 #define IS_HPCK  8
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif /* __cplusplus */
00058 
00059 unsigned long is_process_registered(struct task_struct *tsk);
00060 
00061 int rt_register(unsigned long nam,
00062                 void *adr,
00063                 int typ,
00064                 struct task_struct *tsk);
00065 
00066 int rt_drg_on_name(unsigned long name);
00067 
00068 int rt_drg_on_name_cnt(unsigned long name);
00069 
00070 int rt_drg_on_adr(void *adr);
00071 
00072 int rt_drg_on_adr_cnt(void *adr);
00073 
00074 unsigned long rt_get_name(void *adr);
00075 
00076 void *rt_get_adr(unsigned long name);
00077 
00078 void *rt_get_adr_cnt(unsigned long name);
00079 
00080 int rt_get_type(unsigned long name);
00081 
00082 #ifdef CONFIG_PROC_FS
00083 int rt_get_registry_slot(int slot,
00084                          struct rt_registry_entry_struct *entry);
00085 #endif /* CONFIG_PROC_FS */
00086 
00087 #ifdef __cplusplus
00088 }
00089 #endif /* __cplusplus */
00090 
00091 #define exist(name)  rt_get_adr(nam2num(name))
00092 
00093 #endif /* !_RTAI_REGISTRY_H */

Generated on Sat Jul 24 19:36:03 2004 for RTAI API by doxygen 1.3.4