Ignore:
Timestamp:
2018-05-11T20:22:42Z (6 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/ipc/ops/datawrite.c

    rae89656 r7473807  
    5656        }
    5757
    58         call->buffer = (uint8_t *) malloc(size, 0);
     58        call->buffer = (uint8_t *) malloc(size, FRAME_ATOMIC);
     59        if (!call->buffer)
     60                return ENOMEM;
    5961        errno_t rc = copy_from_uspace(call->buffer, (void *) src, size);
    6062        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.