Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Æô¶¯Ê±¹ÒÔØrootfsµÄ¼¸ÖÖ·½Ê½

[ת]linuxÆô¶¯Ê±¹ÒÔØrootfsµÄ¼¸ÖÖ·½Ê½
Ò»Ö±¶ÔlinuxÆô¶¯Ê±¹ÒÔظùÎļþϵͳµÄ¹ý³Ì´æÔÚןܶàÒÉÎÊ£¬½ñÌìÔÚˮľ¾«»ªÇøÕÒµ½ÁËÓÐÓõÄ×ÊÁÏ£¬ÕªÂ¼ÈçÏ£º
1¡£linuxÆô¶¯Ê±£¬¾­¹ýһϵÁгõʼ»¯Ö®ºó£¬ÐèÒªmount ¸ùÎļþϵͳ£¬Îª×îºóÔËÐÐinit½ø³ÌµÈ×ö×¼±¸£¬mount
¸ùÎļþϵͳÓÐÕâô¼¸ÖÖ·½Ê½£º
1£©ÎļþϵͳÒѾ­´æÔÚÓÚÓ²ÅÌ£¨»òÕßÀàËƵÄÉ豸 ......

linux Îı¾Ä£Ê½Ï·¢ËÍ´ø¸½¼þemail

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
δ×ö²âÊÔ£¬²»ÖªµÀÊÇ·ñ¿ÉÐУ¬ÔÝ×ö±£´æ ......

LinuxÏÂRTP±à³Ì

Á÷ýÌåÖ¸µÄÊÇÔÚÍøÂçÖÐʹÓÃÁ÷¼¼Êõ´«ÊäµÄÁ¬Ðøʱ»ùýÌ壬ÆäÌصãÊÇÔÚ²¥·ÅÇ°²»ÐèÒªÏÂÔØÕû¸öÎļþ£¬¶øÊDzÉÓñßÏÂÔر߲¥·ÅµÄ·½Ê½£¬ËüÊÇÊÓƵ»áÒé¡¢IPµç»°µÈ
Ó¦Óó¡ºÏµÄ¼¼Êõ»ù´¡¡£RTPÊǽøÐÐʵʱÁ÷ýÌå´«ÊäµÄ±ê׼ЭÒéºÍ¹Ø¼ü¼¼Êõ£¬±¾ÎĽéÉÜÈçºÎÔÚLinuxÏÂÀûÓÃJRTPLIB½øÐÐʵʱÁ÷ýÌå±à³Ì¡£
 
     &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ