Changeset 1986 for trunk/src/emx/include
- Timestamp:
- May 9, 2005, 7:02:45 AM (20 years ago)
- Location:
- trunk/src/emx/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/backend.h
-
Property cvs2svn:cvs-rev
changed from
1.23
to1.24
r1985 r1986 894 894 /** @defgroup grp_Back_sysvipc LIBC Backend - SysV IPC 895 895 * @{ */ 896 897 /** 898 * sysget syscall. 899 */ 900 int __libc_Back_sysvSemGet(key_t key, int nsems, int semflg); 901 902 /** 903 * semop syscall. 904 */ 905 int __libc_Back_sysvSemOp(int semid, struct sembuf *sops_user, size_t nsops); 906 896 907 /** 897 908 * semctl syscall … … 899 910 int __libc_Back_sysvSemCtl(int semid, int semnum, int cmd, union semun real_arg); 900 911 901 /** 902 * sysget syscall. 903 */ 904 int __libc_Back_sysvSemGet(key_t key, int nsems, int semflg); 905 906 /** 907 * semop syscall. 908 */ 909 int __libc_Back_sysvSemOp(int semid, struct sembuf *sops_user, size_t nsops); 912 913 /** 914 * shmget. 915 */ 916 int __libc_Back_sysvShmGet(key_t key, size_t size, int shmflg); 917 918 /** 919 * shmat. 920 */ 921 int __libc_Back_sysvShmAt(int shmid, const void *shmaddr, int shmflg, void **ppvActual); 922 923 /** 924 * shmdt. 925 */ 926 int __libc_Back_sysvShmDt(const void *shmaddr); 927 928 /** 929 * shmctl. 930 */ 931 int __libc_Back_sysvShmCtl(int shmid, int cmd, struct shmid_ds *bufptr); 932 933 /** @} */ 934 935 936 /** @defgroup grp_Back_safesem LIBC Backend - Internal Signal-Safe Semaphores. 937 * @{ */ 938 939 /** 940 * Creates a safe mutex sem. 941 * 942 * @returns 0 on success. 943 * @returns Negative error code (errno.h) on failure. 944 * @param phmtx Where to store the semaphore handle. 945 * @param fShared Set if the semaphore should be sharable between processes. 946 */ 947 int __libc_Back_safesemMtxCreate(uintptr_t *phmtx, int fShared); 948 949 /** 950 * Opens a shared safe mutex sem. 951 * 952 * @returns 0 on success. 953 * @returns Negative error code (errno.h) on failure. 954 * @param hmtx The semaphore handle. 955 */ 956 int __libc_Back_safesemMtxOpen(uintptr_t hmtx); 957 958 /** 959 * Closes a shared safe mutex sem. 960 * 961 * @returns 0 on success. 962 * @returns Negative error code (errno.h) on failure. 963 * @param hmtx The semaphore handle. 964 */ 965 int __libc_Back_safesemMtxClose(uintptr_t hmtx); 966 967 /** 968 * Locks a mutex semaphore. 969 * 970 * @returns 0 on success. 971 * @returns Negative errno on failure. 972 * @param hmtx Handle to the mutex. 973 */ 974 int __libc_Back_safesemMtxLock(uintptr_t hmtx); 975 976 /** 977 * Unlocks a mutex semaphore. 978 * 979 * @returns 0 on success. 980 * @returns Negative errno on failure. 981 * @param hmtx Handle to the mutex. 982 */ 983 int __libc_Back_safesemMtxUnlock(uintptr_t hmtx); 984 985 /** 986 * Creates a safe event sem. 987 * 988 * @returns 0 on success. 989 * @returns Negative error code (errno.h) on failure. 990 * @param phev Where to store the semaphore handle. 991 * @param fShared Set if the semaphore should be sharable between processes. 992 */ 993 int __libc_Back_safesemEvCreate(uintptr_t *phev, int fShared); 994 995 /** 996 * Opens a shared safe event sem. 997 * 998 * @returns 0 on success. 999 * @returns Negative error code (errno.h) on failure. 1000 * @param hev The semaphore handle. 1001 */ 1002 int __libc_Back_safesemEvOpen(uintptr_t hev); 1003 1004 /** 1005 * Closes a shared safe mutex sem. 1006 * 1007 * @returns 0 on success. 1008 * @returns Negative error code (errno.h) on failure. 1009 * @param hev The semaphore handle. 1010 */ 1011 int __libc_Back_safesemEvClose(uintptr_t hev); 1012 1013 /** 1014 * Sleep on a semaphore. 1015 * 1016 * This is the most difficult thing we're doing in this file. 1017 * 1018 * @returns 0 on success. 1019 * @returns Negative error code (errno.h) on failure. 1020 * 1021 * @param hev The semaphore to sleep on. 1022 * @param hmtx The semaphore protecting hev and which is to be unlocked while 1023 * sleeping and reaquired upon waking up. 1024 * @param pfnComplete Function to execute on signal and on wait completion. 1025 * @param pvUser User argument to pfnComplete. 1026 */ 1027 int __libc_Back_safesemEvSleep(uintptr_t hev, uintptr_t hmtx, void (*pfnComplete)(void *pvUser), void *pvUser); 1028 1029 /** 1030 * Wakes up all threads sleeping on a given event semaphore. 1031 * 1032 * @returns 0 on success. 1033 * @returns Negative error code (errno.h) on failure. 1034 * @param hev Event semaphore to post. 1035 */ 1036 int __libc_Back_safesemEvWakeup(uintptr_t hev); 1037 910 1038 911 1039 /** @} */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/logstrict.h
-
Property cvs2svn:cvs-rev
changed from
1.12
to1.13
r1985 r1986 184 184 #define __LIBC_LOG_GRP_MMAN 16 185 185 186 /** Backend SysV IPC APIs. */ 187 #define __LIBC_LOG_GRP_BACK_IPC 17 186 188 /** Backend Thread APIs. */ 187 189 #define __LIBC_LOG_GRP_BACK_THREAD 18 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/sharedpm.h
-
Property cvs2svn:cvs-rev
changed from
1.22
to1.23
r1985 r1986 557 557 /** 116 - Pointer to SysV Sempahore globals. */ 558 558 struct __libc_SysV_Sem *pSysVSem; 559 560 /* 120 - The rest of the block, up to cbProcess, is undefined in this version. 559 /** 120 - Pointer to SysV Shared Memory globals. */ 560 struct __libc_SysV_Shm *pSysVShm; 561 /** 124 - Pointer to SysV Message Queue globals. */ 562 struct __libc_SysV_Msg *pSysVMsg; 563 564 /* 128 - The rest of the block, up to cbProcess, is undefined in this version. 561 565 * Future versions of LIBC may use this area assuming it's initalized with zeros. 562 566 */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/sys/shm.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1985 r1986 39 39 /** @file 40 40 * FreeBSD 5.3 41 * @changed the SHMLBA to 64KB. 41 42 */ 42 43 … … 48 49 #define SHM_RDONLY 010000 /* Attach read-only (else read-write) */ 49 50 #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 */ 51 52 52 53 /* "official" access mode definitions; somewhat braindead since you have … … 63 64 #define SHM_INFO 14 64 65 66 #ifdef __EMX__ 67 typedef __uint32_t shmatt_t; 68 #endif 69 65 70 struct shmid_ds { 66 71 struct ipc_perm shm_perm; /* operation permission structure */ 72 #ifdef __EMX__ 73 size_t shm_segsz; /* size of segment in bytes */ 74 #else 67 75 int shm_segsz; /* size of segment in bytes */ 76 #endif 68 77 pid_t shm_lpid; /* process ID of last shared memory op */ 69 78 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 71 84 time_t shm_atime; /* time of last shmat() */ 72 85 time_t shm_dtime; /* time of last shmdt() */ … … 88 101 shmall; /* max amount of shared memory (pages) */ 89 102 }; 103 #ifndef __EMX__ 90 104 extern struct shminfo shminfo; 91 105 extern struct shmid_ds *shmsegs; 106 #endif 92 107 93 108 struct shm_info { … … 100 115 }; 101 116 117 #ifndef __EMX__ 102 118 struct thread; 103 119 struct proc; … … 106 122 void shmexit(struct vmspace *); 107 123 void shmfork(struct proc *, struct proc *); 124 #endif /* !__EMX__ */ 108 125 #else /* !_KERNEL */ 109 126 … … 116 133 117 134 __BEGIN_DECLS 135 #ifndef __EMX__ 118 136 int shmsys(int, ...); 137 #endif 119 138 void *shmat(int, const void *, int); 120 139 int shmget(key_t, size_t, int); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.