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


Ignore:
Timestamp:
2017-12-05T11:30:02Z (8 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.

Location:
kernel/generic/src/ipc
Files:
3 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}
  • kernel/generic/src/ipc/ipcrsc.c

    r9a09212 r82d515e9  
    153153{
    154154        phone_t *phone = (phone_t *) arg;
    155         slab_free(phone_slab, phone);
     155        slab_free(phone_cache, phone);
    156156}
    157157
     
    173173        cap_handle_t handle = cap_alloc(task);
    174174        if (handle >= 0) {
    175                 phone_t *phone = slab_alloc(phone_slab, FRAME_ATOMIC);
     175                phone_t *phone = slab_alloc(phone_cache, FRAME_ATOMIC);
    176176                if (!phone) {
    177177                        cap_free(TASK, handle);
     
    181181                if (!kobject) {
    182182                        cap_free(TASK, handle);
    183                         slab_free(phone_slab, phone);
     183                        slab_free(phone_cache, phone);
    184184                        return ENOMEM;
    185185                }
  • kernel/generic/src/ipc/irq.c

    r9a09212 r82d515e9  
    294294        /* Free up the IRQ code and associated structures. */
    295295        code_free(irq->notif_cfg.code);
    296         slab_free(irq_slab, irq);
     296        slab_free(irq_cache, irq);
    297297}
    298298
     
    333333                return handle;
    334334       
    335         irq_t *irq = (irq_t *) slab_alloc(irq_slab, FRAME_ATOMIC);
     335        irq_t *irq = (irq_t *) slab_alloc(irq_cache, FRAME_ATOMIC);
    336336        if (!irq) {
    337337                cap_free(TASK, handle);
     
    342342        if (!kobject) {
    343343                cap_free(TASK, handle);
    344                 slab_free(irq_slab, irq);
     344                slab_free(irq_cache, irq);
    345345                return ENOMEM;
    346346        }
Note: See TracChangeset for help on using the changeset viewer.