New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite raw memcard threading code. Fixes issue 7484. #778
Conversation
This probably fixes other weird issues which weren't caught...it looks like when raw memcards were split from the exi device class, a lot of stuff was duplicated and not really integrated correctly (duplicated m_bDirty variables, etc). However, I would really like people to review the code around the sync primitives in |
{ | ||
return address <= (memory_card_size - 1); | ||
} | ||
virtual void MakeDirty() {}; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
I changed the flush strategy and changed the threading stuff up a bit...still not awesome but lmk. |
After I pushed, I realized a slightly better way (avoids situation where last changed buffer wouldn't be written to disk until closing the device): Instead of managing delay of calls from outside the FlushThread, just have FlushThread sleep itself, wake up (possibly on event), and decide for itself whether to flush or not. |
@@ -47,6 +48,20 @@ class Event final | |||
m_flag.Clear(); | |||
} | |||
|
|||
template<class Rep, class Period> |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
rebased and fixed a warning. |
@shuffle2: This comment grants you the permission to merge this pull request whenever you think it is ready. After addressing the remaining comments, click this link to merge. The code seems ok in terms of thread safety (though it confused me more than once, which is probably not a good thing, but making it better would require a large architectural change...). Please address that last comment above. @dolphin-emu-bot allowmerge |
…ndition_variable::wait_for() (with millisecond units).
EXI memcard code now doesn't know specifics of how data is flushed to whatever backing storage is used. GC raw memcard now flushes every 15 seconds if dirty, and on memcard destruction. GCI folder now flushes only on memcard destruction.
Rewrite raw memcard threading code. Fixes issue 7484.
This fixes crash issue but not perfect. |
Again, the lag is not my fault :/ On Tue, Aug 26, 2014 at 3:15 AM, iori3000 notifications@github.com wrote:
|
No description provided.