linux ½ø³Ì¼ä¹²ÏíÄÚ´æ
¿ÉÒÔ²ÉÓÃsysVµÄshmget £« shmat ʵÏÖ¡£
µ«ÊÇÎÒ¸üϲ»¶shm_open + mmap ¸ü¼òµ¥¡£
#---------------------writer.c----------------------------
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
struct ofs_stat
{
int a;
int b;
int c;
};
int main(void)
{
int fd;
int count = 0;
struct ofs_stat stat={0};
struct ofs_stat *s;
void *region=NULL;
char *name;
if((fd=shm_open("ofs_mmm", O_TRUNC|O_CREAT|O_RDWR,0644))==-1) {
perror("open");
exit(1);
}
ftruncate(fd, sizeof(stat));
region = mmap(NULL, sizeof(struct stat), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
if(region == (caddr_t)-1) {
perror("mmap");
shm_unlink("ofs_mmm");
return 1;
}
s = (struct ofs_stat *)region;
while(1) {
s->a=count++;
printf("%d \n",s->a);
sleep(1);
}
shm_unlink("ofs_mmm");
return 0;
}
#--------------------reader.c----------------------------
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
struct ofs_stat
{
int a;
int b;
&
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
[ת]linuxÆô¶¯Ê±¹ÒÔØrootfsµÄ¼¸ÖÖ·½Ê½
Ò»Ö±¶ÔlinuxÆô¶¯Ê±¹ÒÔظùÎļþϵͳµÄ¹ý³Ì´æÔÚןܶàÒÉÎÊ£¬½ñÌìÔÚˮľ¾«»ªÇøÕÒµ½ÁËÓÐÓõÄ×ÊÁÏ£¬ÕªÂ¼ÈçÏ£º
1¡£linuxÆô¶¯Ê±£¬¾¹ýһϵÁгõʼ»¯Ö®ºó£¬ÐèÒªmount ¸ùÎļþϵͳ£¬Îª×îºóÔËÐÐinit½ø³ÌµÈ×ö×¼±¸£¬mount
¸ùÎļþϵͳÓÐÕâô¼¸ÖÖ·½Ê½£º
1£©ÎļþϵͳÒѾ´æÔÚÓÚÓ²ÅÌ£¨»òÕßÀàËƵÄÉ豸 ......
mail+uuencode
[root@room i386]# uuencode openvpn-2.0.5-1.i386.rpm openvpn-2.0.5-1.i386.rpm | mail -s youname@domain.com openvpn-2.0.5-1.i386.rpm
Èç¹ûûÓÐÕÒµ½ uuencode ÃüÁî,ÔòÐèÒª°²×°sharutils
[root@room i386]# yum install sharutils
δ×ö²âÊÔ£¬²»ÖªµÀÊÇ·ñ¿ÉÐУ¬ÔÝ×ö±£´æ ......
Á÷ýÌåÖ¸µÄÊÇÔÚÍøÂçÖÐʹÓÃÁ÷¼¼Êõ´«ÊäµÄÁ¬Ðøʱ»ùýÌ壬ÆäÌصãÊÇÔÚ²¥·ÅÇ°²»ÐèÒªÏÂÔØÕû¸öÎļþ£¬¶øÊDzÉÓñßÏÂÔر߲¥·ÅµÄ·½Ê½£¬ËüÊÇÊÓƵ»áÒé¡¢IPµç»°µÈ
Ó¦Óó¡ºÏµÄ¼¼Êõ»ù´¡¡£RTPÊǽøÐÐʵʱÁ÷ýÌå´«ÊäµÄ±ê×¼ÐÒéºÍ¹Ø¼ü¼¼Êõ£¬±¾ÎĽéÉÜÈçºÎÔÚLinuxÏÂÀûÓÃJRTPLIB½øÐÐʵʱÁ÷ýÌå±à³Ì¡£
&nb ......