Cleaned up the network and SCSI thread stuff.
This commit is contained in:
@@ -49,6 +49,7 @@ int scsi_card_current = 0;
|
||||
int scsi_card_last = 0;
|
||||
|
||||
uint32_t SCSI_BufferLength;
|
||||
static volatile
|
||||
mutex_t *scsiMutex;
|
||||
|
||||
|
||||
@@ -127,15 +128,12 @@ int scsi_card_get_from_internal_name(char *s)
|
||||
}
|
||||
|
||||
|
||||
void scsi_mutex_init(void)
|
||||
void scsi_mutex(uint8_t start)
|
||||
{
|
||||
scsiMutex = thread_create_mutex(L"86Box.SCSIMutex");
|
||||
}
|
||||
|
||||
|
||||
void scsi_mutex_close(void)
|
||||
{
|
||||
thread_close_mutex(scsiMutex);
|
||||
if (start)
|
||||
scsiMutex = thread_create_mutex(L"86Box.SCSIMutex");
|
||||
else
|
||||
thread_close_mutex((mutex_t *) scsiMutex);
|
||||
}
|
||||
|
||||
|
||||
@@ -209,14 +207,10 @@ void SCSIReset(uint8_t id, uint8_t lun)
|
||||
|
||||
|
||||
void
|
||||
startscsi(void)
|
||||
scsi_mutex_wait(uint8_t wait)
|
||||
{
|
||||
thread_wait_mutex(scsiMutex);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
endscsi(void)
|
||||
{
|
||||
thread_release_mutex(scsiMutex);
|
||||
if (wait)
|
||||
thread_wait_mutex((mutex_t *) scsiMutex);
|
||||
else
|
||||
thread_release_mutex((mutex_t *) scsiMutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user