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

Comparing BasiliskII/src/uae_cpu/spcflags.h (file contents):
Revision 1.1 by gbeauche, 2002-09-01T15:17:13Z vs.
Revision 1.4 by gbeauche, 2005-06-06T18:49:51Z

# Line 18 | Line 18 | enum {
18          SPCFLAG_TRACE                           = 0x08,
19          SPCFLAG_DOTRACE                         = 0x10,
20          SPCFLAG_DOINT                           = 0x20,
21 + #if USE_JIT
22 +        SPCFLAG_JIT_END_COMPILE         = 0x40,
23 +        SPCFLAG_JIT_EXEC_RETURN         = 0x80,
24 + #else
25          SPCFLAG_JIT_END_COMPILE         = 0,
26          SPCFLAG_JIT_EXEC_RETURN         = 0,
27 + #endif
28 +        
29          SPCFLAG_ALL                                     = SPCFLAG_STOP
30                                                                  | SPCFLAG_INT
31                                                                  | SPCFLAG_BRK
# Line 27 | Line 33 | enum {
33                                                                  | SPCFLAG_DOTRACE
34                                                                  | SPCFLAG_DOINT
35                                                                  | SPCFLAG_JIT_END_COMPILE
36 <                                                                | SPCFLAG_JIT_EXEC_RETURN,
36 >                                                                | SPCFLAG_JIT_EXEC_RETURN
37 >                                                                ,
38 >        
39          SPCFLAG_ALL_BUT_EXEC_RETURN     = SPCFLAG_ALL & ~SPCFLAG_JIT_EXEC_RETURN
40   };
41  
# Line 49 | Line 57 | enum {
57          regs.spcflags &= ~(m); \
58   } while (0)
59  
60 < #elif defined(__i386__) && defined(X86_ASSEMBLY)
60 > #elif (defined(__i386__) || defined(__x86_64__)) && defined(X86_ASSEMBLY)
61  
62   #define HAVE_HARDWARE_LOCKS
63  
# Line 61 | Line 69 | enum {
69          __asm__ __volatile__("lock\n\tandl %1,%0" : "=m" (regs.spcflags) : "i" (~(m))); \
70   } while (0)
71  
72 < #elif defined(HAVE_PTHREADS)
72 > #else
73  
74   #undef HAVE_HARDWARE_LOCKS
75  
76 < #include <pthread.h>
77 < extern pthread_mutex_t spcflags_lock;
76 > #include "main.h"
77 > extern B2_mutex *spcflags_lock;
78  
79   #define SPCFLAGS_SET(m) do {                            \
80 <        pthread_mutex_lock(&spcflags_lock);             \
80 >        B2_lock_mutex(spcflags_lock);                   \
81          regs.spcflags |= (m);                                   \
82 <        pthread_mutex_unlock(&spcflags_lock);   \
82 >        B2_unlock_mutex(spcflags_lock);         \
83   } while (0)
84  
85   #define SPCFLAGS_CLEAR(m) do {                          \
86 <        pthread_mutex_lock(&spcflags_lock);             \
86 >        B2_lock_mutex(spcflags_lock);                   \
87          regs.spcflags &= ~(m);                                  \
88 <        pthread_mutex_unlock(&spcflags_lock);   \
88 >        B2_unlock_mutex(spcflags_lock);         \
89   } while (0)
90  
83 #else
84
85 #error "Can't handle spcflags atomically!"
86
91   #endif
92  
93   #endif /* SPCFLAGS_H */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines