📄 subsystem.h
字号:
/*************************************************************************** subsystem.h - RTLinux kernel module for subsystem_thread ------------------- begin : 2002 authors : Linus Gasser emails : linus.gasser@epfl.ch ***************************************************************************//*************************************************************************** Changes ------- date - name - description 2002-09-12 - ineiti - begin **************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************//** * @short Subsystem_thread defines the function that dispatches everything * for a module */#ifndef SUBSYSTEM_THREAD_H__#define SUBSYSTEM_THREAD_H__#include "sdb.h"#ifdef USER_SPACE#define func_ret(x,ret) if ( x ) ret=x( context );#else#define func_ret(x,ret) \ if ( (unsigned long)x > 0xc0000000 ) { ret=x( context ); } else {\ if ( x ) PR_DBG( 0, "are you crazy? There ain't no function at %p\n", x );\ }#endif#define func(x) { int ret; func_ret((x),ret); }#define funcarg(x) if ( x ) x /** * @short Initialisation of a subsystem * * Initialises a subsystem * * @param context the context of the subsystem * @return 0 on success, -1 otherwise */int subsys_init( swr_sdb_t *context );/** * @short THE message-handler * * This message-handler is called after all the initialisation have been done. * Its responsabilities * include: * <ul> * <li>Handle incoming packets</li> * <li>Dispatch outgoing packets</li> * <li>Reconfigure the module</li> * <li>Hand along module-specific messages</li> * </ul> * * @param conf The configuration of everything * * @return nothing */int subsys_handler( swr_sdb_t *context, int msg, void *data, swr_sdb_id ret_id );#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -