⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_storage.c

📁 This a framework to test new ideas in transmission technology. Actual development is a LDPC-coder in
💻 C
字号:
/***************************************************************************              test_storage.c  -  Test of storage module                            -------------------    begin                :  2004    authors              :  ineiti    emails               :  linus.gasser@epfl.ch ***************************************************************************//***************************************************************************                                 Changes                                 ------- date - name - description 04/06/18 - ineiti - start  **************************************************************************//*************************************************************************** *                                                                         * *   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.                                   * *                                                                         * ***************************************************************************/char desc[] ="Description:\n""It only works in rf-mode so far...\n\n";#include "spc.h"#include "std.h"#define DBG_LVL 4#define CONTINOUS 0struct chain_t *test_chain;swr_sdb_id storage;void *start_it( void *arg ) {  storage = swr_sdb_instantiate_name( "storage" );  swr_sdb_set_config_int( storage, "continous", CONTINOUS );  swr_sdb_set_config_int( storage, "size_slot", 128 );  swr_sdb_set_config_int( storage, "slots_frame", 8 );#ifdef KERNEL_SPACE  call_module( storage );#else  while (1){}#endif  return 0;}swr_spc_id_t spm_id;struct thread start;/** * This function is called upon "insmod" and is used to register the * different parts of the module to the SPM. */int um_module_init(void) {  PR_CL( desc );  test_chain = NULL;  if ( swr_thread_init( &start, start_it, NULL ) < 0 )    goto first_no_stack;  return 0;first_no_stack:  PR_DBG( 0, "Couldn't allocate stack\n" );  return -1;}void um_module_exit( void ) {  swr_thread_free( &start, NULL );  swr_chain_destroy( test_chain );  swr_sdb_destroy( storage );}module_init( um_module_init );module_exit( um_module_exit );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -