Changeset 7473807 in mainline for uspace/lib/c/include/rcu.h


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
  • uspace/lib/c/include/rcu.h

    rae89656 r7473807  
    5555 *
    5656 * // Insert at the beginning of the list.
    57  * exam_t *my_exam = malloc(sizeof(exam_t), 0);
     57 * exam_t *my_exam = malloc(sizeof(exam_t));
    5858 * my_exam->grade = 5;
    5959 * my_exam->next = exam_list;
Note: See TracChangeset for help on using the changeset viewer.