Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux implement check_{add,mul...



details:   https://anonhg.NetBSD.org/src/rev/380b83c0d7f5
branches:  trunk
changeset: 1028269:380b83c0d7f5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:58:57 2021 +0000

description:
implement check_{add,mul}_overflow, using builtins


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/include/linux/overflow.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 42b354a5035c -r 380b83c0d7f5 sys/external/bsd/drm2/include/linux/overflow.h
--- a/sys/external/bsd/drm2/include/linux/overflow.h    Sun Dec 19 09:58:50 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/overflow.h    Sun Dec 19 09:58:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: overflow.h,v 1.1 2021/12/19 00:59:01 riastradh Exp $   */
+/*     $NetBSD: overflow.h,v 1.2 2021/12/19 09:58:57 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -45,4 +45,7 @@
        return nelem*elemsize;
 }
 
+#define        check_mul_overflow(a, b, res)   __builtin_mul_overflow(a, b, res)
+#define        check_add_overflow(a, b, res)   __builtin_add_overflow(a, b, res)
+
 #endif  /* _LINUX_OVERFLOW_H_ */



Home | Main Index | Thread Index | Old Index