main.c

来自「wimax BS simulation code,implemented und」· C语言 代码 · 共 55 行

C
55
字号
/* * 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 + =
减小字号Ctrl + -
显示快捷键?