~lttng/urcu/trunk

« back to all changes in this revision

Viewing changes to src/urcu-call-rcu-impl.h

  • Committer: Mathieu Desnoyers
  • Author(s): Michael Jeanson
  • Date: 2023-10-19 20:44:50 UTC
  • Revision ID: git-v1:008a71ef213f23c8d403e086563155121b286c0c
cleanup: use an enum for the error states of nr_cpus_mask

Using an enum with labels for error states instead of literal values
will make the code easier to read and understand.

Change-Id: I4558e17ccb45ab40515bb516af840b2852ee8fc3
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
895
895
                goto online;
896
896
        }
897
897
 
898
 
        completion = calloc(1, sizeof(*completion));
 
898
        completion = calloc(sizeof(*completion), 1);
899
899
        if (!completion)
900
900
                urcu_die(errno);
901
901
 
910
910
        cds_list_for_each_entry(crdp, &call_rcu_data_list, list) {
911
911
                struct call_rcu_completion_work *work;
912
912
 
913
 
                work = calloc(1, sizeof(*work));
 
913
                work = calloc(sizeof(*work), 1);
914
914
                if (!work)
915
915
                        urcu_die(errno);
916
916
                work->completion = completion;