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»ù±¾Ö¸Áî
alias
ÌæÖ¸ÁîÈ¡±ðÃû
¡ò alias ÁгöĿǰϵͳËùʹÓõÄËùÓÐÖ¸Áî±ðÃû
¡ò alias ±ðÃû=Linux Ö¸ÁîÃû³Æ ´ËʱÈôÊäÈ롸±ðÃû¡¹Ôò¹¦ÄÜ»á¸úÊäÈ롸Linux Ö¸ÁîÃû³Æ¡¹Ïàͬ
¡ò ÈôÏëҪÿ´Î¿ª»ú¶¼Ê¹Óô˱ðÃû£¬ÔÚ bash ÖУ¬Ò»¶¨ÒªÔÚ .bashrc ÖÐÖ¸¶¨£¬Èç¹ûÊÇ tcsh ÖУ¬ÔòÒªÔÚ .cshrc ÖÐÖ¸¶¨
ar
½«Ðí¶àµµ°¸±¸´æ³ÉÒ»¸ö»ò¶à¸ö ......
¡¡¡¡whois
¡¡¡¡¹¦ÄÜ˵Ã÷£º²éÕÒ²¢ÏÔʾÓû§ÐÅÏ¢¡£
¡¡¡¡Óï·¨£ºwhois [ÕʺÅÃû³Æ]
¡¡¡¡²¹³ä˵Ã÷£ºwhoisÖ¸Áî»áÈ¥²éÕÒ²¢ÏÔʾָ¶¨ÕʺŵÄÓû§Ïà¹ØÐÅÏ¢£¬ÒòΪËüÊǵ½Network SolutionsµÄWHOISÊý¾Ý¿âÈ¥²éÕÒ£¬ËùÒÔ¸ÃÕʺÅÃû³Æ±ØÐëÔÚÉÏÃæ×¢²á·½ÄÜѰ»ñ£¬ÇÒÃû³ÆÃ»ÓдóСдµÄ²î±ð¡£
¡¡¡¡------------------------------------------------ ......