Changes in kernel/generic/src/ipc/ipcrsc.c [fc0de8c:455241b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipcrsc.c
rfc0de8c r455241b 44 44 #include <stdlib.h> 45 45 46 static void phone_destroy( void*arg)46 static void phone_destroy(kobject_t *arg) 47 47 { 48 phone_t *phone = (phone_t *) arg;48 phone_t *phone = phone_from_kobject(arg); 49 49 if (phone->hangup_call) 50 kobject_put( phone->hangup_call->kobject);50 kobject_put(&phone->hangup_call->kobject); 51 51 slab_free(phone_cache, phone); 52 52 } … … 76 76 return ENOMEM; 77 77 } 78 kobject_t *kobj = kobject_alloc(FRAME_ATOMIC); 79 if (!kobj) { 80 cap_free(TASK, handle); 81 slab_free(phone_cache, phone); 82 return ENOMEM; 83 } 78 84 79 call_t *hcall = ipc_call_alloc(); 85 80 if (!hcall) { 86 81 cap_free(TASK, handle); 87 82 slab_free(phone_cache, phone); 88 free(kobj);89 83 return ENOMEM; 90 84 } … … 94 88 phone->hangup_call = hcall; 95 89 96 kobject_initialize(kobj, KOBJECT_TYPE_PHONE, phone);97 phone->kobject = kobj;98 99 90 if (publish) 100 cap_publish(task, handle, kobj);91 cap_publish(task, handle, &phone->kobject); 101 92 102 93 *phandle = handle; 103 94 if (kobject) 104 *kobject = kobj;95 *kobject = &phone->kobject; 105 96 } 106 97 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.