From a21c03fe5f4d78a18b678171424c1a4d76110922 Mon Sep 17 00:00:00 2001 From: riastradh Date: Tue, 3 Jun 2014 14:59:30 +0000 Subject: [PATCH] Fix atomic_dec_and_test in : test 0, not -1. --- sys/external/bsd/drm2/include/linux/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/external/bsd/drm2/include/linux/atomic.h b/sys/external/bsd/drm2/include/linux/atomic.h index 576ee6ce3fbd..d0aa4f7ca369 100644 --- a/sys/external/bsd/drm2/include/linux/atomic.h +++ b/sys/external/bsd/drm2/include/linux/atomic.h @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.3 2014/04/01 15:28:52 riastradh Exp $ */ +/* $NetBSD: atomic.h,v 1.4 2014/06/03 14:59:30 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -104,7 +104,7 @@ atomic_dec_return(atomic_t *atomic) static inline int atomic_dec_and_test(atomic_t *atomic) { - return (-1 == (int)atomic_dec_uint_nv(&atomic->a_u.au_uint)); + return (0 == (int)atomic_dec_uint_nv(&atomic->a_u.au_uint)); } static inline void