Changeset 7473807 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2018-05-11T20:22:42Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d2c5159
Parents:
ae89656
Message:

Use atomic malloc allocations

We can safely use atomic allocations in places that use the non-failing
version of malloc(), but test the return value anyway. And also in some
places that can afford to return failure but did not because of comfort.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/thread.c

    rae89656 r7473807  
    949949         */
    950950        uspace_arg_t *kernel_uarg =
    951             (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0);
     951            (uspace_arg_t *) malloc(sizeof(uspace_arg_t), FRAME_ATOMIC);
     952        if (!kernel_uarg)
     953                return (sys_errno_t) ENOMEM;
    952954
    953955        rc = copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t));
Note: See TracChangeset for help on using the changeset viewer.