Lines Matching defs:OSMetaClass
28 /* OSMetaClass.cpp created by gvdl on Fri 1998-11-17 */
34 #include <libkern/c++/OSMetaClass.h>
88 OSMetaClass **classes;
124 safeMetaCast(const OSMetaClassBase *me, const OSMetaClass *toType)
130 const OSMetaClass *toType = OSTypeIDInst(typeinst);
158 OSMetaClassBase *OSMetaClassBase::metaCast(const OSMetaClass *toMeta) const
165 return OSMetaClass::checkMetaCastWithName(toMetaSymb, this);
190 class OSMetaClassMeta : public OSMetaClass
197 : OSMetaClass("OSMetaClass", 0, sizeof(OSMetaClass))
203 const OSMetaClass * const OSMetaClass::metaClass = &sOSMetaClassMeta;
204 const OSMetaClass * OSMetaClass::getMetaClass() const
208 "OSMetaClass::_RESERVEDOSMetaClass%d called\n";
210 void OSMetaClass::_RESERVEDOSMetaClass0()
212 void OSMetaClass::_RESERVEDOSMetaClass1()
214 void OSMetaClass::_RESERVEDOSMetaClass2()
216 void OSMetaClass::_RESERVEDOSMetaClass3()
218 void OSMetaClass::_RESERVEDOSMetaClass4()
220 void OSMetaClass::_RESERVEDOSMetaClass5()
222 void OSMetaClass::_RESERVEDOSMetaClass6()
224 void OSMetaClass::_RESERVEDOSMetaClass7()
227 void OSMetaClass::logError(OSReturn result)
233 msg="OSMetaClass::preModLoad wasn't called, runtime internal error";
256 OSMetaClass::OSMetaClass(const char *inClassName,
257 const OSMetaClass *inSuperClass,
267 printf("OSMetaClass::preModLoad wasn't called for %s, "
272 OSMetaClass **oldStalled = sStalled->classes;
273 int oldSize = sStalled->capacity * sizeof(OSMetaClass *);
275 + kKModCapacityIncrement * sizeof(OSMetaClass *);
277 sStalled->classes = (OSMetaClass **) kalloc(newSize);
294 OSMetaClass::~OSMetaClass()
332 (sStalled->count - i) * sizeof(OSMetaClass *));
337 void *OSMetaClass::operator new(__unused size_t size) { return 0; }
338 void OSMetaClass::retain() const { }
339 void OSMetaClass::release() const { }
340 void OSMetaClass::release(__unused int when) const { }
341 void OSMetaClass::taggedRetain(__unused const void *tag) const { }
342 void OSMetaClass::taggedRelease(__unused const void *tag) const { }
343 void OSMetaClass::taggedRelease(__unused const void *tag, __unused const int when) const { }
344 int OSMetaClass::getRetainCount() const { return 0; }
346 const char *OSMetaClass::getClassName() const
351 unsigned int OSMetaClass::getClassSize() const
356 void *OSMetaClass::preModLoad(const char *kmodName)
367 sStalled->classes = (OSMetaClass **)
368 kalloc(kKModCapacityIncrement * sizeof(OSMetaClass *));
373 ACCUMSIZE((kKModCapacityIncrement * sizeof(OSMetaClass *)) + sizeof(*sStalled));
379 bzero(sStalled->classes, kKModCapacityIncrement * sizeof(OSMetaClass *));
385 bool OSMetaClass::checkModLoad(void *loadHandle)
391 OSReturn OSMetaClass::postModLoad(void *loadHandle)
429 OSMetaClass *me = sStalled->classes[i];
453 OSMetaClass *me = sStalled->classes[i];
477 ACCUMSIZE(-(sStalled->capacity * sizeof(OSMetaClass *)
480 sStalled->capacity * sizeof(OSMetaClass *));
491 void OSMetaClass::instanceConstructed() const
493 // if ((0 == OSIncrementAtomic((SInt32 *)&(((OSMetaClass *) this)->instanceCount))) && superClassLink)
498 void OSMetaClass::instanceDestructed() const
507 bool OSMetaClass::modHasInstance(const char *kmodName)
521 OSMetaClass *checkClass;
532 while ( (checkClass = (OSMetaClass *) iter->getNextObject()) )
546 void OSMetaClass::reportModInstances(const char *kmodName)
550 OSMetaClass *checkClass;
561 while ( (checkClass = (OSMetaClass *) iter->getNextObject()) )
609 OSMetaClass *checkClass;
649 while ((checkClass = (OSMetaClass *) classes->getNextObject())
672 void OSMetaClass::considerUnloads()
688 const OSMetaClass *OSMetaClass::getMetaClassWithName(const OSSymbol *name)
690 OSMetaClass *retMeta = 0;
696 retMeta = (OSMetaClass *) sAllClassesDict->getObject(name);
719 OSObject *OSMetaClass::allocClassWithName(const OSSymbol *name)
724 const OSMetaClass * const meta = getMetaClassWithName(name);
736 OSObject *OSMetaClass::allocClassWithName(const OSString *name)
744 OSObject *OSMetaClass::allocClassWithName(const char *name)
753 OSMetaClassBase *OSMetaClass::
758 const OSMetaClass * const meta = getMetaClassWithName(name);
769 OSMetaClassBase *OSMetaClass::
778 OSMetaClassBase *OSMetaClass::
788 OSMetaClass::checkMetaCast
798 OSMetaClassBase *OSMetaClass::checkMetaCast(const OSMetaClassBase *check) const
800 const OSMetaClass * const toMeta = this;
801 const OSMetaClass *fromMeta;
814 void OSMetaClass::reservedCalled(int ind) const
820 const OSMetaClass *OSMetaClass::getSuperClass() const
825 const OSSymbol *OSMetaClass::getKmodName() const
830 unsigned int OSMetaClass::getInstanceCount() const
835 void OSMetaClass::printInstanceCounts()
839 OSMetaClass *meta;
846 meta = (OSMetaClass *) sAllClassesDict->getObject(className);
859 OSDictionary * OSMetaClass::getClassDictionary()
861 panic("OSMetaClass::getClassDictionary(): Obsoleted\n");
865 bool OSMetaClass::serialize(__unused OSSerialize *s) const
867 panic("OSMetaClass::serialize(): Obsoleted\n");
871 void OSMetaClass::serializeClassDictionary(OSDictionary *serializeDictionary)
889 const OSMetaClass *meta;
892 meta = (OSMetaClass *) sAllClassesDict->getObject(className);