Commit fe68b750 authored by Josh Kunz's avatar Josh Kunz

Re-work the old ops to use the new CDT interface

This commit does three main things:
  1. Full CDT reference counting. When CDT locks are acquired, all
     intermediate root's reference counts are update safely.
  2. Re-factor's the operations to use two generic locking routines with
     special handlers (binop, and unop). This removes a lot of code duplication
     which made adding the locking code much easier, and should help
     prevent bugs.
  3. Removes the `delete` callback, now `delete` will be called whenever
     a cnode is created. It's the object's decision if this requires a
     memory free or not. Also adds three new callbacks:
       * `grant(src, dst)`: called when a grant from src -> dst happens.
          Only the handler for `src` is called.
       * `derive_src(src, dst)`: called on `src` when dst is derived from src.
       * `derive_dst(src, dst)`: called on `dst` when dst is derived from src.
    Objects are now responsible for doing some sort of reference
    counting in the grant and delete callbacks to prevent leaks. The
    grant and derive callbacks will also be the main hooks for capnet.
parent cde57a05
Pipeline #441 failed with stage