📄 user.c
字号:
/*************************************************************************** user.c - Implements all the necessary functions for user-space ------------------- begin : 2002 authors : Linus Gasser emails : linus.gasser@epfl.ch ***************************************************************************//*************************************************************************** Changes ------- date - name - description 02-10-09 - ineiti- begin 02-12-09 - ineiti - added userprocfs **************************************************************************//*************************************************************************** * * * 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. * * * ***************************************************************************//** * This is the library a user-space-test program has to link against. * It offers all kinds of different functions that are available in * RTLinux kernel-space and that need to be emulated in user-space. * Have fun... */#include <stdlib.h>#include <dlfcn.h>#include "system.h"#include "user.h"#include "debugging.h"#define DBG_LVL 0void *bigphysarea_alloc_pages( int count, int align, int priority ) { return malloc( count * PAGE_SIZE );}void bigphysarea_free_pages( void *base ) { free( base );}int _init( void ) { PR_DBG( 4, "Initialising user\n" ); return 0;}void _fini( void ) { PR_DBG( 4, "Stopping user, cleaning up modules\n" );}EXPORT_SYMBOL(bigphysarea_alloc_pages);EXPORT_SYMBOL(bigphysarea_free_pages);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -