From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 08:13:47 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E95CFE80; Wed, 3 Sep 2014 08:13:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3E741F1F; Wed, 3 Sep 2014 08:13:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838DlFN084137; Wed, 3 Sep 2014 08:13:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838Dlvm084132; Wed, 3 Sep 2014 08:13:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030813.s838Dlvm084132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270998 - in stable/10/sys/cddl/contrib/opensolaris/uts/common: dtrace os sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:13:48 -0000 Author: delphij Date: Wed Sep 3 08:13:46 2014 New Revision: 270998 URL: http://svnweb.freebsd.org/changeset/base/270998 Log: MFC r270239: MFV r270193: Illumos issues: 5042 stop using deprecated atomic functions Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Sep 3 08:13:46 2014 (r270998) @@ -165,11 +165,11 @@ systrace_enable(void *arg, dtrace_id_t i return; } - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)systrace_sysent[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)systrace_sysent32[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall32); #endif @@ -184,12 +184,12 @@ systrace_disable(void *arg, dtrace_id_t systrace_sysent[sysnum].stsy_return == DTRACE_IDNONE); if (disable) { - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)dtrace_systrace_syscall, (void *)systrace_sysent[sysnum].stsy_underlying); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)dtrace_systrace_syscall32, (void *)systrace_sysent32[sysnum].stsy_underlying); #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:13:46 2014 (r270998) @@ -379,7 +379,7 @@ fm_panic(const char *format, ...) { va_list ap; - (void) casptr((void *)&fm_panicstr, NULL, (void *)format); + (void) atomic_cas_ptr((void *)&fm_panicstr, NULL, (void *)format); #if defined(__i386) || defined(__amd64) fastreboot_disable_highpil(); #endif /* __i386 || __amd64 */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Sep 3 08:13:46 2014 (r270998) @@ -171,9 +171,9 @@ extern int odd_parity(ulong_t); * to 0 otherwise. */ #define BT_ATOMIC_SET(bitmap, bitindex) \ - { atomic_or_long(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } + { atomic_or_ulong(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } #define BT_ATOMIC_CLEAR(bitmap, bitindex) \ - { atomic_and_long(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } + { atomic_and_ulong(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } #define BT_ATOMIC_SET_EXCL(bitmap, bitindex, result) \ { result = atomic_set_long_excl(&(BT_WIM(bitmap, bitindex)), \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Sep 3 08:13:46 2014 (r270998) @@ -524,8 +524,8 @@ typedef ulong_t cpuset_t; /* a set of CP largest = (uint_t)(highbit(set) - 1); \ } -#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_long(&(set), ~CPUSET(cpu)) -#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_long(&(set), CPUSET(cpu)) +#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_ulong(&(set), ~CPUSET(cpu)) +#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_ulong(&(set), CPUSET(cpu)) #define CPUSET_ATOMIC_XADD(set, cpu, result) \ { result = atomic_set_long_excl(&(set), (cpu)); }