Ignore:
Timestamp:
May 9, 2005, 7:02:45 AM (20 years ago)
Author:
bird
Message:

SysV Shared Memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/sys/shm.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1985 r1986  
    3939/** @file
    4040 * FreeBSD 5.3
     41 * @changed the SHMLBA to 64KB.
    4142 */
    4243
     
    4849#define SHM_RDONLY  010000  /* Attach read-only (else read-write) */
    4950#define SHM_RND     020000  /* Round attach address to SHMLBA */
    50 #define SHMLBA      PAGE_SIZE /* Segment low boundary address multiple */
     51#define SHMLBA      (0x10000) /* Segment low boundary address multiple */
    5152
    5253/* "official" access mode definitions; somewhat braindead since you have
     
    6364#define SHM_INFO        14
    6465
     66#ifdef __EMX__
     67typedef __uint32_t shmatt_t;
     68#endif
     69
    6570struct shmid_ds {
    6671        struct ipc_perm shm_perm;       /* operation permission structure */
     72#ifdef __EMX__
     73        size_t          shm_segsz;      /* size of segment in bytes */
     74#else
    6775        int             shm_segsz;      /* size of segment in bytes */
     76#endif
    6877        pid_t           shm_lpid;   /* process ID of last shared memory op */
    6978        pid_t           shm_cpid;       /* process ID of creator */
    70         short           shm_nattch;     /* number of current attaches */
     79#ifdef __EMX__
     80        shmatt_t        shm_nattch;     /* number of current attaches */
     81#else
     82        short           shm_nattch;     /* number of current attaches */
     83#endif
    7184        time_t          shm_atime;      /* time of last shmat() */
    7285        time_t          shm_dtime;      /* time of last shmdt() */
     
    88101                shmall;         /* max amount of shared memory (pages) */
    89102};
     103#ifndef __EMX__
    90104extern struct shminfo   shminfo;
    91105extern struct shmid_ds  *shmsegs;
     106#endif
    92107
    93108struct shm_info {
     
    100115};
    101116
     117#ifndef __EMX__
    102118struct thread;
    103119struct proc;
     
    106122void    shmexit(struct vmspace *);
    107123void    shmfork(struct proc *, struct proc *);
     124#endif /* !__EMX__ */
    108125#else /* !_KERNEL */
    109126
     
    116133
    117134__BEGIN_DECLS
     135#ifndef __EMX__
    118136int shmsys(int, ...);
     137#endif
    119138void *shmat(int, const void *, int);
    120139int shmget(key_t, size_t, int);
Note: See TracChangeset for help on using the changeset viewer.