base/include/rtai_hal_names.h

Go to the documentation of this file.
00001 /* 00002 * Copyright 2005 Paolo Mantegazza <mantegazza@aero.polimi.it> 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License as 00006 * published by the Free Software Foundation; either version 2 of the 00007 * License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00019 00020 #ifndef _RTAI_HAL_NAMES_H 00021 #define _RTAI_HAL_NAMES_H 00022 00023 #include <linux/version.h> 00024 00025 #define TSKEXT0 (HAL_ROOT_NPTDKEYS - 3) 00026 #define TSKEXT1 (HAL_ROOT_NPTDKEYS - 2) 00027 #define TSKEXT2 (HAL_ROOT_NPTDKEYS - 1) 00028 00029 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,32) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)) 00030 00031 #define HAL_VERSION_STRING ADEOS_VERSION_STRING 00032 00033 #define HAL_NR_CPUS ADEOS_NR_CPUS 00034 #define HAL_NR_FAULTS ADEOS_NR_FAULTS 00035 #define HAL_NR_EVENTS ADEOS_NR_EVENTS 00036 #define HAL_ROOT_NPTDKEYS ADEOS_ROOT_NPTDKEYS 00037 00038 #define HAL_APIC_HIGH_VECTOR ADEOS_SERVICE_VECTOR3 00039 #define HAL_APIC_LOW_VECTOR ADEOS_SERVICE_VECTOR2 00040 00041 #define HAL_SCHEDULE_HEAD ADEOS_SCHEDULE_HEAD 00042 #define HAL_SCHEDULE_TAIL ADEOS_SCHEDULE_TAIL 00043 #define HAL_SYSCALL_PROLOGUE ADEOS_SYSCALL_PROLOGUE 00044 #define HAL_SYSCALL_EPILOGUE 1000000 // invalid for sure, will be rejected, OK ADEOS_SYSCALL_EPILOGUE 00045 #define HAL_EXIT_PROCESS ADEOS_EXIT_PROCESS 00046 #define HAL_KICK_PROCESS ADEOS_KICK_PROCESS 00047 00048 extern struct list_head __adeos_pipeline; 00049 00050 #define hal_pipeline __adeos_pipeline 00051 #define hal_domain_struct adomain 00052 #define hal_root_domain adp_root 00053 #define hal_current_domain adp_cpu_current 00054 00055 #define hal_critical_enter adeos_critical_enter 00056 #define hal_critical_exit adeos_critical_exit 00057 00058 #define hal_clear_irq __adeos_clear_irq 00059 #define hal_lock_irq __adeos_lock_irq 00060 #define hal_unlock_irq __adeos_unlock_irq 00061 00062 #define hal_std_irq_dtype __adeos_std_irq_dtype 00063 #define hal_adeos_std_irq_dtype __adeos_std_irq_dtype 00064 00065 #define hal_tick_regs __adeos_tick_regs 00066 #define hal_tick_irq __adeos_tick_irq 00067 00068 #define hal_sync_stage __adeos_sync_stage 00069 00070 #define hal_set_irq_affinity adeos_set_irq_affinity 00071 00072 #define hal_set_irq_handler adeos_set_irq_handler 00073 00074 #define hal_propagate_event adeos_propagate_event 00075 00076 #define hal_get_sysinfo adeos_get_sysinfo 00077 00078 #define INTERCEPT_WAKE_UP_TASK(data) (((struct sig_wakeup_t *)data)->task) 00079 00080 #define FIRST_LINE_OF_RTAI_DOMAIN_ENTRY static void rtai_domain_entry(int iflag) { if (iflag) 00081 #define LAST_LINE_OF_RTAI_DOMAIN_ENTRY } 00082 00083 #ifdef CONFIG_ADEOS_NOTHREADS 00084 #define HAL_TYPE "ADEOS-NOTHREADS" 00085 #define hal_suspend_domain() break 00086 #else 00087 #define HAL_TYPE "ADEOS-THREADS" 00088 #define hal_suspend_domain() adeos_suspend_domain() 00089 #endif 00090 00091 #define hal_alloc_irq adeos_alloc_irq 00092 #define hal_free_irq adeos_free_irq 00093 #define hal_virtualize_irq adeos_virtualize_irq_from 00094 #define hal_irq_hits_pp(irq, domain, cpuid) \ 00095 do { \ 00096 domain->cpudata[cpuid].irq_hits[irq]++; \ 00097 } while (0) 00098 00099 #define hal_sysinfo_struct adsysinfo 00100 #define hal_attr_struct adattr 00101 #define hal_init_attr adeos_init_attr 00102 #define hal_register_domain adeos_register_domain 00103 #define hal_unregister_domain adeos_unregister_domain 00104 #define hal_catch_event adeos_catch_event_from 00105 #define hal_event_handler adeos_event_handler 00106 #define hal_event_handler_fun(e) events[e].handler 00107 00108 #define hal_set_printk_sync adeos_set_printk_sync 00109 #define hal_set_printk_async adeos_set_printk_async 00110 00111 #define hal_schedule_back_root __adeos_schedule_back_root 00112 00113 #define hal_processor_id adeos_processor_id 00114 00115 #define hal_hw_cli adeos_hw_cli 00116 #define hal_hw_sti adeos_hw_sti 00117 #define hal_hw_local_irq_save adeos_hw_local_irq_save 00118 #define hal_hw_local_irq_restore adeos_hw_local_irq_restore 00119 #define hal_hw_local_irq_flags adeos_hw_local_irq_flags 00120 00121 #define hal_unstall_pipeline_from adeos_unstall_pipeline_from 00122 00123 #define hal_ack_system_irq __adeos_ack_system_irq 00124 00125 #define hal_irq_handler adeos_extern_irq_handler 00126 00127 #define hal_tskext ptd 00128 00129 #else 00130 00131 #define HAL_VERSION_STRING IPIPE_VERSION_STRING 00132 00133 #define HAL_NR_CPUS IPIPE_NR_CPUS 00134 #define HAL_NR_FAULTS IPIPE_NR_FAULTS 00135 #define HAL_NR_EVENTS IPIPE_NR_EVENTS 00136 #define HAL_ROOT_NPTDKEYS IPIPE_ROOT_NPTDKEYS 00137 00138 #define HAL_APIC_HIGH_VECTOR IPIPE_SERVICE_VECTOR3 00139 #define HAL_APIC_LOW_VECTOR IPIPE_SERVICE_VECTOR2 00140 00141 #define HAL_SCHEDULE_HEAD IPIPE_EVENT_SCHEDULE 00142 #define HAL_SCHEDULE_TAIL (IPIPE_FIRST_EVENT - 2) // safely unused, cared 00143 #define HAL_SYSCALL_PROLOGUE IPIPE_EVENT_SYSCALL 00144 #define HAL_SYSCALL_EPILOGUE 1000000 // invalid for sure, will be rejected, OK 00145 #define HAL_EXIT_PROCESS IPIPE_EVENT_EXIT 00146 #define HAL_KICK_PROCESS IPIPE_EVENT_SIGWAKE 00147 00148 #define hal_pipeline __ipipe_pipeline 00149 #define hal_domain_struct ipipe_domain 00150 #define hal_root_domain ipipe_root_domain 00151 #define hal_current_domain ipipe_percpu_domain 00152 00153 #define hal_critical_enter ipipe_critical_enter 00154 #define hal_critical_exit ipipe_critical_exit 00155 00156 #define hal_clear_irq __ipipe_clear_irq 00157 #define hal_lock_irq __ipipe_lock_irq 00158 #define hal_unlock_irq __ipipe_unlock_irq 00159 00160 #define hal_std_irq_dtype __ipipe_std_irq_dtype 00161 #define hal_ipipe_std_irq_dtype __adeos_std_irq_dtype 00162 00163 #define hal_tick_regs __ipipe_tick_regs 00164 #define hal_tick_irq __ipipe_tick_irq 00165 00166 #define hal_sync_stage __ipipe_sync_stage 00167 00168 #define hal_set_irq_affinity ipipe_set_irq_affinity 00169 00170 #define hal_propagate_event ipipe_propagate_event 00171 00172 #define hal_get_sysinfo ipipe_get_sysinfo 00173 00174 #define HAL_TYPE "IPIPE-NOTHREADS" 00175 00176 #define INTERCEPT_WAKE_UP_TASK(data) ((struct task_struct *)data) 00177 00178 #define FIRST_LINE_OF_RTAI_DOMAIN_ENTRY static void rtai_domain_entry(void) { if (1) 00179 #define LAST_LINE_OF_RTAI_DOMAIN_ENTRY } 00180 00181 #define hal_suspend_domain() break 00182 00183 #define hal_alloc_irq ipipe_alloc_virq 00184 #define hal_free_irq ipipe_free_virq 00185 00186 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,32) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)) 00187 #define hal_virtualize_irq ipipe_virtualize_irq 00188 #define hal_irq_hits_pp(irq, domain, cpuid) \ 00189 do { \ 00190 domain->cpudata[cpuid].irq_hits[irq]++; \ 00191 } while (0) 00192 #else 00193 #define hal_virtualize_irq(d, n, h, a, m) \ 00194 ipipe_virtualize_irq(d, n, (void *)h, NULL, a, m) 00195 #define hal_irq_hits_pp(irq, domain, cpuid) \ 00196 do { \ 00197 /* domain->cpudata[cpuid].irq_counters[irq].total_hits++; REMIND ME TOO */\ 00198 domain->cpudata[cpuid].irq_counters[irq].pending_hits++; \ 00199 } while (0) 00200 #endif 00201 00202 #define hal_sysinfo_struct ipipe_sysinfo 00203 #define hal_attr_struct ipipe_domain_attr 00204 #define hal_init_attr ipipe_init_attr 00205 #define hal_register_domain ipipe_register_domain 00206 #define hal_unregister_domain ipipe_unregister_domain 00207 #define hal_catch_event ipipe_catch_event 00208 #define hal_event_handler ipipe_event_handler 00209 #define hal_event_handler_fun(e) evhand[e] 00210 00211 #define hal_set_printk_sync ipipe_set_printk_sync 00212 #define hal_set_printk_async ipipe_set_printk_async 00213 00214 #define hal_schedule_back_root(prev) \ 00215 ipipe_reenter_root(prev, current->policy, current->rt_priority); 00216 00217 #define hal_processor_id ipipe_processor_id 00218 00219 #define hal_hw_cli local_irq_disable_hw 00220 #define hal_hw_sti local_irq_enable_hw 00221 #define hal_hw_local_irq_save local_irq_save_hw 00222 #define hal_hw_local_irq_restore local_irq_restore_hw 00223 #define hal_hw_local_irq_flags local_save_flags_hw 00224 00225 #define hal_unstall_pipeline_from ipipe_unstall_pipeline_from 00226 00227 #define hal_ack_system_irq __ipipe_ack_system_irq 00228 00229 #define hal_irq_handler ipipe_irq_handler 00230 00231 #define hal_tskext ptd 00232 00233 #endif 00234 00235 #endif

Generated on Thu Nov 20 11:49:49 2008 for RTAI API by doxygen 1.3.8