Changeset 90efa3b in mainline


Ignore:
Timestamp:
2018-11-09T22:03:24Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
deacd722
Parents:
c222816
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-08 02:44:44)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
Message:

Remove flags from ipc_call_alloc()

Location:
kernel/generic
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/ipc.h

    rc222816 r90efa3b  
    174174extern void ipc_init(void);
    175175
    176 extern call_t *ipc_call_alloc(unsigned int);
     176extern call_t *ipc_call_alloc(void);
    177177
    178178extern errno_t ipc_call_sync(phone_t *, call_t *);
  • kernel/generic/src/ipc/event.c

    rc222816 r90efa3b  
    147147        if (event->answerbox != NULL) {
    148148                if (!event->masked) {
    149                         call_t *call = ipc_call_alloc(FRAME_ATOMIC);
     149                        call_t *call = ipc_call_alloc();
    150150
    151151                        if (call) {
  • kernel/generic/src/ipc/ipc.c

    rc222816 r90efa3b  
    108108 * TASK->answerbox.
    109109 *
    110  * @param flags Parameters for slab_alloc (e.g FRAME_ATOMIC).
    111  *
    112  * @return If flags permit it, return NULL, or initialized kernel
    113  *         call structure with one reference.
    114  *
    115  */
    116 call_t *ipc_call_alloc(unsigned int flags)
     110 * @return Initialized kernel call structure with one reference, or NULL.
     111 *
     112 */
     113call_t *ipc_call_alloc(void)
    117114{
    118115        // TODO: Allocate call and kobject in single allocation
    119116
    120         call_t *call = slab_alloc(call_cache, flags);
     117        call_t *call = slab_alloc(call_cache, FRAME_ATOMIC);
    121118        if (!call)
    122119                return NULL;
    123120
    124         kobject_t *kobj;
    125         if (flags & FRAME_ATOMIC)
    126                 kobj = (kobject_t *) malloc(sizeof(kobject_t));
    127         else
    128                 kobj = (kobject_t *) nfmalloc(sizeof(kobject_t));
    129 
     121        kobject_t *kobj = (kobject_t *) malloc(sizeof(kobject_t));
    130122        if (!kobj) {
    131123                slab_free(call_cache, call);
  • kernel/generic/src/ipc/ipcrsc.c

    rc222816 r90efa3b  
    8181                        return ENOMEM;
    8282                }
    83                 call_t *hcall = ipc_call_alloc(FRAME_ATOMIC);
     83                call_t *hcall = ipc_call_alloc();
    8484                if (!hcall) {
    8585                        cap_free(TASK, handle);
  • kernel/generic/src/ipc/irq.c

    rc222816 r90efa3b  
    529529
    530530        if (irq->notif_cfg.answerbox) {
    531                 call_t *call = ipc_call_alloc(FRAME_ATOMIC);
     531                call_t *call = ipc_call_alloc();
    532532                if (!call)
    533533                        return;
     
    565565
    566566        if (irq->notif_cfg.answerbox) {
    567                 call_t *call = ipc_call_alloc(FRAME_ATOMIC);
     567                call_t *call = ipc_call_alloc();
    568568                if (!call) {
    569569                        irq_spinlock_unlock(&irq->lock, true);
  • kernel/generic/src/ipc/sysipc.c

    rc222816 r90efa3b  
    277277                return ENOENT;
    278278
    279         call_t *call = ipc_call_alloc(FRAME_ATOMIC);
     279        call_t *call = ipc_call_alloc();
    280280        if (!call) {
    281281                kobject_put(kobj);
     
    379379        }
    380380
    381         call_t *call = ipc_call_alloc(FRAME_ATOMIC);
     381        call_t *call = ipc_call_alloc();
    382382        if (!call) {
    383383                kobject_put(kobj);
     
    431431        }
    432432
    433         call_t *call = ipc_call_alloc(FRAME_ATOMIC);
     433        call_t *call = ipc_call_alloc();
    434434        if (!call) {
    435435                kobject_put(kobj);
Note: See TracChangeset for help on using the changeset viewer.