Changeset 82d515e9 in mainline for kernel/generic/src/ipc/ipc.c


Ignore:
Timestamp:
2017-12-05T11:30:02Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
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)
Message:

Fix terminology

Objects of slab_cache_t type are caches, not slabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ipc.c

    r9a09212 r82d515e9  
    6666answerbox_t *ipc_phone_0 = NULL;
    6767
    68 static slab_cache_t *call_slab;
    69 static slab_cache_t *answerbox_slab;
    70 
    71 slab_cache_t *phone_slab = NULL;
     68static slab_cache_t *call_cache;
     69static slab_cache_t *answerbox_cache;
     70
     71slab_cache_t *phone_cache = NULL;
    7272
    7373/** Initialize a call structure.
     
    9595        if (call->caller_phone)
    9696                kobject_put(call->caller_phone->kobject);
    97         slab_free(call_slab, call);
     97        slab_free(call_cache, call);
    9898}
    9999
     
    115115call_t *ipc_call_alloc(unsigned int flags)
    116116{
    117         call_t *call = slab_alloc(call_slab, flags);
     117        call_t *call = slab_alloc(call_cache, flags);
    118118        if (!call)
    119119                return NULL;
    120120        kobject_t *kobj = (kobject_t *) malloc(sizeof(kobject_t), flags);
    121121        if (!kobj) {
    122                 slab_free(call_slab, call);
     122                slab_free(call_cache, call);
    123123                return NULL;
    124124        }
     
    210210int ipc_call_sync(phone_t *phone, call_t *request)
    211211{
    212         answerbox_t *mybox = slab_alloc(answerbox_slab, 0);
     212        answerbox_t *mybox = slab_alloc(answerbox_cache, 0);
    213213        ipc_answerbox_init(mybox, TASK);
    214214       
     
    218218        int rc = ipc_call(phone, request);
    219219        if (rc != EOK) {
    220                 slab_free(answerbox_slab, mybox);
     220                slab_free(answerbox_cache, mybox);
    221221                return rc;
    222222        }
     
    265265        assert(!answer || request == answer);
    266266       
    267         slab_free(answerbox_slab, mybox);
     267        slab_free(answerbox_cache, mybox);
    268268        return rc;
    269269}
     
    906906void ipc_init(void)
    907907{
    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,
    909909            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,
    911911            NULL, 0);
    912         answerbox_slab = slab_cache_create("answerbox_t", sizeof(answerbox_t),
     912        answerbox_cache = slab_cache_create("answerbox_t", sizeof(answerbox_t),
    913913            0, NULL, NULL, 0);
    914914}
Note: See TracChangeset for help on using the changeset viewer.