PERFORCE change 138059 for review
Marcel Moolenaar
marcel at FreeBSD.org
Wed Mar 19 05:38:17 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=138059
Change 138059 by marcel at marcel_xcllnt on 2008/03/19 05:37:15
IFC @138058
Affected files ...
.. //depot/projects/bdb/contrib/cvs/lib/getdate#2 delete
.. //depot/projects/bdb/lib/libc/locale/wctype.c#2 integrate
.. //depot/projects/bdb/lib/libsdp/sdp.h#3 integrate
.. //depot/projects/bdb/lib/libthr/thread/thr_create.c#4 integrate
.. //depot/projects/bdb/lib/libthr/thread/thr_exit.c#3 integrate
.. //depot/projects/bdb/lib/libthr/thread/thr_sig.c#3 integrate
.. //depot/projects/bdb/sbin/atacontrol/atacontrol.8#2 integrate
.. //depot/projects/bdb/sbin/atacontrol/atacontrol.c#3 integrate
.. //depot/projects/bdb/share/man/man4/man4.i386/ar.4#2 integrate
.. //depot/projects/bdb/share/man/man4/man4.i386/linux.4#2 integrate
.. //depot/projects/bdb/share/man/man4/man4.i386/pnp.4#2 integrate
.. //depot/projects/bdb/share/man/man4/man4.i386/scd.4#2 integrate
.. //depot/projects/bdb/share/man/man4/man4.i386/streams.4#2 integrate
.. //depot/projects/bdb/share/man/man4/man4.i386/svr4.4#2 integrate
.. //depot/projects/bdb/share/man/man9/atomic.9#2 integrate
.. //depot/projects/bdb/share/man/man9/ieee80211_radiotap.9#2 integrate
.. //depot/projects/bdb/sys/amd64/amd64/intr_machdep.c#3 integrate
.. //depot/projects/bdb/sys/amd64/include/atomic.h#2 integrate
.. //depot/projects/bdb/sys/arm/arm/intr.c#3 integrate
.. //depot/projects/bdb/sys/cam/scsi/scsi_ses.c#2 integrate
.. //depot/projects/bdb/sys/compat/svr4/svr4_fcntl.c#2 integrate
.. //depot/projects/bdb/sys/conf/files#3 integrate
.. //depot/projects/bdb/sys/dev/ata/ata-all.c#2 integrate
.. //depot/projects/bdb/sys/dev/ata/ata-all.h#2 integrate
.. //depot/projects/bdb/sys/dev/ata/ata-disk.c#2 integrate
.. //depot/projects/bdb/sys/dev/ata/ata-disk.h#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/common/cxgb_ael1002.c#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/common/cxgb_common.h#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/common/cxgb_version.h#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/cxgb_ioctl.h#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/cxgb_main.c#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#2 integrate
.. //depot/projects/bdb/sys/dev/cxgb/ulp/tom/cxgb_defs.h#2 integrate
.. //depot/projects/bdb/sys/dev/hwpmc/hwpmc_amd.c#2 integrate
.. //depot/projects/bdb/sys/dev/usb/if_zyd.c#2 integrate
.. //depot/projects/bdb/sys/geom/vinum/geom_vinum_drive.c#2 integrate
.. //depot/projects/bdb/sys/i386/cpufreq/est.c#3 integrate
.. //depot/projects/bdb/sys/i386/cpufreq/p4tcc.c#2 integrate
.. //depot/projects/bdb/sys/i386/i386/intr_machdep.c#3 integrate
.. //depot/projects/bdb/sys/i386/include/atomic.h#2 integrate
.. //depot/projects/bdb/sys/ia64/ia64/interrupt.c#3 integrate
.. //depot/projects/bdb/sys/ia64/include/atomic.h#2 integrate
.. //depot/projects/bdb/sys/kern/kern_conf.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_intr.c#4 integrate
.. //depot/projects/bdb/sys/kern/kern_resource.c#4 integrate
.. //depot/projects/bdb/sys/kern/subr_witness.c#4 integrate
.. //depot/projects/bdb/sys/net/ieee8023ad_lacp.h#3 integrate
.. //depot/projects/bdb/sys/netgraph/ng_base.c#3 integrate
.. //depot/projects/bdb/sys/netgraph/ng_l2tp.c#3 integrate
.. //depot/projects/bdb/sys/netinet/in_pcb.c#3 integrate
.. //depot/projects/bdb/sys/netinet/ip_fw2.c#2 integrate
.. //depot/projects/bdb/sys/netinet/libalias/alias_irc.c#3 integrate
.. //depot/projects/bdb/sys/nfsserver/nfs_srvsock.c#2 integrate
.. //depot/projects/bdb/sys/powerpc/include/atomic.h#2 integrate
.. //depot/projects/bdb/sys/powerpc/include/gdb_machdep.h#2 integrate
.. //depot/projects/bdb/sys/powerpc/powerpc/gdb_machdep.c#3 integrate
.. //depot/projects/bdb/sys/powerpc/powerpc/intr_machdep.c#4 integrate
.. //depot/projects/bdb/sys/sparc64/include/atomic.h#2 integrate
.. //depot/projects/bdb/sys/sparc64/sparc64/intr_machdep.c#3 integrate
.. //depot/projects/bdb/sys/sun4v/include/atomic.h#2 integrate
.. //depot/projects/bdb/sys/sun4v/sun4v/intr_machdep.c#3 integrate
.. //depot/projects/bdb/sys/sys/ata.h#2 integrate
.. //depot/projects/bdb/sys/sys/conf.h#2 integrate
.. //depot/projects/bdb/sys/sys/interrupt.h#3 integrate
.. //depot/projects/bdb/sys/sys/resourcevar.h#2 integrate
.. //depot/projects/bdb/sys/vm/vm_page.c#2 integrate
.. //depot/projects/bdb/sys/vm/vm_page.h#2 integrate
.. //depot/projects/bdb/sys/vm/vm_pageq.c#2 delete
.. //depot/projects/bdb/usr.bin/netstat/inet6.c#2 integrate
.. //depot/projects/bdb/usr.bin/ruptime/ruptime.c#2 integrate
.. //depot/projects/bdb/usr.bin/tar/Makefile#2 integrate
.. //depot/projects/bdb/usr.bin/tar/matching.c#2 integrate
.. //depot/projects/bdb/usr.sbin/adduser/adduser.8#2 integrate
.. //depot/projects/bdb/usr.sbin/arp/arp.8#2 integrate
.. //depot/projects/bdb/usr.sbin/arp/arp.c#2 integrate
.. //depot/projects/bdb/usr.sbin/bluetooth/sdpd/gn.c#2 integrate
.. //depot/projects/bdb/usr.sbin/bluetooth/sdpd/lan.c#2 integrate
.. //depot/projects/bdb/usr.sbin/bluetooth/sdpd/nap.c#2 integrate
.. //depot/projects/bdb/usr.sbin/bluetooth/sdpd/panu.c#2 integrate
.. //depot/projects/bdb/usr.sbin/bluetooth/sdpd/profile.c#3 integrate
.. //depot/projects/bdb/usr.sbin/bluetooth/sdpd/profile.h#3 integrate
.. //depot/projects/bdb/usr.sbin/fifolog/lib/miniobj.h#2 integrate
Differences ...
==== //depot/projects/bdb/lib/libc/locale/wctype.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/locale/wctype.c,v 1.3 2004/03/27 08:59:21 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/locale/wctype.c,v 1.4 2008/03/17 18:22:23 antoine Exp $");
#include <ctype.h>
#include <string.h>
@@ -42,7 +42,7 @@
wctype_t
wctype(const char *property)
{
- struct {
+ static const struct {
const char *name;
wctype_t mask;
} props[] = {
==== //depot/projects/bdb/lib/libsdp/sdp.h#3 (text+ko) ====
@@ -26,7 +26,7 @@
* SUCH DAMAGE.
*
* $Id: sdp.h,v 1.3 2003/09/05 00:33:59 max Exp $
- * $FreeBSD: src/lib/libsdp/sdp.h,v 1.8 2008/03/11 00:08:40 emax Exp $
+ * $FreeBSD: src/lib/libsdp/sdp.h,v 1.10 2008/03/19 00:06:29 emax Exp $
*/
#ifndef _SDP_H_
@@ -649,20 +649,37 @@
struct sdp_nap_profile
{
- uint16_t security_description; /* HBO: NAP/GN */
- uint16_t net_access_type; /* HBO: NAP */
- uint32_t max_net_access_rate; /* HBO: NAP */
+ uint8_t reserved;
+ uint8_t load_factor;
+ uint16_t psm; /* HBO */
+ uint16_t security_description; /* HBO */
+ uint16_t net_access_type; /* HBO */
+ uint32_t max_net_access_rate; /* HBO */
};
typedef struct sdp_nap_profile sdp_nap_profile_t;
typedef struct sdp_nap_profile * sdp_nap_profile_p;
-/* Reuse struct sdp_nap_profile for GN */
-typedef struct sdp_nap_profile sdp_gn_profile_t;
-typedef struct sdp_nap_profile * sdp_gn_profile_p;
+struct sdp_gn_profile
+{
+ uint8_t reserved;
+ uint8_t load_factor;
+ uint16_t psm; /* HBO */
+ uint16_t security_description; /* HBO */
+ uint16_t reserved2;
+};
+typedef struct sdp_gn_profile sdp_gn_profile_t;
+typedef struct sdp_gn_profile * sdp_gn_profile_p;
-/* Reuse struct sdp_nap_profile for PANU */
-typedef struct sdp_nap_profile sdp_panu_profile_t;
-typedef struct sdp_nap_profile * sdp_panu_profile_p;
+struct sdp_panu_profile
+{
+ uint8_t reserved;
+ uint8_t load_factor;
+ uint16_t psm; /* HBO */
+ uint16_t security_description; /* HBO */
+ uint16_t reserved2;
+};
+typedef struct sdp_panu_profile sdp_panu_profile_t;
+typedef struct sdp_panu_profile * sdp_panu_profile_p;
int32_t sdp_register_service (void *xss, uint16_t uuid,
bdaddr_p const bdaddr, uint8_t const *data,
==== //depot/projects/bdb/lib/libthr/thread/thr_create.c#4 (text+ko) ====
@@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.41 2008/03/16 03:22:38 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.42 2008/03/18 02:06:51 davidxu Exp $
*/
#include "namespace.h"
@@ -247,6 +247,11 @@
static void
thread_start(struct pthread *curthread)
{
+ sigset_t set;
+
+ if (curthread->attr.suspend == THR_CREATE_SUSPENDED)
+ set = curthread->sigmask;
+
/*
* This is used as a serialization point to allow parent
* to report 'new thread' event to debugger or tweak new thread's
@@ -263,19 +268,20 @@
SIGEMPTYSET(set);
SIGADDSET(set, SIGCANCEL);
- sigprocmask(SIG_UNBLOCK, &set, NULL);
+ __sys_sigprocmask(SIG_UNBLOCK, &set, NULL);
}
if (curthread->attr.suspend == THR_CREATE_SUSPENDED) {
- sigset_t set = curthread->sigmask;
-
+#if 0
+ /* Done in THR_UNLOCK() */
_thr_ast(curthread);
+#endif
/*
* Parent thread have stored signal mask for us,
* we should restore it now.
*/
- sigprocmask(SIG_SETMASK, &set, NULL);
+ __sys_sigprocmask(SIG_SETMASK, &set, NULL);
}
/* Run the current thread's start routine with argument: */
==== //depot/projects/bdb/lib/libthr/thread/thr_exit.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libthr/thread/thr_exit.c,v 1.25 2008/03/06 02:07:18 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_exit.c,v 1.26 2008/03/18 02:06:51 davidxu Exp $
*/
#include <errno.h>
@@ -121,6 +121,10 @@
}
THR_LOCK(curthread);
curthread->state = PS_DEAD;
+ if (curthread->flags & THR_FLAGS_NEED_SUSPEND) {
+ curthread->cycle++;
+ _thr_umtx_wake(&curthread->cycle, INT_MAX);
+ }
THR_UNLOCK(curthread);
/*
* Thread was created with initial refcount 1, we drop the
==== //depot/projects/bdb/lib/libthr/thread/thr_sig.c#3 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libthr/thread/thr_sig.c,v 1.27 2008/03/05 07:04:55 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_sig.c,v 1.28 2008/03/18 02:06:51 davidxu Exp $
*/
#include "namespace.h"
@@ -92,6 +92,9 @@
long cycle;
int err;
+ if (curthread->force_exit)
+ return;
+
err = errno;
/*
* Blocks SIGCANCEL which other threads must send.
==== //depot/projects/bdb/sbin/atacontrol/atacontrol.8#2 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/sbin/atacontrol/atacontrol.8,v 1.29 2007/11/28 21:37:25 remko Exp $
+.\" $FreeBSD: src/sbin/atacontrol/atacontrol.8,v 1.30 2008/03/17 10:33:23 phk Exp $
.\"
.Dd November 28, 2007
.Dt ATACONTROL 8
@@ -70,6 +70,10 @@
.Ic cap
.Ar device
.Nm
+.Ic spindown
+.Ar device
+.Op Ar seconds
+.Nm
.Ic list
.Sh DESCRIPTION
The
@@ -190,6 +194,10 @@
.It Ic cap
Show detailed info about the device on
.Ar device .
+.It Ic spindown
+Set or report timeout after which the
+.Ar device
+will be spun down.
.It Ic info
Show info about the attached devices on the
.Ar channel .
==== //depot/projects/bdb/sbin/atacontrol/atacontrol.c#3 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.46 2008/03/16 17:54:55 phk Exp $
+ * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.47 2008/03/17 10:33:23 phk Exp $
*/
#include <sys/types.h>
@@ -102,6 +102,7 @@
" atacontrol status array\n"
" atacontrol mode device [mode]\n"
" atacontrol cap device\n"
+ " atacontrol spindown device [seconds]\n"
);
exit(EX_USAGE);
}
@@ -285,6 +286,26 @@
printf(" no device present\n");
}
+static void
+ata_spindown(int fd, const char *dev, const char *arg)
+{
+ int tmo;
+
+ if (arg != NULL) {
+ tmo = strtoul(arg, NULL, 0);
+ if (ioctl(fd, IOCATASSPINDOWN, &tmo) < 0)
+ err(1, "ioctl(IOCATASSPINDOWN)");
+ } else {
+ if (ioctl(fd, IOCATAGSPINDOWN, &tmo) < 0)
+ err(1, "ioctl(IOCATAGSPINDOWN)");
+ if (tmo == 0)
+ printf("%s: idle spin down disabled\n", dev);
+ else
+ printf("%s: spin down after %d seconds idle\n",
+ dev, tmo);
+ }
+}
+
static int
open_dev(const char *arg, int mode)
{
@@ -356,6 +377,12 @@
exit(EX_OK);
}
+ if (!strcmp(argv[1], "spindown") && (argc == 3 || argc == 4)) {
+ fd = open_dev(argv[2], O_RDONLY);
+ ata_spindown(fd, argv[2], argv[3]);
+ exit(EX_OK);
+ }
+
if ((fd = open("/dev/ata", O_RDWR)) < 0)
err(1, "control device not found");
==== //depot/projects/bdb/share/man/man4/man4.i386/ar.4#2 (text+ko) ====
@@ -25,17 +25,16 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/man4.i386/ar.4,v 1.28 2005/01/21 08:36:38 ru Exp $
+.\" $FreeBSD: src/share/man/man4/man4.i386/ar.4,v 1.29 2008/03/16 22:26:17 brueffer Exp $
.\"
-.Dd November 19, 1995
+.Dd March 16, 2008
.Dt AR 4 i386
.Os
.Sh NAME
.Nm ar
.Nd synchronous Digi/Arnet device driver
.Sh SYNOPSIS
-.Cd "device ar0 at isa? port 0x300 irq 10 iomem 0xd0000"
-.Cd "device ar1 at isa? port 0x310 irq 11 iomem 0xd0000"
+.Cd "device ar"
.Pp
.Cd "device sppp"
.Sh DESCRIPTION
@@ -83,14 +82,6 @@
The node will have the same name as the device with ``sync_''
prepended, e.g.,
.Dv sync_ar0 .
-.Sh FILES
-.Bl -tag -width /sys/i386/isa/ic/hd64570.h -compact
-.It Pa /sys/i386/isa/ic/hd64570.h
-.It Pa /sys/i386/isa/if_arregs.h
-.It Pa /sys/i386/isa/if_ar.c
-.It Pa /sys/i386/isa/if_ar.h
-.It Pa /sys/pci/if_ar_p.c
-.El
.Sh DIAGNOSTICS
.Bl -diag
.It "ar%d: Warning illegal interrupt %d."
==== //depot/projects/bdb/share/man/man4/man4.i386/linux.4#2 (text+ko) ====
@@ -22,19 +22,28 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/man4.i386/linux.4,v 1.12 2006/09/18 15:24:19 ru Exp $
-.Dd June 18, 2006
+.\" $FreeBSD: src/share/man/man4/man4.i386/linux.4,v 1.13 2008/03/17 08:17:04 brueffer Exp $
+.\"
+.Dd March 17, 2008
.Dt LINUX 4 i386
.Os
.Sh NAME
.Nm linux
.Nd Linux ABI support
.Sh SYNOPSIS
-To link Linux ABI support into the kernel:
+To compile support for this ABI into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
.Cd "options COMPAT_LINUX"
+.Ed
.Pp
-To load the Linux ABI support kernel module:
-.Dl kldload linux
+Alternatively, to load the ABI as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+linux_load="YES"
+.Ed
.Sh DESCRIPTION
The
.Nm
==== //depot/projects/bdb/share/man/man4/man4.i386/pnp.4#2 (text+ko) ====
@@ -25,7 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/man4.i386/pnp.4,v 1.17 2005/07/15 17:35:26 hrs Exp $
+.\" $FreeBSD: src/share/man/man4/man4.i386/pnp.4,v 1.18 2008/03/16 22:51:30 brueffer Exp $
.\"
.Dd September 20, 2001
.Dt PNP 4 i386
@@ -80,6 +80,7 @@
.Fx 2.2.5 .
It has been substantially updated in subsequent versions.
.Sh AUTHORS
+.An -nosplit
PnP support was originally written
for
.Fx 2.2.5
==== //depot/projects/bdb/share/man/man4/man4.i386/scd.4#2 (text+ko) ====
@@ -24,16 +24,16 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/man4.i386/scd.4,v 1.22 2005/03/16 02:03:15 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/man4.i386/scd.4,v 1.23 2008/03/17 08:06:41 brueffer Exp $
.\"
-.Dd March 16, 2005
+.Dd March 17, 2008
.Dt SCD 4 i386
.Os
.Sh NAME
.Nm scd
.Nd Sony CDU31/33 CD-ROM driver
.Sh SYNOPSIS
-.Cd "device scd 1"
+.Cd "device scd"
.Pp
In
.Pa /boot/device.hints :
==== //depot/projects/bdb/share/man/man4/man4.i386/streams.4#2 (text+ko) ====
@@ -22,21 +22,27 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/man4.i386/streams.4,v 1.7 2005/01/21 08:36:39 ru Exp $
-.Dd November 6, 2000
+.\" $FreeBSD: src/share/man/man4/man4.i386/streams.4,v 1.8 2008/03/17 08:17:04 brueffer Exp $
+.\"
+.Dd March 17, 2008
.Dt STREAMS 4 i386
.Os
.Sh NAME
.Nm streams
.Nd System V STREAMS networking ABI support
-.Sh SYNOPSIS
-To link System V Release 4 (SVR4) STREAMS interprocess communication ABI
-support into the kernel:
-.Cd device streams
+To compile support for this ABI into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device streams"
+.Ed
.Pp
-To load the SVR4 STREAMS interprocess communication ABI support kernel
-module:
-.Dl kldload streams
+Alternatively, to load the ABI as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+streams_load="YES"
+.Ed
.Sh DESCRIPTION
The
.Nm
==== //depot/projects/bdb/share/man/man4/man4.i386/svr4.4#2 (text+ko) ====
@@ -22,19 +22,28 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/man4.i386/svr4.4,v 1.12 2005/02/13 23:45:49 ru Exp $
-.Dd October 28, 2003
+.\" $FreeBSD: src/share/man/man4/man4.i386/svr4.4,v 1.13 2008/03/17 08:17:04 brueffer Exp $
+.\"
+.Dd March 17, 2008
.Dt SVR4 4 i386
.Os
.Sh NAME
.Nm svr4
.Nd System V Release 4 ABI support
.Sh SYNOPSIS
-To link System V Release 4 (SVR4) ABI support into the kernel:
-.Cd options COMPAT_SVR4
+To compile support for this ABI into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options COMPAT_SVR4"
+.Ed
.Pp
-To load the SVR4 ABI support kernel module:
-.Dl kldload svr4
+Alternatively, to load the ABI as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+svr4_load="YES"
+.Ed
.Sh DESCRIPTION
The
.Nm
==== //depot/projects/bdb/share/man/man9/atomic.9#2 (text+ko) ====
@@ -21,7 +21,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/atomic.9,v 1.13 2005/11/18 10:52:24 ru Exp $
+.\" $FreeBSD: src/share/man/man9/atomic.9,v 1.14 2008/03/16 21:20:50 pjd Exp $
.\"
.Dd September 27, 2005
.Os
@@ -211,7 +211,8 @@
The
.Fn atomic_fetchadd
functions are only implemented for the types
-.Dq Li int
+.Dq Li int ,
+.Dq Li long
and
.Dq Li 32
and do not have any variants with memory barriers at this time.
==== //depot/projects/bdb/share/man/man9/ieee80211_radiotap.9#2 (text+ko) ====
@@ -25,10 +25,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/ieee80211_radiotap.9,v 1.3 2004/07/07 12:59:39 ru Exp $
+.\" $FreeBSD: src/share/man/man9/ieee80211_radiotap.9,v 1.5 2008/03/17 16:37:35 brueffer Exp $
.\" $Id: ieee80211_radiotap.9,v 1.3 2004/03/04 11:38:52 bruce Exp $
.\"
-.Dd March 2, 2004
+.Dd March 17, 2008
.Dt IEEE80211_RADIOTAP 9
.Os
.Sh NAME
@@ -72,7 +72,7 @@
It is requested by using the
.Xr bpf 4
data-link type
-.Dv DLT_IEEE_80211_RADIO .
+.Dv DLT_IEEE802_11_RADIO .
.Pp
.\"
Each frame using this attachment has the following header prepended to it:
@@ -103,7 +103,7 @@
by calling
.Fn bpfattach2
with the data-link type set to
-.Dv DLT_IEEE_80211_RADIO .
+.Dv DLT_IEEE802_11_RADIO .
.Pp
.\"
When the the information is available,
==== //depot/projects/bdb/sys/amd64/amd64/intr_machdep.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.38 2008/03/16 10:58:02 rwatson Exp $
+ * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.39 2008/03/17 22:42:00 jhb Exp $
*/
/*
@@ -77,12 +77,6 @@
static struct mtx intrcnt_lock;
static STAILQ_HEAD(, pic) pics;
-#ifdef INTR_FILTER
-static void intr_eoi_src(void *arg);
-static void intr_disab_eoi_src(void *arg);
-static void intr_event_stray(void *cookie);
-#endif
-
#ifdef SMP
static int assign_cpu;
@@ -90,6 +84,10 @@
#endif
static int intr_assign_cpu(void *arg, u_char cpu);
+static void intr_disable_src(void *arg);
+#ifdef INTR_FILTER
+static void intr_event_stray(void *cookie);
+#endif
static void intr_init(void *__dummy);
static int intr_pic_registered(struct pic *pic);
static void intrcnt_setname(const char *name, int index);
@@ -144,16 +142,10 @@
vector = isrc->is_pic->pic_vector(isrc);
if (interrupt_sources[vector] != NULL)
return (EEXIST);
-#ifdef INTR_FILTER
error = intr_event_create(&isrc->is_event, isrc, 0,
- (mask_fn)isrc->is_pic->pic_enable_source,
- intr_eoi_src, intr_disab_eoi_src, intr_assign_cpu, "irq%d:",
- vector);
-#else
- error = intr_event_create(&isrc->is_event, isrc, 0,
- (mask_fn)isrc->is_pic->pic_enable_source, intr_assign_cpu, "irq%d:",
+ intr_disable_src, (mask_fn)isrc->is_pic->pic_enable_source,
+ (mask_fn)isrc->is_pic->pic_eoi_source, intr_assign_cpu, "irq%d:",
vector);
-#endif
if (error)
return (error);
sx_xlock(&intr_table_lock);
@@ -237,6 +229,15 @@
return (isrc->is_pic->pic_config_intr(isrc, trig, pol));
}
+static void
+intr_disable_src(void *arg)
+{
+ struct intsrc *isrc;
+
+ isrc = arg;
+ isrc->is_pic->pic_disable_source(isrc, PIC_EOI);
+}
+
#ifdef INTR_FILTER
void
intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame)
@@ -289,24 +290,6 @@
"too many stray irq %d's: not logging anymore\n",
isrc->is_pic->pic_vector(isrc));
}
-
-static void
-intr_eoi_src(void *arg)
-{
- struct intsrc *isrc;
-
- isrc = arg;
- isrc->is_pic->pic_eoi_source(isrc);
-}
-
-static void
-intr_disab_eoi_src(void *arg)
-{
- struct intsrc *isrc;
-
- isrc = arg;
- isrc->is_pic->pic_disable_source(isrc, PIC_EOI);
-}
#else
void
intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame)
==== //depot/projects/bdb/sys/amd64/include/atomic.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/atomic.h,v 1.44 2006/12/29 15:29:49 bde Exp $
+ * $FreeBSD: src/sys/amd64/include/atomic.h,v 1.45 2008/03/16 21:20:48 pjd Exp $
*/
#ifndef _MACHINE_ATOMIC_H_
#define _MACHINE_ATOMIC_H_
@@ -74,6 +74,7 @@
int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src);
int atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src);
u_int atomic_fetchadd_int(volatile u_int *p, u_int v);
+u_long atomic_fetchadd_long(volatile u_long *p, u_long v);
#define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \
u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p); \
@@ -174,6 +175,25 @@
return (v);
}
+/*
+ * Atomically add the value of v to the long integer pointed to by p and return
+ * the previous value of *p.
+ */
+static __inline u_long
+atomic_fetchadd_long(volatile u_long *p, u_long v)
+{
+
+ __asm __volatile(
+ " " MPLOCKED " "
+ " xaddq %0, %1 ; "
+ "# atomic_fetchadd_long"
+ : "+r" (v), /* 0 (result) */
+ "=m" (*p) /* 1 */
+ : "m" (*p)); /* 2 */
+
+ return (v);
+}
+
#if defined(_KERNEL) && !defined(SMP)
/*
==== //depot/projects/bdb/sys/arm/arm/intr.c#3 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.18 2008/03/14 19:41:46 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.19 2008/03/17 22:42:00 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/syslog.h>
@@ -50,6 +50,8 @@
#include <machine/intr.h>
#include <machine/cpu.h>
+typedef void (*mask_fn)(void *);
+
static struct intr_event *intr_events[NIRQ];
static int intrcnt_tab[NIRQ];
static int intrcnt_index = 0;
@@ -57,27 +59,6 @@
void arm_handler_execute(struct trapframe *, int);
-#ifdef INTR_FILTER
-static void
-intr_disab_eoi_src(void *arg)
-{
- uintptr_t nb;
-
- nb = (uintptr_t)arg;
- arm_mask_irq(nb);
-}
-
-static void
-intr_eoi_src(void *arg)
-{
- uintptr_t nb;
-
- nb = (uintptr_t)arg;
- arm_unmask_irq(nb);
-}
-
-#endif
-
void
arm_setup_irqhandler(const char *name, driver_filter_t *filt,
void (*hand)(void*), void *arg, int irq, int flags, void **cookiep)
@@ -89,14 +70,9 @@
return;
event = intr_events[irq];
if (event == NULL) {
-#ifdef INTR_FILTER
error = intr_event_create(&event, (void *)irq, 0,
- (void (*)(void *))arm_unmask_irq, intr_eoi_src,
- intr_disab_eoi_src, NULL, "intr%d:", irq);
-#else
- error = intr_event_create(&event, (void *)irq, 0,
- (void (*)(void *))arm_unmask_irq, NULL, "intr%d:", irq);
-#endif
+ (mask_fn)arm_mask_irq, (mask_fn)arm_unmask_irq,
+ (mask_fn)arm_unmask_irq, NULL, "intr%d:", irq);
if (error)
return;
intr_events[irq] = event;
==== //depot/projects/bdb/sys/cam/scsi/scsi_ses.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.36 2008/02/20 19:49:46 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.37 2008/03/17 17:18:16 scottl Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -144,9 +144,9 @@
encvec ses_vec; /* vector to handlers */
void * ses_private; /* per-type private data */
encobj * ses_objmap; /* objects */
- u_int32_t ses_nobjects; /* number of objects */
+ uint32_t ses_nobjects; /* number of objects */
ses_encstat ses_encstat; /* overall status */
- u_int8_t ses_flags;
+ uint8_t ses_flags;
union ccb ses_saved_ccb;
struct cdev *ses_dev;
struct cam_periph *periph;
@@ -166,9 +166,9 @@
static periph_dtor_t sescleanup;
static periph_start_t sesstart;
-static void sesasync(void *, u_int32_t, struct cam_path *, void *);
+static void sesasync(void *, uint32_t, struct cam_path *, void *);
static void sesdone(struct cam_periph *, union ccb *);
-static int seserror(union ccb *, u_int32_t, u_int32_t);
+static int seserror(union ccb *, uint32_t, uint32_t);
static struct periph_driver sesdriver = {
sesinit, "ses",
@@ -234,7 +234,7 @@
}
static void
-sesasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
+sesasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg)
{
struct cam_periph *periph;
@@ -303,7 +303,7 @@
return (CAM_REQ_CMP_ERR);
}
- softc = malloc(sizeof (struct ses_softc), M_SCSISES, M_NOWAIT);
+ softc = SES_MALLOC(sizeof (struct ses_softc));
if (softc == NULL) {
printf("sesregister: Unable to probe new device. "
"Unable to allocate softc\n");
@@ -472,7 +472,7 @@
}
static int
-seserror(union ccb *ccb, u_int32_t cflags, u_int32_t sflags)
+seserror(union ccb *ccb, uint32_t cflags, uint32_t sflags)
{
struct ses_softc *softc;
struct cam_periph *periph;
@@ -489,7 +489,7 @@
struct cam_periph *periph;
ses_encstat tmp;
ses_objstat objs;
- ses_object obj, *uobj;
+ ses_object *uobj;
struct ses_softc *ssc;
void *addr;
int error, i;
@@ -511,6 +511,9 @@
/*
* Now check to see whether we're initialized or not.
+ * This actually should never fail as we're not supposed
+ * to get past ses_open w/o successfully initializing
+ * things.
*/
if ((ssc->ses_flags & SES_FLAG_INITIALIZED) == 0) {
cam_periph_unlock(periph);
@@ -526,6 +529,14 @@
/*
* If this command can change the device's state,
* we must have the device open for writing.
+ *
+ * For commands that get information about the
+ * device- we don't need to lock the peripheral
+ * if we aren't running a command. The number
+ * of objects and the contents will stay stable
+ * after the first open that does initialization.
+ * The periph also can't go away while a user
+ * process has it open.
*/
switch (cmd) {
case SESIOC_GETNOBJ:
@@ -546,23 +557,16 @@
break;
case SESIOC_GETOBJMAP:
- /*
- * XXX Dropping the lock while copying multiple segments is
- * bogus.
- */
- cam_periph_lock(periph);
- for (uobj = addr, i = 0; i != ssc->ses_nobjects; i++, uobj++) {
- obj.obj_id = i;
- obj.subencid = ssc->ses_objmap[i].subenclosure;
- obj.object_type = ssc->ses_objmap[i].enctype;
- cam_periph_unlock(periph);
- error = copyout(&obj, uobj, sizeof (ses_object));
- cam_periph_lock(periph);
+ for (uobj = addr, i = 0; i != ssc->ses_nobjects; i++) {
+ ses_object kobj;
+ kobj.obj_id = i;
+ kobj.subencid = ssc->ses_objmap[i].subenclosure;
+ kobj.object_type = ssc->ses_objmap[i].enctype;
+ error = copyout(&kobj, &uobj[i], sizeof (ses_object));
if (error) {
break;
}
}
- cam_periph_unlock(periph);
break;
case SESIOC_GETENCSTAT:
==== //depot/projects/bdb/sys/compat/svr4/svr4_fcntl.c#2 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_fcntl.c,v 1.43 2008/01/13 14:44:01 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_fcntl.c,v 1.44 2008/03/17 18:27:28 antoine Exp $");
#include "opt_mac.h"
@@ -79,6 +79,8 @@
switch (cmd) {
case SVR4_F_DUPFD:
return F_DUPFD;
+ case SVR4_F_DUP2FD:
+ return F_DUP2FD;
case SVR4_F_GETFD:
return F_GETFD;
case SVR4_F_SETFD:
@@ -584,6 +586,7 @@
switch (cmd) {
case F_DUPFD:
+ case F_DUP2FD:
case F_GETFD:
case F_SETFD:
return (kern_fcntl(td, uap->fd, cmd, (intptr_t)uap->arg));
@@ -637,19 +640,6 @@
}
case -1:
switch (uap->cmd) {
- case SVR4_F_DUP2FD:
- {
- struct dup2_args du;
-
- du.from = uap->fd;
- du.to = (int)uap->arg;
- error = dup2(td, &du);
- if (error)
- return error;
- *retval = du.to;
- return 0;
- }
-
case SVR4_F_FREESP:
{
struct svr4_flock ifl;
==== //depot/projects/bdb/sys/conf/files#3 (text+ko) ====
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list