search for: remove_callback

Displaying 3 results from an estimated 3 matches for "remove_callback".

2006 Jan 13
1
association callbacks
...if association.macro == :has_and_belongs_to_many #add_callback add_callback = "before_add_for_#{association.name}" class_inheritable_reader(add_callback.to_sym) write_inheritable_array(add_callback.to_sym, [:log_add]) #remove_callback remove_callback = "before_remove_for_#{association.name}" class_inheritable_reader(remove_callback.to_sym) write_inheritable_array(remove_callback.to_sym, [:log_remove]) end } end end#end ClassMethods This works well and the...
2023 Apr 07
0
[PATCH v2 2/2] rust: virtio: add virtio support
...nto_foreign()` as called in `add_sgs()`. > + <T::PrivateData as ForeignOwnable>::from_foreign(buf) To be honest, I tried coming up with something clever to solve this, but couldn't. Ideally this should happen when this function is called: > + extern "C" fn remove_callback(virtio_device: *mut bindings::virtio_device) { But I did not find a way to iterate over the the `vqs` member from the Rust side, i.e.: ``` struct virtio_device { int index; bool failed; bool config_enabled; bool config_change_pending; spinlock_t config_lock; spinlock_t vqs_list_lock; /* P...
2023 Apr 05
3
[PATCH v2 0/2] rust: virtio: add virtio support
This used to be a single patch, but I split it into two with the addition of struct Scatterlist. Again a bit new with Rust submissions. I was told by Gary Guo to rebase on top of rust-next, but it seems *very* behind? The first patch does not build on its own due to a dead_code warning. It is hard to not have dead code when one is adding infrastructure to be used by others at a later