- Timestamp:
- 10/05/08 00:00:39 (2 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/keobject/lib/keobject.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/keobject/lib/keobject.c
r1068 r1090 35 35 SYMBOL_EXPORT(KeObjectInit); 36 36 37 void KeObjectDetach(struct KeObject* object) 38 { 39 if (object->dir) 40 IcFsRemoveDir(object->dir); 41 42 if (object->parent) 43 ListRemove(&object->next); 44 45 MemFree(object->name); 46 } 47 48 SYMBOL_EXPORT(KeObjectDetach); 49 37 50 void KeObjectFree(struct KeObject* object) 38 51 { 39 KePrint("KeObjFree\n"); 52 if (object->refs < 0) 53 { 54 ThrArchPrintCurrStack(); 55 cli(); hlt(); 56 } 57 58 KeObjectDetach(object); 40 59 } 41 60 … … 104 123 /* Create a directory in IcFs, using the object's parent directory as the 105 124 * parent directory. 106 */ 125 */ 126 107 127 object->dir=IcFsCreateDir(KeObjGetParentDir(object), object->name); 108 128 … … 112 132 /* Populate the configuration directory. */ 113 133 KeObjectPopulate(object); 114 134 135 /* FIXME: Move! */ 115 136 /* Add the new object to the parent's list of KeObjects. */ 116 137 KeSetAdd(object->parent, object); … … 144 165 curr = NULL; 145 166 146 out: 167 out: 147 168 SpinUnlock(&set->lock); 148 169 return curr;
