Ignore:
Timestamp:
2018-05-13T15:19:32Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad896eb
Parents:
13db2044
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-13 14:59:01)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-13 15:19:32)
Message:

Use standard signature for malloc() in kernel.

The remaining instances of blocking allocation are replaced with
a new separate function named nfmalloc (short for non-failing malloc).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/udebug/udebug_ops.c

    r13db2044 r11b285d  
    370370
    371371        /* Allocate a buffer to hold thread IDs */
    372         sysarg_t *id_buffer = malloc(buf_size + 1, FRAME_ATOMIC);
     372        sysarg_t *id_buffer = malloc(buf_size + 1);
    373373        if (!id_buffer)
    374374                return ENOMEM;
     
    434434        size_t name_size = str_size(TASK->name) + 1;
    435435
    436         *data = malloc(name_size, FRAME_ATOMIC);
     436        *data = malloc(name_size);
    437437        if (!*data)
    438438                return ENOMEM;
     
    476476
    477477        /* Prepare a buffer to hold the arguments. */
    478         sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), FRAME_ATOMIC);
     478        sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t));
    479479        if (!arg_buffer) {
    480480                _thread_op_end(thread);
     
    522522
    523523        /* Prepare a buffer to hold the data. */
    524         istate_t *state_buf = malloc(sizeof(istate_t), FRAME_ATOMIC);
     524        istate_t *state_buf = malloc(sizeof(istate_t));
    525525        if (!state_buf) {
    526526                _thread_op_end(thread);
     
    558558        }
    559559
    560         void *data_buffer = malloc(n, FRAME_ATOMIC);
     560        void *data_buffer = malloc(n);
    561561        if (!data_buffer) {
    562562                mutex_unlock(&TASK->udebug.lock);
Note: See TracChangeset for help on using the changeset viewer.