Changeset 82d515e9 in mainline for kernel/generic/src/ipc/ipc.c
- Timestamp:
- 2017-12-05T11:30:02Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9af1c61
- Parents:
- 9a09212
- git-author:
- Jakub Jermar <jakub@…> (2017-12-05 11:25:41)
- git-committer:
- Jakub Jermar <jakub@…> (2017-12-05 11:30:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
r9a09212 r82d515e9 66 66 answerbox_t *ipc_phone_0 = NULL; 67 67 68 static slab_cache_t *call_ slab;69 static slab_cache_t *answerbox_ slab;70 71 slab_cache_t *phone_ slab= NULL;68 static slab_cache_t *call_cache; 69 static slab_cache_t *answerbox_cache; 70 71 slab_cache_t *phone_cache = NULL; 72 72 73 73 /** Initialize a call structure. … … 95 95 if (call->caller_phone) 96 96 kobject_put(call->caller_phone->kobject); 97 slab_free(call_ slab, call);97 slab_free(call_cache, call); 98 98 } 99 99 … … 115 115 call_t *ipc_call_alloc(unsigned int flags) 116 116 { 117 call_t *call = slab_alloc(call_ slab, flags);117 call_t *call = slab_alloc(call_cache, flags); 118 118 if (!call) 119 119 return NULL; 120 120 kobject_t *kobj = (kobject_t *) malloc(sizeof(kobject_t), flags); 121 121 if (!kobj) { 122 slab_free(call_ slab, call);122 slab_free(call_cache, call); 123 123 return NULL; 124 124 } … … 210 210 int ipc_call_sync(phone_t *phone, call_t *request) 211 211 { 212 answerbox_t *mybox = slab_alloc(answerbox_ slab, 0);212 answerbox_t *mybox = slab_alloc(answerbox_cache, 0); 213 213 ipc_answerbox_init(mybox, TASK); 214 214 … … 218 218 int rc = ipc_call(phone, request); 219 219 if (rc != EOK) { 220 slab_free(answerbox_ slab, mybox);220 slab_free(answerbox_cache, mybox); 221 221 return rc; 222 222 } … … 265 265 assert(!answer || request == answer); 266 266 267 slab_free(answerbox_ slab, mybox);267 slab_free(answerbox_cache, mybox); 268 268 return rc; 269 269 } … … 906 906 void ipc_init(void) 907 907 { 908 call_ slab= slab_cache_create("call_t", sizeof(call_t), 0, NULL,908 call_cache = slab_cache_create("call_t", sizeof(call_t), 0, NULL, 909 909 NULL, 0); 910 phone_ slab= slab_cache_create("phone_t", sizeof(phone_t), 0, NULL,910 phone_cache = slab_cache_create("phone_t", sizeof(phone_t), 0, NULL, 911 911 NULL, 0); 912 answerbox_ slab= slab_cache_create("answerbox_t", sizeof(answerbox_t),912 answerbox_cache = slab_cache_create("answerbox_t", sizeof(answerbox_t), 913 913 0, NULL, NULL, 0); 914 914 }
Note:
See TracChangeset
for help on using the changeset viewer.