/ src / rtapi / rtapi_app.h
rtapi_app.h
 1  //    Copyright 2003-2007, various authors
 2  //
 3  //    This program is free software; you can redistribute it and/or modify
 4  //    it under the terms of the GNU General Public License as published by
 5  //    the Free Software Foundation; either version 2 of the License, or
 6  //    (at your option) any later version.
 7  //
 8  //    This program is distributed in the hope that it will be useful,
 9  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
10  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  //    GNU General Public License for more details.
12  //
13  //    You should have received a copy of the GNU General Public License
14  //    along with this program; if not, write to the Free Software
15  //    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  #ifndef RTAPI_APP_H
17  #define RTAPI_APP_H
18  
19  /*
20    for Linux kernel modules, exactly one file needs to
21    include <linux/module.h>. We put this in this header.
22    If we ever support non-Linux platforms, this file will
23    get full of ifdefs.
24  */
25  
26  #if !defined(__KERNEL__)
27  EXPORT_SYMBOL(rtapi_app_main);
28  EXPORT_SYMBOL(rtapi_app_exit);
29  #else
30  #include <linux/module.h>
31  
32  #define rtapi_app_main(a) init_module(a)
33  #define rtapi_app_exit(a) cleanup_module(a)
34  #endif
35  
36  #endif /* RTAPI_APP_H */