HomeFreeBSD

* Add multiple inheritance to kobj. Each class can have zero or more base

Description

  • Add multiple inheritance to kobj. Each class can have zero or more base classes and if a method is not found in a given class, its base classes are searched (in the order they were declared). This search is recursive, i.e. a method may be define in a base class of a base class.
  • Change the kobj method lookup algorithm to one which is SMP-safe. This relies only on the constraint that an observer of a sequence of writes of pointer-sized values will see exactly one of those values, not a mixture of two or more values. This assumption holds for all processors which FreeBSD supports.
  • Add locking to kobj class initialisation.
  • Add a simpler form of 'inheritance' for devclasses. Each devclass can have a parent devclass. Searches for drivers continue up the chain of devclasses until either a matching driver is found or a devclass is reached which has no parent. This can allow, for instance, pci drivers to match cardbus devices (assuming that cardbus declares pci as its parent devclass).
  • Increment __FreeBSD_version.

This preserves the driver API entirely except for one minor feature used
by the ISA compatibility shims. A workaround for ISA compatibility will
be committed separately. The kobj and newbus ABI has changed - all modules
must be recompiled.

Details

Provenance
dfrAuthored on Oct 16 2003, 9:16 AM
Parents
rGae53b483cc2a: - Collapse sched_switchin() and sched_switchout() into sched_switch(). Now
Branches
Unknown
Tags
Unknown