00001 /* 00002 * Copyright (C) 2005 Jan Kiszka <jan.kiszka@web.de>. 00003 * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@gmx.net>. 00004 * 00005 * RTAI/fusion is free software; you can redistribute it and/or modify it 00006 * under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * RTAI/fusion is distributed in the hope that it will be useful, but 00011 * WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with RTAI/fusion; if not, write to the Free Software Foundation, 00017 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef _RTDM_CORE_H 00021 #define _RTDM_CORE_H 00022 00023 #include <nucleus/pod.h> 00024 #include <rtdm/rtdm_driver.h> 00025 00026 00027 #define DEF_FILDES_COUNT 64 /* default number of file descriptors */ 00028 00029 00030 struct rtdm_fildes { 00031 struct rtdm_fildes *next; 00032 volatile struct rtdm_dev_context *context; 00033 }; 00034 00035 00036 #ifdef CONFIG_SMP 00037 extern xnlock_t rt_fildes_lock; 00038 #endif /* CONFIG_SMP */ 00039 00040 extern unsigned int fd_count; 00041 extern struct rtdm_fildes *fildes_table; 00042 extern int open_fildes; 00043 00044 00045 int __init rtdm_core_init(void); 00046 00047 static inline void rtdm_core_cleanup(void) 00048 { 00049 kfree(fildes_table); 00050 } 00051 00052 #endif /* _RTDM_CORE_H */