~lttng/urcu/trunk

« back to all changes in this revision

Viewing changes to src/workqueue.c

  • Committer: Mathieu Desnoyers
  • Author(s): Wang Jing
  • Date: 2023-09-06 13:20:24 UTC
  • Revision ID: git-v1:dc46a9c324ae94d89da41ea9a3f97503115df88e
Add LoongArch support

This commit completes LoongArch support.

LoongArch supports byte and short atomic operations,
and defines UATOMIC_HAS_ATOMIC_BYTE and UATOMIC_HAS_ATOMIC_SHORT.

Signed-off-by: Wang Jing <wangjing@loongson.cn>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I335e654939bfc90994275f2a4fad550c95f3eba4

Show diffs side-by-side

added added

removed removed

Lines of Context:
384
384
{
385
385
        struct urcu_workqueue_completion *completion;
386
386
 
387
 
        completion = calloc(1, sizeof(*completion));
 
387
        completion = calloc(sizeof(*completion), 1);
388
388
        if (!completion)
389
389
                urcu_die(errno);
390
390
        urcu_ref_set(&completion->ref, 1);
415
415
{
416
416
        struct urcu_workqueue_completion_work *work;
417
417
 
418
 
        work = calloc(1, sizeof(*work));
 
418
        work = calloc(sizeof(*work), 1);
419
419
        if (!work)
420
420
                urcu_die(errno);
421
421
        work->completion = completion;