Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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;
&


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

Linux»ù±¾Ö¸Áî

Linux»ù±¾Ö¸Áî
alias
ÌæÖ¸ÁîÈ¡±ðÃû
¡ò alias ÁгöĿǰϵͳËùʹÓõÄËùÓÐÖ¸Áî±ðÃû
¡ò alias ±ðÃû=Linux Ö¸ÁîÃû³Æ ´ËʱÈôÊäÈ롸±ðÃû¡¹Ôò¹¦ÄÜ»á¸úÊäÈ롸Linux Ö¸ÁîÃû³Æ¡¹Ïàͬ
¡ò ÈôÏëҪÿ´Î¿ª»ú¶¼Ê¹Óô˱ðÃû£¬ÔÚ bash ÖУ¬Ò»¶¨ÒªÔÚ .bashrc ÖÐÖ¸¶¨£¬Èç¹ûÊÇ tcsh ÖУ¬ÔòÒªÔÚ .cshrc ÖÐÖ¸¶¨
ar
½«Ðí¶àµµ°¸±¸´æ³ÉÒ»¸ö»ò¶à¸ö ......

LinuxµÄϵͳ¹ÜÀíÔ±,ÎÒÃÇÀë²»¿ªÕâЩ³£ÓõÄÃüÁî.

¡¡¡¡whois
¡¡¡¡¹¦ÄÜ˵Ã÷£º²éÕÒ²¢ÏÔʾÓû§ÐÅÏ¢¡£
¡¡¡¡Óï·¨£ºwhois [ÕʺÅÃû³Æ]
¡¡¡¡²¹³ä˵Ã÷£ºwhoisÖ¸Áî»áÈ¥²éÕÒ²¢ÏÔʾָ¶¨ÕʺŵÄÓû§Ïà¹ØÐÅÏ¢£¬ÒòΪËüÊǵ½Network SolutionsµÄWHOISÊý¾Ý¿âÈ¥²éÕÒ£¬ËùÒÔ¸ÃÕʺÅÃû³Æ±ØÐëÔÚÉÏÃæ×¢²á·½ÄÜѰ»ñ£¬ÇÒÃû³ÆÃ»ÓдóСдµÄ²î±ð¡£
¡¡¡¡------------------------------------------------ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ