fix: handle EINTR correctly in get_cpu_mask_from_sysfs
[urcu.git] / src / workqueue.c
index 1039d7297b9ce13446c4b81aee86fa217a005eab..10b9fdee5df22155875edda1ccf4fff77adf3f0f 100644 (file)
@@ -1,24 +1,10 @@
+// SPDX-FileCopyrightText: 2010 Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+// SPDX-FileCopyrightText: 2017 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
 /*
- * workqueue.c
- *
  * Userspace RCU library - Userspace workqeues
- *
- * Copyright (c) 2010 Paul E. McKenney <paulmck@linux.vnet.ibm.com>
- * Copyright (c) 2017 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define _LGPL_SOURCE
@@ -398,7 +384,7 @@ struct urcu_workqueue_completion *urcu_workqueue_create_completion(void)
 {
        struct urcu_workqueue_completion *completion;
 
-       completion = calloc(sizeof(*completion), 1);
+       completion = calloc(1, sizeof(*completion));
        if (!completion)
                urcu_die(errno);
        urcu_ref_set(&completion->ref, 1);
@@ -429,7 +415,7 @@ void urcu_workqueue_queue_completion(struct urcu_workqueue *workqueue,
 {
        struct urcu_workqueue_completion_work *work;
 
-       work = calloc(sizeof(*work), 1);
+       work = calloc(1, sizeof(*work));
        if (!work)
                urcu_die(errno);
        work->completion = completion;
This page took 0.022679 seconds and 4 git commands to generate.