Merge branch 'master' of https://github.com/86Box/86Box.git into EngiNerd
This commit is contained in:
@@ -81,6 +81,9 @@ ifeq ($(DEV_BUILD), y)
|
||||
ifndef M1489
|
||||
M1489 := y
|
||||
endif
|
||||
ifndef M154X
|
||||
M154X := y
|
||||
endif
|
||||
ifndef M6117
|
||||
M6117 := y
|
||||
endif
|
||||
@@ -154,6 +157,9 @@ else
|
||||
ifndef M1489
|
||||
M1489 := n
|
||||
endif
|
||||
ifndef M154X
|
||||
M154X := n
|
||||
endif
|
||||
ifndef M6117
|
||||
M6117 := n
|
||||
endif
|
||||
@@ -553,6 +559,11 @@ OPTS += -DUSE_M1489
|
||||
DEVBROBJ += ali1489.o
|
||||
endif
|
||||
|
||||
ifeq ($(M1489), y)
|
||||
OPTS += -DUSE_M154X
|
||||
DEVBROBJ += ali1531.o ali1543.o
|
||||
endif
|
||||
|
||||
ifeq ($(M6117), y)
|
||||
OPTS += -DUSE_M6117
|
||||
DEVBROBJ += ali6117.o
|
||||
@@ -604,10 +615,10 @@ CPUOBJ := cpu.o cpu_table.o \
|
||||
x86seg.o x87.o x87_timings.o \
|
||||
$(DYNARECOBJ)
|
||||
|
||||
CHIPSETOBJ := acc2168.o cs8230.o ali1429.o headland.o intel_82335.o cs4031.o \
|
||||
CHIPSETOBJ := acc2168.o cs8230.o ali1217.o ali1429.o headland.o intel_82335.o cs4031.o \
|
||||
intel_420ex.o intel_4x0.o intel_sio.o intel_piix.o ioapic.o \
|
||||
neat.o opti495.o opti895.o opti5x7.o scamp.o scat.o via_vt82c49x.o via_vt82c505.o \
|
||||
sis_85c310.o sis_85c4xx.o sis_85c496.o sis_85c50x.o opti283.o opti291.o umc491.o \
|
||||
sis_85c310.o sis_85c4xx.o sis_85c496.o sis_85c50x.o opti283.o opti291.o \
|
||||
via_apollo.o via_pipc.o wd76c10.o vl82c480.o
|
||||
|
||||
MCHOBJ := machine.o machine_table.o \
|
||||
@@ -641,7 +652,7 @@ SIOOBJ := sio_acc3221.o \
|
||||
sio_f82c710.o sio_82091aa.o \
|
||||
sio_fdc37c661.o sio_fdc37c66x.o sio_fdc37c669.o sio_fdc37c93x.o sio_fdc37m60x.o \
|
||||
sio_pc87306.o sio_pc87307.o sio_pc87309.o sio_pc87310.o sio_pc87311.o sio_pc87332.o \
|
||||
sio_prime3c.o \
|
||||
sio_prime3b.o sio_prime3c.o \
|
||||
sio_w83787f.o \
|
||||
sio_w83877f.o sio_w83977f.o \
|
||||
sio_um8669f.o \
|
||||
|
||||
@@ -133,17 +133,23 @@ thread_destroy_event(event_t *arg)
|
||||
|
||||
mutex_t *
|
||||
thread_create_mutex(void)
|
||||
{
|
||||
return((mutex_t*)CreateMutex(NULL, FALSE, NULL));
|
||||
{
|
||||
mutex_t *mutex = malloc(sizeof(CRITICAL_SECTION));
|
||||
|
||||
InitializeCriticalSection(mutex);
|
||||
|
||||
return mutex;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
thread_close_mutex(mutex_t *mutex)
|
||||
mutex_t *
|
||||
thread_create_mutex_with_spin_count(unsigned int spin_count)
|
||||
{
|
||||
if (mutex == NULL) return;
|
||||
mutex_t *mutex = malloc(sizeof(CRITICAL_SECTION));
|
||||
|
||||
CloseHandle((HANDLE)mutex);
|
||||
InitializeCriticalSectionAndSpinCount(mutex, spin_count);
|
||||
|
||||
return mutex;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,11 +158,11 @@ thread_wait_mutex(mutex_t *mutex)
|
||||
{
|
||||
if (mutex == NULL) return(0);
|
||||
|
||||
DWORD dwres = WaitForSingleObject((HANDLE)mutex, INFINITE);
|
||||
LPCRITICAL_SECTION critsec = (LPCRITICAL_SECTION)mutex;
|
||||
|
||||
if (dwres == WAIT_OBJECT_0) return(1);
|
||||
EnterCriticalSection(critsec);
|
||||
|
||||
return(0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,5 +171,22 @@ thread_release_mutex(mutex_t *mutex)
|
||||
{
|
||||
if (mutex == NULL) return(0);
|
||||
|
||||
return(!!ReleaseMutex((HANDLE)mutex));
|
||||
LPCRITICAL_SECTION critsec = (LPCRITICAL_SECTION)mutex;
|
||||
|
||||
LeaveCriticalSection(critsec);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
thread_close_mutex(mutex_t *mutex)
|
||||
{
|
||||
if (mutex == NULL) return;
|
||||
|
||||
LPCRITICAL_SECTION critsec = (LPCRITICAL_SECTION)mutex;
|
||||
|
||||
DeleteCriticalSection(critsec);
|
||||
|
||||
free(critsec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user