-
Notifications
You must be signed in to change notification settings - Fork 22
GcLock: write lock #28
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
rcu_dereference_sym basically calls CMM_ACCESS_ONCE which essentially is the same macro as the ACCESS_ONCE kernel one. This macro ensures that the compiler won't make any optimization and won't load the given value twice. std::atomic should do the trick here.
…uarantee that once it's done, the Gc is unlocked.
Conflicts: gc/gc_lock.cc gc/gc_lock.h
…s. This allows us to block writes when needed
gc/gc_lock.h
Outdated
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.
I would recommend calling jml's do_abort() before the throw statement. This give us a chance to easily trap the error in gdb if it shows up in DasDB.
I came up with the exact same conclusion. That's why I was throwing an exception. After that, I discovered that the assertion would fail and I decided to get rid of it.
Take a look at gc_test, I have tests for that. |
…is useful if we can't use catch throw in gdb
This patch introduces a new type of lock in GcLock: writelock.
With that comes a new interface :