Changeset 2048 for trunk/src/emx/include
- Timestamp:
- Jun 19, 2005, 6:10:41 AM (20 years ago)
- Location:
- trunk/src/emx/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/386/builtin.h
-
Property cvs2svn:cvs-rev
changed from
1.11
to1.12
r2047 r2048 148 148 } 149 149 150 151 150 /** 152 151 * Atomically increments a 32-bit unsigned value. … … 164 163 * Atomically increments a 32-bit unsigned value. 165 164 * 165 * @returns The new value. 166 166 * @param pu32 Pointer to the value to increment. 167 167 */ 168 static __inline__ void __atomic_increment_u32(uint32_t __volatile__ *pu32) 169 { 170 __asm__ __volatile__("lock; incl %0" 171 : "=m" (*pu32) 172 : "m" (*pu32)); 168 static __inline__ uint32_t __atomic_increment_u32(uint32_t __volatile__ *pu32) 169 { 170 uint32_t u32; 171 __asm__ __volatile__("lock; xadd %0, %1\n\t" 172 "incl %0\n\t" 173 : "=r" (u32), 174 "=m" (*pu32) 175 : "0" (1) 176 : "memory"); 177 return u32; 178 } 179 180 /** 181 * Atomically increments a 32-bit signed value. 182 * 183 * @returns The new value. 184 * @param pi32 Pointer to the value to increment. 185 */ 186 static __inline__ uint32_t __atomic_increment_s32(int32_t __volatile__ *pi32) 187 { 188 int32_t i32; 189 __asm__ __volatile__("lock; xadd %0, %1\n\t" 190 "incl %0\n\t" 191 : "=r" (i32), 192 "=m" (*pi32) 193 : "0" (1) 194 : "memory"); 195 return i32; 173 196 } 174 197 … … 200 223 * Atomically decrements a 32-bit unsigned value. 201 224 * 202 * @param pu Pointer to the value to decrement. 203 */ 204 static __inline__ void __atomic_decrement_u32(__volatile__ uint32_t *pu32) 205 { 206 __asm__ __volatile__("lock; decl %0" 207 : "=m" (*pu32) 208 : "m" (*pu32)); 225 * @returns The new value. 226 * @param pu32 Pointer to the value to decrement. 227 */ 228 static __inline__ uint32_t __atomic_decrement_u32(__volatile__ uint32_t *pu32) 229 { 230 uint32_t u32; 231 __asm__ __volatile__("lock; xadd %0, %1\n\t" 232 "decl %0\n\t" 233 : "=r" (u32), 234 "=m" (*pu32) 235 : "0" (-1) 236 : "memory"); 237 return u32; 238 } 239 240 /** 241 * Atomically decrements a 32-bit signed value. 242 * 243 * @returns The new value. 244 * @param pi32 Pointer to the value to decrement. 245 */ 246 static __inline__ uint32_t __atomic_decrement_s32(__volatile__ int32_t *pi32) 247 { 248 int32_t i32; 249 __asm__ __volatile__("lock; xadd %0, %1\n\t" 250 "decl %0\n\t" 251 : "=r" (i32), 252 "=m" (*pi32) 253 : "0" (-1) 254 : "memory"); 255 return i32; 209 256 } 210 257 … … 212 259 * Atomically decrements a 16-bit unsigned value. 213 260 * 261 * @returns The new value. 214 262 * @param pu16 Pointer to the value to decrement. 215 263 */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/sharedpm.h
-
Property cvs2svn:cvs-rev
changed from
1.23
to1.24
r2047 r2048 163 163 #define __LIBC_SPM_INH_FHB_TYPE_END (0) 164 164 /** Standard bundle. */ 165 #define __LIBC_SPM_INH_FHB_TYPE_STANDARD (0x10 | sizeof(unsigned)) 165 #define __LIBC_SPM_INH_FHB_TYPE_STANDARD (0x10 | (sizeof(unsigned) + sizeof(ino_t) + sizeof(dev_t))) 166 /** The old standard bundle. */ 167 #define __LIBC_SPM_INH_FHB_TYPE_STANDARD_OLD (0x10 | sizeof(unsigned)) 166 168 /** Socket bundle, using the BSD 4.4 backend. */ 167 169 #define __LIBC_SPM_INH_FHB_TYPE_SOCKET_44 (0x20 | (sizeof(unsigned) + sizeof(unsigned short))) … … 199 201 /** The common bundle header. */ 200 202 __LIBC_SPMINHFHBHDR Hdr; 201 /** Array of flags of Hdr.cHandles entries. */ 202 unsigned afFlags[1]; 203 /** Array Hdr.cHandles entries. */ 204 struct 205 { 206 /** The flags */ 207 unsigned fFlags; 208 /** The inode number. */ 209 ino_t Inode; 210 /** The device number. */ 211 dev_t Dev; 212 } aHandles[1]; 203 213 } __LIBC_SPMINHFHBSTD; 204 214 #pragma pack() 205 215 /** Pointer to SPM standard filehandle inherit bundle. */ 206 216 typedef __LIBC_SPMINHFHBSTD *__LIBC_PSPMINHFHBSTD; 217 218 /** 219 * SPM standard filehandle inherit bundle 220 * This is used for OS/2 filehandles which only needs flags 221 * transfered. 222 */ 223 #pragma pack(1) 224 typedef struct __libc_SPMInhFHOld 225 { 226 /** The common bundle header. */ 227 __LIBC_SPMINHFHBHDR Hdr; 228 /** Array of flags of Hdr.cHandles entries. */ 229 unsigned afFlags[1]; 230 } __LIBC_SPMINHFHBSTDOLD; 231 #pragma pack() 232 /** Pointer to SPM standard filehandle inherit bundle. */ 233 typedef __LIBC_SPMINHFHBSTDOLD *__LIBC_PSPMINHFHBSTDOLD; 207 234 208 235 /** -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/io.h
-
Property cvs2svn:cvs-rev
changed from
1.14
to1.15
r2047 r2048 225 225 226 226 /** 227 * Information struct about a mounted file system. 228 * 229 * Used to track down the filesystem of an open file handle and 230 * so we can optimize certain operations like expanding a file. 231 */ 232 typedef struct __libc_FileSystemInfo 233 { 234 /** Number of references to this file system info object. 235 * The structure can be shared by many handles. */ 236 volatile int32_t cRefs; 237 /** Does the file system automatically zero the new space when a file is extended? */ 238 unsigned fZeroNewBytes : 1; 239 /** Device number of the device the filesystem resides on. 240 * On OS/2 the device number is derived from the driveletter. */ 241 dev_t Dev; 242 /** The filesystem driver name. */ 243 char szName[16]; 244 /** The mount point - may extend beyond the 4 bytes on some OSes. */ 245 char szMountpoint[4]; 246 } __LIBC_FSINFO; 247 /** Pointer to information about an open filesystem. */ 248 typedef __LIBC_FSINFO *__LIBC_PFSINFO; 249 250 251 /** 227 252 * Filehandle type. 228 253 */ … … 381 406 * determin this at handle creation time. */ 382 407 ino_t Inode; 408 /** Pointer to the filesystem information object for the filesystem which 409 * this file resides on. This might be NULL... */ 410 __LIBC_PFSINFO pFsInfo; 383 411 } __LIBC_FH; 384 412 /** Pointer to filehandle. */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.