fix: handle EINTR correctly in get_cpu_mask_from_sysfs
[urcu.git] / src / compat_futex.c
index 9e918fe8e2aac035dc39e6e23868410348d02627..151a40cbae2b9cfa8cc1528d5c7630c6a1c4bcd0 100644 (file)
@@ -1,34 +1,20 @@
+// SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
 /*
- * compat_futex.c
- *
  * Userspace RCU library - sys_futex compatibility code
- *
- * Copyright (c) 2009 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
  */
 
 #include <stdio.h>
 #include <pthread.h>
 #include <signal.h>
-#include <assert.h>
 #include <errno.h>
 #include <poll.h>
 #include <stdint.h>
 
 #include <urcu/arch.h>
+#include <urcu/assert.h>
 #include <urcu/futex.h>
 #include <urcu/system.h>
 
@@ -60,9 +46,9 @@ int compat_futex_noasync(int32_t *uaddr, int op, int32_t val,
         * Check if NULL. Don't let users expect that they are taken into
         * account.
         */
-       assert(!timeout);
-       assert(!uaddr2);
-       assert(!val3);
+       urcu_posix_assert(!timeout);
+       urcu_posix_assert(!uaddr2);
+       urcu_posix_assert(!val3);
 
        /*
         * memory barriers to serialize with the previous uaddr modification.
@@ -124,9 +110,9 @@ int compat_futex_async(int32_t *uaddr, int op, int32_t val,
         * Check if NULL. Don't let users expect that they are taken into
         * account.
         */
-       assert(!timeout);
-       assert(!uaddr2);
-       assert(!val3);
+       urcu_posix_assert(!timeout);
+       urcu_posix_assert(!uaddr2);
+       urcu_posix_assert(!val3);
 
        /*
         * Ensure previous memory operations on uaddr have completed.
This page took 0.023834 seconds and 4 git commands to generate.