ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/sysdeps.h
(Generate patch)

Comparing BasiliskII/src/Unix/sysdeps.h (file contents):
Revision 1.14 by cebix, 2000-10-09T17:05:17Z vs.
Revision 1.23 by gbeauche, 2002-09-16T12:03:07Z

# Line 1 | Line 1
1   /*
2   *  sysdeps.h - System dependent definitions for Unix
3   *
4 < *  Basilisk II (C) 1997-2000 Christian Bauer
4 > *  Basilisk II (C) 1997-2002 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 103 | Line 103
103   /* ExtFS is supported */
104   #define SUPPORTS_EXTFS 1
105  
106 + /* BSD socket API supported */
107 + #define SUPPORTS_UDP_TUNNEL 1
108 +
109  
110   /* Data types */
111   typedef unsigned char uint8;
# Line 155 | Line 158 | typedef struct timespec tm_time_t;
158   typedef struct timeval tm_time_t;
159   #endif
160  
161 < /* Offset Mac->Unix time in seconds */
162 < #define TIME_OFFSET 0x7c25b080
161 > /* Define codes for all the float formats that we know of.
162 > * Though we only handle IEEE format.  */
163 > #define UNKNOWN_FLOAT_FORMAT 0
164 > #define IEEE_FLOAT_FORMAT 1
165 > #define VAX_FLOAT_FORMAT 2
166 > #define IBM_FLOAT_FORMAT 3
167 > #define C4X_FLOAT_FORMAT 4
168  
169   /* UAE CPU data types */
170   #define uae_s8 int8
# Line 178 | Line 186 | typedef uae_u32 uaecptr;
186   extern uint64 GetTicks_usec(void);
187   extern void Delay_usec(uint32 usec);
188  
189 + #ifdef HAVE_PTHREADS
190 + /* Centralized pthread attribute setup */
191 + void Set_pthread_attr(pthread_attr_t *attr, int priority);
192 + #endif
193 +
194   /* UAE CPU defines */
195   #ifdef WORDS_BIGENDIAN
196  
# Line 236 | Line 249 | static inline void do_put_mem_word(uae_u
249   #else
250   static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); *a = v;}
251   #endif
252 + #define HAVE_OPTIMIZED_BYTESWAP_32
253 + /* bswap doesn't affect condition codes */
254 + static inline uae_u32 do_byteswap_32(uae_u32 v) {__asm__ ("bswap %0" : "=r" (v) : "0" (v)); return v;}
255 + #define HAVE_OPTIMIZED_BYTESWAP_16
256 + #ifdef X86_PPRO_OPT
257 + static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ ("bswapl %0" : "=&r" (v) : "0" (v << 16) : "cc"); return v;}
258 + #else
259 + static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); return v;}
260 + #endif
261  
262   #elif defined(CPU_CAN_ACCESS_UNALIGNED)
263  
# Line 257 | Line 279 | static inline void do_put_mem_word(uae_u
279  
280   #endif /* WORDS_BIGENDIAN */
281  
282 + #ifndef HAVE_OPTIMIZED_BYTESWAP_32
283 + static inline uae_u32 do_byteswap_32(uae_u32 v)
284 +        { return (((v >> 24) & 0xff) | ((v >> 8) & 0xff00) | ((v & 0xff) << 24) | ((v & 0xff00) << 8)); }
285 + #endif
286 +
287 + #ifndef HAVE_OPTIMIZED_BYTESWAP_16
288 + static inline uae_u32 do_byteswap_16(uae_u32 v)
289 +        { return (((v >> 8) & 0xff) | ((v & 0xff) << 8)); }
290 + #endif
291 +
292   #define do_get_mem_byte(a) ((uae_u32)*((uae_u8 *)(a)))
293   #define do_put_mem_byte(a, v) (*(uae_u8 *)(a) = (v))
294  
# Line 270 | Line 302 | static inline void do_put_mem_word(uae_u
302   #define ENUMNAME(name) name
303   #define write_log printf
304  
273 #ifdef USE_COMPILER
274 #define USE_MAPPED_MEMORY
275 #define CAN_MAP_MEMORY
276 #define NO_EXCEPTION_3
277 #define NO_PREFETCH_BUFFER
278 #else
279 #undef USE_MAPPED_MEMORY
280 #undef CAN_MAP_MEMORY
281 #endif
282
305   #ifdef X86_ASSEMBLY
306   #define ASM_SYM_FOR_FUNC(a) __asm__(a)
307   #else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines