-
Notifications
You must be signed in to change notification settings - Fork 555
Using C++11 threads instead of pthread #1212
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks!
I would need to check, but I think the files we take directly from GTKWave (specifically fstapi.c) currently use pthreads so to get this completely clean we would have to get Tony to change this to C++ on his end as well. If we provide a patch that may be enough. I'm not against using C++ threads for the C++ code, but we need to remember there is also C code that can only use pthreads so do we really save anything by switching the C++ code? |
…ble predicate. Co-authored-by: Lars-Peter Clausen <[email protected]>
Here the point is to have a working version of vvp that I can compile using MSVC, rather than removing the dependency per se. That works perfectly without enabling the parallel writer. I have now also fixed the bug related to the LXT2 writer: the LXT2 writer invoked |
Do you know if the performance is similar? Either anecdotal reports or (preferred) actual test results. Also is the finish_cb() always called so we know vcd_work_terminate() never needs to be called from close_dumpfile()? |
As far as I know, POSIX threads are used for the actual implementation of std::thread, when available. At least, that's what libstdc++ does.
Both |
I have ported vvp (and related shared libraries) to MSVC. To do that, I decided to remove the dependency from pthread and use the threading support offered by C++11.
I think it makes sense to have this also in the main repository.