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

📄 readme_selectdemo

📁 这里包含了风河vxworks系统中的官方例程的C源代码
💻
字号:
FILE LIST -              selectDemo.cDESCRIPTION -	      This program demonstrates the usage of the select() routine.	      The selectDemo task writes messages to pipe devices. The	      selectOnReadFds task blocks on the select routine and then	      reads a message only from the pipe devices that are ready	      for reading.RUNNING DEMO -	      Place the selectDemo.c in your <Tornado> dir. Depending on	      the target you have, define the CPU in your compile line	      and use the Makefile in the BSP dir. to compile.	      To run this code invoke the function selectDemo().TESTED ON -   Host/Target : Solaris 2.5.1 / mv1604	      VxWorks     : 5.3.1EXAMPLE COMPILE LINE -     	      make CPU=PPC604 selectDemo.o% make selectDemo.occppc -B/petaluma1/mayur/tor101-ppc/host/sun4-solaris2/lib/gcc-lib/ -mstrict-align -ansi -nostdinc -O2 -fvolatile -fno-builtin -fno-for-scope -Wall -I/h   -I. -I/petaluma1/mayur/tor101-ppc/target/config/all -I/petaluma1/mayur/tor101-ppc/target/h -I/petaluma1/mayur/tor101-ppc/target/src/config -I/petaluma1/mayur/tor101-ppc/target/src/drv -DCPU=PPC604  -DMV1600 -DTARGET_DIR="\"mv1604\""   -c selectDemo.cOUTPUTS/LOGFILE -On VxWorks target:==================-> ld <selectDemo.ovalue = 716888 = 0xaf058-> selectDemoThe Output on Console:======================"/pipe/1" pipe device created"/pipe/2" pipe device createdValue of the fd for /pipe/1 = 10 Value of the fd for /pipe/2 = 11 selectOnReadFds: Number of bits (in fd_set struct) to be tested = 120 : To quit this Demo1 : To write a message to "/pipe/1"2 : To write a message to "/pipe/2"3 : To write a message to "/pipe/1" and "/pipe/2"Enter your choice :

⌨️ 快捷键说明

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