Changeset 11b285d in mainline for kernel/test/synch/rcu1.c


Ignore:
Timestamp:
2018-05-13T15:19:32Z (6 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/test/synch/rcu1.c

    r13db2044 r11b285d  
    251251{
    252252        for (int i = 0; i < nop_updater_iters; i += 2) {
    253                 rcu_item_t *a = malloc(sizeof(rcu_item_t), FRAME_ATOMIC);
    254                 rcu_item_t *b = malloc(sizeof(rcu_item_t), FRAME_ATOMIC);
     253                rcu_item_t *a = malloc(sizeof(rcu_item_t));
     254                rcu_item_t *b = malloc(sizeof(rcu_item_t));
    255255
    256256                if (a && b) {
     
    315315        rcu_read_lock();
    316316
    317         item_w_cookie_t *item = malloc(sizeof(item_w_cookie_t), FRAME_ATOMIC);
     317        item_w_cookie_t *item = malloc(sizeof(item_w_cookie_t));
    318318
    319319        if (item) {
     
    420420                /* Updater */
    421421                for (size_t i = 0; i < work->update_cnt; ++i) {
    422                         seq_item_t *a = malloc(sizeof(seq_item_t), FRAME_ATOMIC);
    423                         seq_item_t *b = malloc(sizeof(seq_item_t), FRAME_ATOMIC);
     422                        seq_item_t *a = malloc(sizeof(seq_item_t));
     423                        seq_item_t *b = malloc(sizeof(seq_item_t));
    424424
    425425                        if (a && b) {
     
    523523        TPRINTF("\nReader exits thread with rcu_lock\n");
    524524
    525         exited_t *p = malloc(sizeof(exited_t), FRAME_ATOMIC);
     525        exited_t *p = malloc(sizeof(exited_t));
    526526        if (!p) {
    527527                TPRINTF("[out-of-mem]\n");
     
    686686static bool do_one_reader_preempt(void (*f)(void *), const char *err)
    687687{
    688         preempt_t *p = malloc(sizeof(preempt_t), FRAME_ATOMIC);
     688        preempt_t *p = malloc(sizeof(preempt_t));
    689689        if (!p) {
    690690                TPRINTF("[out-of-mem]\n");
     
    777777        TPRINTF("\nSynchronize with long reader\n");
    778778
    779         synch_t *synch = malloc(sizeof(synch_t), FRAME_ATOMIC);
     779        synch_t *synch = malloc(sizeof(synch_t));
    780780
    781781        if (!synch) {
     
    828828        TPRINTF("\nrcu_barrier: Wait for outstanding rcu callbacks to complete\n");
    829829
    830         barrier_t *barrier = malloc(sizeof(barrier_t), FRAME_ATOMIC);
     830        barrier_t *barrier = malloc(sizeof(barrier_t));
    831831
    832832        if (!barrier) {
     
    886886
    887887        for (size_t i = 0; i < s->iters; ++i) {
    888                 rcu_item_t *item = malloc(sizeof(rcu_item_t), FRAME_ATOMIC);
     888                rcu_item_t *item = malloc(sizeof(rcu_item_t));
    889889
    890890                if (item) {
Note: See TracChangeset for help on using the changeset viewer.