move memory card mounting and unmounting into a separate thread

This commit is contained in:
Chris Danford
2004-03-21 22:32:16 +00:00
parent 0e75311fd0
commit 7b78dbcf1c
3 changed files with 148 additions and 50 deletions
@@ -2,6 +2,7 @@
#define MEMORY_CARD_DRIVER_LINUX_H 1
#include "MemoryCardDriver.h"
#include "RageThreads.h"
class MemoryCardDriver_Linux : public MemoryCardDriver
{
@@ -14,9 +15,14 @@ public:
virtual void Unmount( UsbStorageDevice* pDevice, CString sMountPoint );
virtual void Flush( UsbStorageDevice* pDevice );
virtual void ResetUsbStorage();
static int MountThread_Start( void *p );
void MountThreadMain();
protected:
int m_fds;
time_t m_lastModTime;
RageThread MountThread;
bool shutdown;
RageMutex m_StorageDevicesChangedMutex;
bool m_bStorageDevicesChanged;
};
#endif