From owner-trustedbsd-cvs@FreeBSD.ORG Sun Jan 21 22:47:07 2007 Return-Path: X-Original-To: trustedbsd-cvs@freebsd.org Delivered-To: trustedbsd-cvs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B78316A401 for ; Sun, 21 Jan 2007 22:47:07 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 135F113C43E for ; Sun, 21 Jan 2007 22:47:06 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by cyrus.watson.org (Postfix) with ESMTP id 72E804812E for ; Sun, 21 Jan 2007 17:47:03 -0500 (EST) Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54]) by mx2.freebsd.org (Postfix) with ESMTP id 8A36F92D60; Sun, 21 Jan 2007 22:45:05 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id CC40F16A60E; Sun, 21 Jan 2007 22:44:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA54016A60C for ; Sun, 21 Jan 2007 22:44:52 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 971BE13C45E for ; Sun, 21 Jan 2007 22:44:52 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0LMiq9D066589 for ; Sun, 21 Jan 2007 22:44:52 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0LMiqV6066585 for perforce@freebsd.org; Sun, 21 Jan 2007 22:44:52 GMT (envelope-from millert@freebsd.org) Date: Sun, 21 Jan 2007 22:44:52 GMT Message-Id: <200701212244.l0LMiqV6066585@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 113296 for review X-BeenThere: trustedbsd-cvs@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD CVS and Perforce commit message list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jan 2007 22:47:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=113296 Change 113296 by millert@millert_macbook on 2007/01/21 22:44:51 Fix the OSAddAtomic warnings by converting the inline functions that just call OSAddAtomic into macros and including libkern/OSAtomic.h as needed. This fixes a bunch of warnings in things that include devfsdefs.h like the MAC Framework and the sedarwin module. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_tree.c#9 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_vfsops.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfsdefs.h#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_tree.c#9 (text+ko) ==== @@ -101,6 +101,8 @@ #include #include +#include + #include "devfs.h" #include "devfsdefs.h" ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_vfsops.c#5 (text+ko) ==== @@ -78,6 +78,8 @@ #include #include +#include + #include "devfs.h" #include "devfsdefs.h" ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfsdefs.h#5 (text+ko) ==== @@ -204,62 +204,14 @@ #define DEVFS_UNLOCK() lck_mtx_unlock(&devfs_mutex) -static __inline__ void DEVFS_INCR_ENTRIES(void); -static __inline__ void DEVFS_DECR_ENTRIES(void); -static __inline__ void DEVFS_INCR_NODES(void); -static __inline__ void DEVFS_DECR_NODES(void); -static __inline__ void DEVFS_INCR_MOUNTS(void); -static __inline__ void DEVFS_DECR_MOUNTS(void); -static __inline__ void DEVFS_INCR_STRINGSPACE(int); -static __inline__ void DEVFS_DECR_STRINGSPACE(int); - -static __inline__ void -DEVFS_INCR_ENTRIES() -{ - OSAddAtomic(1, &devfs_stats.entries); -} - -static __inline__ void -DEVFS_DECR_ENTRIES() -{ - OSAddAtomic(-1, &devfs_stats.entries); -} - -static __inline__ void -DEVFS_INCR_NODES() -{ - OSAddAtomic(1, &devfs_stats.nodes); -} - -static __inline__ void -DEVFS_DECR_NODES() -{ - OSAddAtomic(-1, &devfs_stats.nodes); -} - -static __inline__ void -DEVFS_INCR_MOUNTS() -{ - OSAddAtomic(1, &devfs_stats.mounts); -} - -static __inline__ void -DEVFS_DECR_MOUNTS() -{ - OSAddAtomic(-1, &devfs_stats.mounts); -} - -static __inline__ void -DEVFS_INCR_STRINGSPACE(int space) -{ - OSAddAtomic(space, &devfs_stats.stringspace); -} - -static __inline__ void -DEVFS_DECR_STRINGSPACE(int space) -{ - OSAddAtomic(-space, &devfs_stats.stringspace); -} +#define DEVFS_INCR_ENTRIES() OSAddAtomic(1, (SInt32 *)&devfs_stats.entries) +#define DEVFS_DECR_ENTRIES() OSAddAtomic(-1, (SInt32 *)&devfs_stats.entries) +#define DEVFS_INCR_NODES() OSAddAtomic(1, (SInt32 *)&devfs_stats.nodes) +#define DEVFS_DECR_NODES() OSAddAtomic(-1, (SInt32 *)&devfs_stats.nodes) +#define DEVFS_INCR_MOUNTS() OSAddAtomic(1, (SInt32 *)&devfs_stats.mounts) +#define DEVFS_DECR_MOUNTS() OSAddAtomic(-1, (SInt32 *)&devfs_stats.mounts) +#define DEVFS_INCR_STRINGSPACE(x) OSAddAtomic(x, (SInt32 *)&devfs_stats.stringspace) +#define DEVFS_DECR_STRINGSPACE(x) OSAddAtomic(-x, (SInt32 *)&devfs_stats.stringspace) static __inline__ void dn_times(devnode_t * dnp, struct timeval *t1, struct timeval *t2, struct timeval *t3)