23 |
|
#include "readcpu.h" |
24 |
|
#include "newcpu.h" |
25 |
|
|
26 |
< |
#if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS) && defined(HAVE_PTHREADS) |
27 |
< |
#include <pthread.h> |
28 |
< |
pthread_mutex_t spcflags_lock = PTHREAD_MUTEX_INITIALIZER; |
26 |
> |
#if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS) |
27 |
> |
B2_mutex *spcflags_lock = NULL; |
28 |
|
#endif |
29 |
|
|
30 |
|
#if ENABLE_MON |
264 |
|
do_merges (); |
265 |
|
|
266 |
|
build_cpufunctbl (); |
267 |
+ |
|
268 |
+ |
#if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS) |
269 |
+ |
spcflags_lock = B2_create_mutex(); |
270 |
+ |
#endif |
271 |
|
|
272 |
|
fpu_init (); |
273 |
|
fpu_set_integral_fpu (CPUType == 4); |
276 |
|
void exit_m68k (void) |
277 |
|
{ |
278 |
|
fpu_exit (); |
279 |
+ |
#if defined(ENABLE_EXCLUSIVE_SPCFLAGS) && !defined(HAVE_HARDWARE_LOCKS) |
280 |
+ |
B2_delete_mutex(spcflags_lock); |
281 |
+ |
#endif |
282 |
|
} |
283 |
|
|
284 |
|
struct regstruct regs, lastint_regs; |