Revision a7a7372a nest/locks.c

View differences:

nest/locks.c
22 22
 * or some other non-shareable resource, it asks the core to lock it and it doesn't
23 23
 * use the resource until it's notified that it has acquired the lock.
24 24
 *
25
 * Object locks are represented by &object_lock structures which are in turn a kind of
26
 * resource. Lockable resources are uniquely determined by resource type
25
 * Object locks are represented by &object_lock structures which are in turn a
26
 * kind of resource. Lockable resources are uniquely determined by resource type
27 27
 * (%OBJLOCK_UDP for a UDP port etc.), IP address (usually a broadcast or
28
 * multicast address the port is bound to), port number and interface.
28
 * multicast address the port is bound to), port number, interface and optional
29
 * instance ID.
29 30
 */
30 31

  
31 32
#undef LOCAL_DEBUG
......
45 46
    x->type == y->type &&
46 47
    x->iface == y->iface &&
47 48
    x->port == y->port &&
49
    x->inst == y->inst &&
48 50
    ipa_equal(x->addr, y->addr);
49 51
}
50 52

  
......
88 90
  struct object_lock *l = (struct object_lock *) r;
89 91
  static char *olock_states[] = { "free", "locked", "waiting", "event" };
90 92

  
91
  debug("(%d:%s:%I:%d) [%s]\n", l->type, (l->iface ? l->iface->name : "?"), l->addr, l->port, olock_states[l->state]);
93
  debug("(%d:%s:%I:%d:%d) [%s]\n", l->type, (l->iface ? l->iface->name : "?"), l->addr, l->port, l->inst, olock_states[l->state]);
92 94
  if (!EMPTY_LIST(l->waiters))
93 95
    debug(" [wanted]\n");
94 96
}

Also available in: Unified diff