LinuxÉãÏñÍ·±à³ÌС½á
ת×Ô£ºhttp://blog.chinaunix.net/u/7547/showart_122619.html
1.open device:
video_dev = open("\dev\video0",O_RDWR));
2.get the information of the video device
struct video_capability video_cap;
memset(&video_cap,0,sizeof(video_cap));
if(ioctl(video_dev,VIDIOCGCAP,&video_cap) == -1)
{
perror("Cann't get the information of the video device");
close(video_dev);
exit(1);
}
3.get the information of the channels
struct video_channel video_chan;
memset(&video_chan,0,sizeof(video_chan));
for(channel = 0;channel < video_cap.channels;channel++)
{
video_chan.channel = channel;
if(ioctl(video_dev,VIDIOCGCHAN,&video_chan) == -1)
{
perror("Cann't get the information of the channels");
close(video_dev);
exit(3);
}
if(video_chan.type == VIDEO_TYPE_TV)
{
#ifdef DEBUG
printf("NO.%d channel is %s,type is tv!\n",channel,video_chan.name);
#endif
}
if(video_chan.type == VIDEO_TYPE_CAMERA)
Ïà¹ØÎĵµ£º
Grubfordos Òýµ¼linuxµÄ·½·¨
·½·¨Ò»
Errorcheck off
Configfile /menu.lst
Configfile /boot/grub/menu.lst
Configfile /grub/menu.lst
Find –set-root –ignore-floppies –ignore-cd /menu.lst
Configfile /menu.lst
Find –set-root –ignore-floppies –ignore-cd /root/grub/m ......
1.ϵͳÐÅÏ¢ÏÔʾÃüÁî # uname -a # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo # ²é¿´CPUÐÅÏ¢
# hostname ......
linuxϵͳRPMÃüÁîÊÖ²á
RPMÊÇRed HatϵÁг£ÓõÄ軟¼þ°ü¸ñʽ£¬靈»îµÄʹÓÃËû將ʹÄúÔÚ RH LinuxÖÐÈç魚µÃË®.現將Æä³£見µÄʹÓ÷½·¨ÊÕ¼¯ÈçÏÂ.................
Ò»¡¢°²×°
ÃüÁî¸ñʽ£º
rpm -i ( or --install) options file1.rpm ... fileN.rpm
²ÎÊý£º
file1.rpm ... fileN.rpm ½ ......
µÚÒ»´Î½Ó´¥u-bootÒÆÖ²£¬²ËÄñÒ»¸ö£¬É¶¶¼²»¶®µÃ£¬ÔÚÍøÉÏתÁ˺ܾ㬾ö¶¨»¹ÊÇÏÈ½è¼øÒ»Ï±»È˵ľÑé°É£¡£¡£¡ÎҲο¼µÄÎÄÕÂÊÇ
http://www.diybl.com/course/6_system/linux/Linuxjs/2008727/134020_2.html£¬Õâ¸öÎÄÕ¶ÔÎÒÀ´Ëµ£¬ÕæÊDz»´í£¬¸Ä¶¯µÄ¶«Î÷±È½ÏÉÙ£¬ÎÒϲ»¶£¬^_^£¬¶ÔÓÚÕâÆªÎÄÕ£¬ÎÒÏë˵Ã÷¼¸µãµÄÊÇ£ºÔÚ²¿·Ö(Ò»)µÄµÚÎå²½µ±ÖУ ......
ÔÚÔĶÁNginxµÄ´úÂë.ÏÈÅöµ½µÄÊÇÏ̲߳¿·ÖµÄ
ÒòΪ´Ómain¿ªÊ¼×îÔçÊÇ×öÏ̲߳¿·ÖµÄ¹¤×÷
ʵϰһÏÂpthread·½ÃæµÄÄÚÈÝ
#include "pthread.h"
#include "stdio.h"
void* thread_test(void* ptr)
{
while(1)
printf("i am child pthread\n");
}
int ma ......