摘要:
tomcat webapp contentC:\Program Files\apache-tomcat-7.0.27\webapps\appname\1 WEB-INF \1 web.xml 2 html/jsp 2 classes 3 ... 3 lib tomcat architectureServer(Service(connector1,connector2,Engine(host1,host2)))注:1 connector用来实现协议连接,如http协议 2 参考C:\Program Files\apache-tomcat-7.0.27\conf\server.xml tomcat 阅读全文
摘要:
ARM开发环境搭建1 RVDS2.22 JLinkARM_V402dStep0 安装U-Boot到OK64101 启动J-Link GDB Server2 启动CodeWarrior for RVDS (1)Edit->Debug Settings->Language Settings->RealView Assembler/RealView Compiler Target->Architecture,选择ARM1176JZF-S (2)Edit->Debug Settings->Linker->RealView Linker Output->S 阅读全文
摘要:
J-Link驱动下载及安装1、登录 http://www.segger.com2、下载 Software and documentation pack for Windows V4.02d[7165 kb](这个版本对OK6410开发板单步调试较好)3、安装 Setup_JLinkARM_V402d.zipRVDS2.2下载及安装Download1、地址:http://www.mcu123.com/down/view.asp?id=522、超前科技登录 用户名:hnu14512 密码: 3040... 解压密码:www.mcu123.comSetup1、解压 ARM.RealView.Deve 阅读全文
摘要:
编译: gcc 3_5\ thread_create.c -lpthread -o 3_5\ thread_create线程退出:1 被进程终止2 调用void pthread_exit(void *rval_ptr)3 线程运行结束后return例:3_5 thread_create.c 3_5 thread_int.c 3_5 thread_exit.c 3_5 thread_clean.c 阅读全文
摘要:
信号通信#include#include#includeint kill(pid_t pid,int signo)/*可以向自身和其他进程发送信号*/int raise(int signo)/*只能向自身发送信号*/kill -s SIGQUIT PID/*经过seconds秒产生SIGALRM信号;如果不捕捉该信号,则默认终止该进程*/unsigned int alarm(unsigned int seconds)int pause()/*进程挂起,直到捕捉到一信号,挂起结束*/例:3_4 signal.c 阅读全文
摘要:
1 管道是单向的,管尾写数据,管头读数据2 无名管道:子进程和父进程之间通信3 有名管道:任意两个进程之间通信例:3_4 pipe_rw.c 3_4 fifo_read.c 3_4 fifo_write.c 阅读全文
摘要:
/***创建进程***//**调用一次fork,返回两次1 在父进程中返回新创建的子进程的PID2 在子进程中返回03 出现错误返回一个负值**/注:子进程和父进程共享fork()之后的代码段例:3_1 fork1.c /***fork()和vfork()的区别1 vfork:子进程和父进程共享数据段,子进程先运行,父进程后运行2 fork: 子进程拷贝父进程数据段,运行顺序不确定***/例:3_1 fork2.c 3_1 vfork.c 阅读全文
摘要:
Makefile:规定源文件之间的依赖关系及编译规则make -f Makefile例如:# This is a Makefilehello:hello.o gcc hello.o -o hellohello.o:hello.c gcc -c hello.c.PHONY:cleanclean: rm -f hello hello.o注意:1 Makefile文件中只有一个最终目标,第1条规则中的目标将被确定为最终目标2 命令以tab键开始,命令前加@取消回显3 没有任何依赖只有执行动作的目标称为伪目标,用.PHONY声明,用make clean执行Makefile中的常用变量$@代表目标文件$ 阅读全文
摘要:
gdbgcc -g hello.c -o hello启动gdb1 gdb hello2 gdb file hellorunnext/***单步运行(不进入子函数)***/step/***单步运行(进入子函数)***/continue/***继续运行程序***/quitlist/***查看程序***/info breakdelete breakpoint's numberprint var/***查看变量var***/watch var/***监控变量var***/finish/***运行程序,直到当前函数结束***/设置断点1 #include"stdio.h"2 阅读全文
摘要:
gcc默认头文件目录在/usr/include或当前目录,默认库文件目录在/usr/lib添加头文件目录:-I/home/chenyong/shell添加库文件目录:-L/home/chenyong/shell例如:gcc -I/home/chenyong/shell hello.c -o hello库动态库以.so为后缀,在程序执行时再加载所需函数静态库以.a为后缀,链接器提前找到程序所需要的库函数和源文件的目标文件形成可执行文件gcc 默认链接动态库链接静态库:gcc -static hello.c -o hello-Wall: 编译时生成所有警告信息-w: 编译时不生成任何警告信息-DH 阅读全文