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

📄 main.c

📁 wimax BS simulation code,implemented under linux.
💻 C
字号:
/* * This piece of code is totally free. If any pitfalls found,  * please feel free to contact me at jetmotor@21cn.com * THANKS A LOT! */#include <unistd.h>#include <stdio.h>#include <string.h>#include "prov.h"#include "task.h"#include "mac.h"#include "wxsched.h"#include "bitops.h"#include "wxbuff.h"int main(int argc, char *argv[]){	int ret;	//prio_array_t test;	/* init provision using default value */	init_prov();	/* init context */	wxbuff_pool_init();	wxtmpool_init();	mac_init();		//memset(test.bitmap, 0, MAX_PRIORITY);	//__set_bit(191, (volatile unsigned long *)test.bitmap);	//fprintf(stdout, "pos: %d\n", find_first_bit((const unsigned long *)test.bitmap, MAX_PRIORITY));	/* initialize tasks */	init_task();	/* start tasks */	if ( (ret = start_task()) != 0 ) {		fprintf(stdout, "error: %s\n", strerror(ret));		return -1;	}	while ( 1 ) sleep(5000);	/* when the server is shutdown */	stop_task();	term_task();	return 0;}

⌨️ 快捷键说明

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