diff options
author | dfr <dfr@FreeBSD.org> | 2000-05-01 10:45:15 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-05-01 10:45:15 +0000 |
commit | 14185daa26ace1f11639608f6b655cf2c7cc4e27 (patch) | |
tree | a07a912eede7bd97ce3020b8d02e94959f5760fb /sys/kern/subr_kobj.c | |
parent | 4c69e0f4d7e4fad2294ba277c71c27ae4fb5534a (diff) | |
download | FreeBSD-src-14185daa26ace1f11639608f6b655cf2c7cc4e27.zip FreeBSD-src-14185daa26ace1f11639608f6b655cf2c7cc4e27.tar.gz |
* Move the driver_t::refs field to kobj_t to replace kobj_t::instances.
* Back out a couple of workarounds for the confusion between
kobj_t::instances and driver_t::refs.
Diffstat (limited to 'sys/kern/subr_kobj.c')
-rw-r--r-- | sys/kern/subr_kobj.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c index 9a2eafb..6b95eb9 100644 --- a/sys/kern/subr_kobj.c +++ b/sys/kern/subr_kobj.c @@ -174,7 +174,7 @@ kobj_init(kobj_t obj, kobj_class_t cls) kobj_class_compile(cls); obj->ops = cls->ops; - cls->instances++; + cls->refs++; } void @@ -187,8 +187,8 @@ kobj_delete(kobj_t obj, struct malloc_type *mtype) * after its last instance is deleted. As an optimisation, we * should defer this for a short while to avoid thrashing. */ - cls->instances--; - if (!cls->instances) + cls->refs--; + if (!cls->refs) kobj_class_free(cls); obj->ops = 0; |