From owner-p4-projects@FreeBSD.ORG Sun Dec 26 00:11:51 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E809A16A4D0; Sun, 26 Dec 2004 00:11:50 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A806916A4CE for ; Sun, 26 Dec 2004 00:11:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7ED4843D46 for ; Sun, 26 Dec 2004 00:11:50 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBQ0BoOv074413 for ; Sun, 26 Dec 2004 00:11:50 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBQ0BoG0074410 for perforce@freebsd.org; Sun, 26 Dec 2004 00:11:50 GMT (envelope-from sam@freebsd.org) Date: Sun, 26 Dec 2004 00:11:50 GMT Message-Id: <200412260011.iBQ0BoG0074410@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67701 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2004 00:11:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=67701 Change 67701 by sam@sam_ebb on 2004/12/26 00:11:16 recognize atheros ie's Affected files ... .. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#34 edit Differences ... ==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#34 (text+ko) ==== @@ -759,6 +759,8 @@ printie(" WPA", vp, 2+vp[1], maxcols); else if (iswmeoui(vp)) printie(" WME", vp, 2+vp[1], maxcols); + else if (isatherosoui(vp)) + printie(" ATH", vp, 2+vp[1], maxcols); else printie(" VEN", vp, 2+vp[1], maxcols); break; From owner-p4-projects@FreeBSD.ORG Sun Dec 26 09:55:43 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 96FBA16A4D0; Sun, 26 Dec 2004 09:55:42 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67EA916A4CE for ; Sun, 26 Dec 2004 09:55:42 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F84F43D1F for ; Sun, 26 Dec 2004 09:55:42 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBQ9tgSh013298 for ; Sun, 26 Dec 2004 09:55:42 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBQ9tfSg013295 for perforce@freebsd.org; Sun, 26 Dec 2004 09:55:41 GMT (envelope-from davidxu@freebsd.org) Date: Sun, 26 Dec 2004 09:55:41 GMT Message-Id: <200412260955.iBQ9tfSg013295@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67717 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2004 09:55:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=67717 Change 67717 by davidxu@davidxu_tiger on 2004/12/26 09:55:16 Turn on default system optimization options. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/Makefile#7 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/Makefile#7 (text+ko) ==== @@ -13,7 +13,6 @@ LIB=thread .endif SHLIB_MAJOR= 1 -CFLAGS= CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ -I${.CURDIR}/../../include From owner-p4-projects@FreeBSD.ORG Sun Dec 26 12:16:33 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E201B16A4D0; Sun, 26 Dec 2004 12:16:32 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A101E16A4CE for ; Sun, 26 Dec 2004 12:16:32 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FE8B43D48 for ; Sun, 26 Dec 2004 12:16:32 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBQCGW10019993 for ; Sun, 26 Dec 2004 12:16:32 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBQCGW4l019990 for perforce@freebsd.org; Sun, 26 Dec 2004 12:16:32 GMT (envelope-from davidxu@freebsd.org) Date: Sun, 26 Dec 2004 12:16:32 GMT Message-Id: <200412261216.iBQCGW4l019990@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67720 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2004 12:16:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=67720 Change 67720 by davidxu@davidxu_tiger on 2004/12/26 12:16:02 [EAGAIN] The mutex could not be acquired because the maximum number of recursive locks for mutex has been exceeded. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#6 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#6 (text+ko) ==== @@ -936,8 +936,11 @@ case PTHREAD_MUTEX_RECURSIVE: /* Increment the lock count: */ - m->m_count++; - ret = 0; + if (m->m_count + 1 > 0) { + m->m_count++; + ret = 0; + } else + ret = EAGAIN; break; default: @@ -982,7 +985,11 @@ case PTHREAD_MUTEX_RECURSIVE: /* Increment the lock count: */ - m->m_count++; + if (m->m_count + 1 > 0) { + m->m_count++; + ret = 0; + } else + ret = EAGAIN; break; default: From owner-p4-projects@FreeBSD.ORG Mon Dec 27 03:14:41 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 34B9316A4D0; Mon, 27 Dec 2004 03:14:41 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF3B716A4CE for ; Mon, 27 Dec 2004 03:14:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B774443D3F for ; Mon, 27 Dec 2004 03:14:40 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBR3EeP7076108 for ; Mon, 27 Dec 2004 03:14:40 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBR3EeoX076105 for perforce@freebsd.org; Mon, 27 Dec 2004 03:14:40 GMT (envelope-from davidxu@freebsd.org) Date: Mon, 27 Dec 2004 03:14:40 GMT Message-Id: <200412270314.iBR3EeoX076105@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67741 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2004 03:14:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=67741 Change 67741 by davidxu@davidxu_celeron on 2004/12/27 03:14:19 use umtx_init. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_pspinlock.c#5 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_pspinlock.c#5 (text+ko) ==== @@ -50,7 +50,7 @@ else if ((lck = malloc(sizeof(struct pthread_spinlock))) == NULL) ret = ENOMEM; else { - UMTX_INIT(&lck->s_lock); + umtx_init(&lck->s_lock); *lock = lck; ret = 0; } From owner-p4-projects@FreeBSD.ORG Tue Dec 28 06:27:44 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 408F116A4D0; Tue, 28 Dec 2004 06:27:44 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1970D16A4CE for ; Tue, 28 Dec 2004 06:27:44 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E62AC43D5C for ; Tue, 28 Dec 2004 06:27:43 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBS6RhxH095252 for ; Tue, 28 Dec 2004 06:27:43 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBS6Rh4G095249 for perforce@freebsd.org; Tue, 28 Dec 2004 06:27:43 GMT (envelope-from sam@freebsd.org) Date: Tue, 28 Dec 2004 06:27:43 GMT Message-Id: <200412280627.iBS6Rh4G095249@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67782 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 06:27:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=67782 Change 67782 by sam@sam_ebb on 2004/12/28 06:27:05 o add gross hack to handle radiotap capture of frames that come in with hardware padding; should be replaced by a flag in the radiotap header and more smarts in the apps that decode radiotap data o shorten some assertion strings by removing function names Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#47 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#18 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#47 (text+ko) ==== @@ -1632,10 +1632,8 @@ { struct ath_buf *bf = arg; - KASSERT(nseg <= ATH_MAX_SCATTER, - ("%s: too many DMA segments %u", __func__, nseg)); - KASSERT(error == 0, - ("%s: error %u on bus_dma callback", __func__, error)); + KASSERT(nseg <= ATH_MAX_SCATTER, ("too many DMA segments %u", nseg)); + KASSERT(error == 0, ("error %u on bus_dma callback", error)); bf->bf_mapsize = mapsize; bf->bf_nseg = nseg; bcopy(seg, bf->bf_segs, nseg * sizeof (seg[0])); @@ -2090,8 +2088,7 @@ ath_load_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { bus_addr_t *paddr = (bus_addr_t*) arg; - KASSERT(error == 0, - ("%s: error %u on bus_dma callback", __func__, error)); + KASSERT(error == 0, ("error %u on bus_dma callback", error)); *paddr = segs->ds_addr; } @@ -2357,7 +2354,6 @@ sc->sc_stats.ast_rx_nombuf++; return ENOMEM; } - KASSERT(m->m_next == NULL, ("m_next %p (1)", m->m_next)); bf->bf_m = m; m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; @@ -2372,8 +2368,8 @@ sc->sc_stats.ast_rx_busdma++; return error; } - KASSERT(bf->bf_nseg == 1, ("%s: multi-segment packet; nseg %u", - __func__, bf->bf_nseg)); + KASSERT(bf->bf_nseg == 1, + ("multi-segment packet; nseg %u", bf->bf_nseg)); } bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREREAD); @@ -2594,7 +2590,6 @@ goto rx_next; } rx_accept: - KASSERT(m->m_next == NULL, ("m_next %p (3)", m->m_next)); /* * Sync and unmap the frame. At this point we're * committed to passing the mbuf somewhere so clear @@ -2616,6 +2611,9 @@ sc->sc_stats.ast_ant_rx[ds->ds_rxstat.rs_antenna]++; if (sc->sc_drvbpf) { + const void *data; + int hdrsize, hdrspace; + /* * Discard anything shorter than an ack or cts. */ @@ -2633,8 +2631,33 @@ sc->sc_rx_th.wr_antenna = ds->ds_rxstat.rs_antenna; /* XXX TSF */ - bpf_mtap2(sc->sc_drvbpf, - &sc->sc_rx_th, sc->sc_rx_th_len, m); + /* + * Gag, deal with hardware padding of headers. This + * only happens for QoS frames. We copy the 802.11 + * header out-of-line and supply it separately, then + * adjust the mbuf chain. It would be better if we + * could just flag the packet in the radiotap header + * and have applications DTRT. + */ + if (len > sizeof(struct ieee80211_qosframe)) { + data = mtod(m, const void *); + hdrsize = ieee80211_anyhdrsize(data); + if (hdrsize & 3) { + bcopy(data, &sc->sc_rx_wh, hdrsize); + hdrspace = roundup(hdrsize, + sizeof(u_int32_t)); + m->m_data += hdrspace; + m->m_len -= hdrspace; + bpf_mtap2(sc->sc_drvbpf, &sc->sc_rx, + sc->sc_rx_rt_len + hdrsize, m); + m->m_data -= hdrspace; + m->m_len += hdrspace; + } else + bpf_mtap2(sc->sc_drvbpf, + &sc->sc_rx, sc->sc_rx_rt_len, m); + } else + bpf_mtap2(sc->sc_drvbpf, + &sc->sc_rx, sc->sc_rx_rt_len, m); } /* @@ -2986,8 +3009,7 @@ return error; } KASSERT(bf->bf_nseg == 1, - ("ath_tx_start: packet not one segment; nseg %u", - bf->bf_nseg)); + ("packet not one segment; nseg %u", bf->bf_nseg)); } else if (bf->bf_nseg == 0) { /* null packet, discard */ sc->sc_stats.ast_tx_nodata++; m_freem(m0); @@ -4491,8 +4513,8 @@ sc->sc_tx_th.wt_ihdr.it_len = htole16(sc->sc_tx_th_len); sc->sc_tx_th.wt_ihdr.it_present = htole32(ATH_TX_RADIOTAP_PRESENT); - sc->sc_rx_th_len = roundup(sizeof(sc->sc_rx_th), sizeof(u_int32_t)); - sc->sc_rx_th.wr_ihdr.it_len = htole16(sc->sc_rx_th_len); + sc->sc_rx_rt_len = roundup(sizeof(sc->sc_rx_th), sizeof(u_int32_t)); + sc->sc_rx_th.wr_ihdr.it_len = htole16(sc->sc_rx_rt_len); sc->sc_rx_th.wr_ihdr.it_present = htole32(ATH_RX_RADIOTAP_PRESENT); } ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#18 (text+ko) ==== @@ -199,10 +199,13 @@ } u_tx_rt; int sc_tx_th_len; union { - struct ath_rx_radiotap_header th; + struct { + struct ath_rx_radiotap_header th; + struct ieee80211_qosframe wh; + } u; u_int8_t pad[64]; } u_rx_rt; - int sc_rx_th_len; + int sc_rx_rt_len; struct task sc_fataltask; /* fatal int processing */ @@ -244,7 +247,9 @@ }; #define sc_if sc_arp.ac_if #define sc_tx_th u_tx_rt.th -#define sc_rx_th u_rx_rt.th +#define sc_rx u_rx_rt.u +#define sc_rx_th sc_rx.th +#define sc_rx_wh sc_rx.wh #define ATH_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ From owner-p4-projects@FreeBSD.ORG Tue Dec 28 15:51:06 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA30616A4D0; Tue, 28 Dec 2004 15:51:05 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E69D16A4CE for ; Tue, 28 Dec 2004 15:51:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE56F43D2D for ; Tue, 28 Dec 2004 15:51:04 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSFp42Y027697 for ; Tue, 28 Dec 2004 15:51:04 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSFp34E027694 for perforce@freebsd.org; Tue, 28 Dec 2004 15:51:03 GMT (envelope-from jhb@freebsd.org) Date: Tue, 28 Dec 2004 15:51:03 GMT Message-Id: <200412281551.iBSFp34E027694@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 67789 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 15:51:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=67789 Change 67789 by jhb@jhb_slimer on 2004/12/28 15:50:43 IFC @67788. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/machdep.c#75 integrate .. //depot/projects/smpng/sys/amd64/amd64/vm_machdep.c#21 integrate .. //depot/projects/smpng/sys/amd64/isa/isa.c#5 integrate .. //depot/projects/smpng/sys/conf/files#130 integrate .. //depot/projects/smpng/sys/conf/majors#42 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/fil.c#15 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_auth.c#12 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_compat.h#10 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.c#18 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.h#10 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_frag.c#10 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_log.c#10 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_nat.h#8 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_proxy.c#10 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_state.c#11 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_state.h#7 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/mlfk_ipl.c#6 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi.c#76 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_ec.c#33 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#26 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcib.c#28 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcib_pci.c#9 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_powerres.c#20 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_resource.c#22 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#47 integrate .. //depot/projects/smpng/sys/dev/ata/ata-lowlevel.c#22 integrate .. //depot/projects/smpng/sys/dev/md/md.c#60 integrate .. //depot/projects/smpng/sys/dev/ofw/ofw_disk.c#14 integrate .. //depot/projects/smpng/sys/dev/sound/usb/uaudio.c#4 integrate .. //depot/projects/smpng/sys/dev/sound/usb/uaudio.h#2 integrate .. //depot/projects/smpng/sys/dev/sound/usb/uaudio_pcm.c#6 integrate .. //depot/projects/smpng/sys/dev/sound/usb/uaudioreg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#68 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#14 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#10 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.h#5 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3_ctl.c#4 integrate .. //depot/projects/smpng/sys/i386/i386/vm_machdep.c#57 integrate .. //depot/projects/smpng/sys/i386/isa/isa.c#9 integrate .. //depot/projects/smpng/sys/isa/isa_common.c#14 integrate .. //depot/projects/smpng/sys/isa/isa_common.h#5 integrate .. //depot/projects/smpng/sys/isa/pnp.c#9 integrate .. //depot/projects/smpng/sys/isa/pnpvar.h#3 integrate .. //depot/projects/smpng/sys/kern/init_sysent.c#51 integrate .. //depot/projects/smpng/sys/kern/kern_clock.c#38 integrate .. //depot/projects/smpng/sys/kern/kern_kse.c#14 integrate .. //depot/projects/smpng/sys/kern/kern_switch.c#53 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#87 integrate .. //depot/projects/smpng/sys/kern/kern_umtx.c#14 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#43 integrate .. //depot/projects/smpng/sys/kern/sched_ule.c#48 integrate .. //depot/projects/smpng/sys/kern/subr_trap.c#74 integrate .. //depot/projects/smpng/sys/kern/subr_witness.c#124 integrate .. //depot/projects/smpng/sys/kern/syscalls.c#51 integrate .. //depot/projects/smpng/sys/kern/syscalls.master#52 integrate .. //depot/projects/smpng/sys/kern/vfs_mount.c#41 integrate .. //depot/projects/smpng/sys/modules/ipfilter/Makefile#7 integrate .. //depot/projects/smpng/sys/modules/sppp/Makefile#4 integrate .. //depot/projects/smpng/sys/net/bpf.c#44 integrate .. //depot/projects/smpng/sys/net/if_sppp.h#4 integrate .. //depot/projects/smpng/sys/net/if_spppfr.c#1 branch .. //depot/projects/smpng/sys/net/if_spppsubr.c#23 integrate .. //depot/projects/smpng/sys/netgraph/netflow/netflow.c#3 integrate .. //depot/projects/smpng/sys/netgraph/ng_device.c#12 integrate .. //depot/projects/smpng/sys/netgraph/ng_sample.c#8 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#68 integrate .. //depot/projects/smpng/sys/netinet/tcp_input.c#65 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_vnops.c#46 integrate .. //depot/projects/smpng/sys/pci/if_sk.c#40 integrate .. //depot/projects/smpng/sys/sparc64/include/ver.h#5 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/identcpu.c#13 integrate .. //depot/projects/smpng/sys/sys/ktr.h#18 integrate .. //depot/projects/smpng/sys/sys/mdioctl.h#12 integrate .. //depot/projects/smpng/sys/sys/syscall.h#50 integrate .. //depot/projects/smpng/sys/sys/syscall.mk#50 integrate .. //depot/projects/smpng/sys/sys/sysproto.h#52 integrate .. //depot/projects/smpng/sys/sys/umtx.h#6 integrate .. //depot/projects/smpng/sys/vm/uma.h#13 integrate .. //depot/projects/smpng/sys/vm/uma_core.c#51 integrate .. //depot/projects/smpng/sys/vm/uma_dbg.c#11 integrate .. //depot/projects/smpng/sys/vm/uma_dbg.h#4 integrate .. //depot/projects/smpng/sys/vm/uma_int.h#23 integrate .. //depot/projects/smpng/sys/vm/vm_fault.c#45 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#59 integrate .. //depot/projects/smpng/sys/vm/vm_page.h#28 integrate .. //depot/projects/smpng/sys/vm/vnode_pager.c#46 integrate .. //depot/user/jhb/clock/notes#22 edit .. //depot/user/jhb/needresched/alpha/alpha/pmap.c#4 integrate .. //depot/user/jhb/needresched/amd64/amd64/pmap.c#6 integrate .. //depot/user/jhb/needresched/arm/arm/pmap.c#5 integrate .. //depot/user/jhb/needresched/arm/conf/SIMICS#6 integrate .. //depot/user/jhb/needresched/arm/include/atomic.h#4 integrate .. //depot/user/jhb/needresched/arm/sa11x0/assabet_machdep.c#5 integrate .. //depot/user/jhb/needresched/arm/sa11x0/sa11x0_irqhandler.c#3 integrate .. //depot/user/jhb/needresched/arm/xscale/i80321/i80321_pci.c#2 integrate .. //depot/user/jhb/needresched/boot/Makefile#3 integrate .. //depot/user/jhb/needresched/boot/alpha/boot1/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/alpha/cdboot/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/alpha/common/Makefile.common#2 integrate .. //depot/user/jhb/needresched/boot/alpha/netboot/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/arc/loader/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/i386/boot0/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/i386/btx/btx/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/i386/btx/btxldr/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/i386/btx/lib/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/i386/cdboot/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/i386/kgzldr/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/i386/loader/Makefile#3 integrate .. //depot/user/jhb/needresched/boot/i386/mbr/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/ia64/efi/Makefile#3 integrate .. //depot/user/jhb/needresched/boot/ia64/ski/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/boot0.5/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/boot0/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/boot2/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/btx/btx/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/btx/btxldr/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/btx/lib/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/kgzldr/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/pc98/loader/Makefile#3 integrate .. //depot/user/jhb/needresched/boot/powerpc/loader/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/sparc64/boot1/Makefile#2 integrate .. //depot/user/jhb/needresched/boot/sparc64/loader/Makefile#2 integrate .. //depot/user/jhb/needresched/conf/NOTES#6 integrate .. //depot/user/jhb/needresched/conf/files.amd64#5 integrate .. //depot/user/jhb/needresched/contrib/ipfilter/netinet/fil.c#2 integrate .. //depot/user/jhb/needresched/contrib/ipfilter/netinet/ip_nat.c#2 integrate .. //depot/user/jhb/needresched/contrib/pf/net/pf.c#6 integrate .. //depot/user/jhb/needresched/crypto/rijndael/Makefile#3 integrate .. //depot/user/jhb/needresched/dev/acpica/acpi_cmbat.c#4 integrate .. //depot/user/jhb/needresched/dev/acpica/acpi_pci_link.c#5 integrate .. //depot/user/jhb/needresched/dev/aic7xxx/aicasm/Makefile#3 integrate .. //depot/user/jhb/needresched/dev/bge/if_bge.c#7 integrate .. //depot/user/jhb/needresched/dev/bge/if_bgereg.h#4 integrate .. //depot/user/jhb/needresched/dev/bktr/bktr_card.c#2 integrate .. //depot/user/jhb/needresched/dev/bktr/bktr_card.h#2 integrate .. //depot/user/jhb/needresched/dev/bktr/bktr_tuner.c#2 integrate .. //depot/user/jhb/needresched/dev/bktr/bktr_tuner.h#2 integrate .. //depot/user/jhb/needresched/dev/bktr/msp34xx.c#2 integrate .. //depot/user/jhb/needresched/dev/fxp/if_fxp.c#3 integrate .. //depot/user/jhb/needresched/dev/hptmv/entry.c#2 integrate .. //depot/user/jhb/needresched/dev/kbd/atkbd.c#2 integrate .. //depot/user/jhb/needresched/dev/kbd/atkbdreg.h#2 integrate .. //depot/user/jhb/needresched/dev/kbd/kbd.c#2 integrate .. //depot/user/jhb/needresched/dev/mpt/mpt_pci.c#2 integrate .. //depot/user/jhb/needresched/dev/nmdm/nmdm.c#3 integrate .. //depot/user/jhb/needresched/dev/ofw/ofw_disk.c#2 integrate .. //depot/user/jhb/needresched/dev/patm/genrtab/Makefile#3 integrate .. //depot/user/jhb/needresched/dev/pccbb/pccbb_pci.c#2 integrate .. //depot/user/jhb/needresched/dev/pccbb/pccbbdevid.h#2 integrate .. //depot/user/jhb/needresched/dev/random/randomdev.c#2 integrate .. //depot/user/jhb/needresched/dev/random/randomdev_soft.c#7 integrate .. //depot/user/jhb/needresched/dev/snp/snp.c#4 integrate .. //depot/user/jhb/needresched/dev/sound/usb/uaudio.c#2 integrate .. //depot/user/jhb/needresched/dev/twe/twe.c#2 integrate .. //depot/user/jhb/needresched/dev/twe/tweio.h#2 integrate .. //depot/user/jhb/needresched/dev/usb/ehci.c#5 integrate .. //depot/user/jhb/needresched/dev/usb/ugen.c#7 integrate .. //depot/user/jhb/needresched/dev/usb/uhid.c#4 integrate .. //depot/user/jhb/needresched/dev/usb/ums.c#3 integrate .. //depot/user/jhb/needresched/dev/usb/usb.c#3 integrate .. //depot/user/jhb/needresched/dev/usb/usbdevs#6 integrate .. //depot/user/jhb/needresched/dev/vkbd/vkbd.c#2 integrate .. //depot/user/jhb/needresched/dev/wi/if_wi.c#3 integrate .. //depot/user/jhb/needresched/fs/devfs/devfs_vnops.c#5 integrate .. //depot/user/jhb/needresched/geom/geom.h#5 integrate .. //depot/user/jhb/needresched/geom/mirror/g_mirror.c#12 integrate .. //depot/user/jhb/needresched/geom/mirror/g_mirror.h#4 integrate .. //depot/user/jhb/needresched/geom/mirror/g_mirror_ctl.c#2 integrate .. //depot/user/jhb/needresched/geom/raid3/g_raid3.c#10 integrate .. //depot/user/jhb/needresched/i386/i386/intr_machdep.c#4 integrate .. //depot/user/jhb/needresched/i386/i386/local_apic.c#4 integrate .. //depot/user/jhb/needresched/i386/i386/mp_machdep.c#5 integrate .. //depot/user/jhb/needresched/i386/i386/pmap.c#8 integrate .. //depot/user/jhb/needresched/i386/include/apicreg.h#2 integrate .. //depot/user/jhb/needresched/i386/include/apicvar.h#4 integrate .. //depot/user/jhb/needresched/i386/include/intr_machdep.h#2 integrate .. //depot/user/jhb/needresched/ia64/ia64/pmap.c#5 integrate .. //depot/user/jhb/needresched/kern/init_sysent.c#6 integrate .. //depot/user/jhb/needresched/kern/kern_umtx.c#3 integrate .. //depot/user/jhb/needresched/kern/syscalls.c#6 integrate .. //depot/user/jhb/needresched/kern/syscalls.master#6 integrate .. //depot/user/jhb/needresched/kern/tty.c#8 integrate .. //depot/user/jhb/needresched/kern/tty_pty.c#3 integrate .. //depot/user/jhb/needresched/kern/uipc_sem.c#2 integrate .. //depot/user/jhb/needresched/kern/uipc_socket.c#7 integrate .. //depot/user/jhb/needresched/kern/uipc_socket2.c#4 integrate .. //depot/user/jhb/needresched/kern/uipc_usrreq.c#5 integrate .. //depot/user/jhb/needresched/kern/vfs_mount.c#8 integrate .. //depot/user/jhb/needresched/kern/vfs_subr.c#8 integrate .. //depot/user/jhb/needresched/modules/Makefile#6 integrate .. //depot/user/jhb/needresched/modules/acpi/acpi_video/Makefile#2 integrate .. //depot/user/jhb/needresched/modules/cp/Makefile#2 integrate .. //depot/user/jhb/needresched/modules/if_gif/Makefile#3 integrate .. //depot/user/jhb/needresched/modules/ipfilter/Makefile#2 integrate .. //depot/user/jhb/needresched/modules/netgraph/Makefile#3 integrate .. //depot/user/jhb/needresched/modules/netgraph/fec/sample_startup#2 delete .. //depot/user/jhb/needresched/modules/pf/Makefile#2 integrate .. //depot/user/jhb/needresched/modules/wlan_ccmp/Makefile#2 integrate .. //depot/user/jhb/needresched/net/bpf.c#4 integrate .. //depot/user/jhb/needresched/net/if_tap.c#3 integrate .. //depot/user/jhb/needresched/net/if_tun.c#4 integrate .. //depot/user/jhb/needresched/net/ppp_tty.c#3 integrate .. //depot/user/jhb/needresched/netgraph/ng_base.c#5 integrate .. //depot/user/jhb/needresched/netgraph/ng_sample.c#2 integrate .. //depot/user/jhb/needresched/netinet/tcp_subr.c#8 integrate .. //depot/user/jhb/needresched/netinet/tcp_timer.c#5 integrate .. //depot/user/jhb/needresched/netinet/tcp_var.h#4 integrate .. //depot/user/jhb/needresched/nfsclient/nfs.h#4 integrate .. //depot/user/jhb/needresched/nfsclient/nfs_bio.c#6 integrate .. //depot/user/jhb/needresched/nfsclient/nfs_nfsiod.c#3 integrate .. //depot/user/jhb/needresched/nfsclient/nfs_vfsops.c#6 integrate .. //depot/user/jhb/needresched/nfsclient/nfs_vnops.c#5 integrate .. //depot/user/jhb/needresched/nfsclient/nfsnode.h#5 integrate .. //depot/user/jhb/needresched/pc98/pc98/fd.c#5 integrate .. //depot/user/jhb/needresched/pci/if_sk.c#5 integrate .. //depot/user/jhb/needresched/powerpc/powerpc/pmap.c#3 integrate .. //depot/user/jhb/needresched/sparc64/sparc64/pmap.c#4 integrate .. //depot/user/jhb/needresched/sys/mutex.h#2 integrate .. //depot/user/jhb/needresched/sys/proc.h#10 integrate .. //depot/user/jhb/needresched/sys/syscall.h#5 integrate .. //depot/user/jhb/needresched/sys/syscall.mk#5 integrate .. //depot/user/jhb/needresched/sys/sysproto.h#5 integrate .. //depot/user/jhb/needresched/sys/umtx.h#2 integrate .. //depot/user/jhb/needresched/sys/vnode.h#6 integrate .. //depot/user/jhb/needresched/vm/vm_fault.c#4 integrate .. //depot/user/jhb/needresched/vm/vm_map.c#3 integrate .. //depot/user/jhb/needresched/vm/vm_meter.c#3 integrate .. //depot/user/jhb/needresched/vm/vm_object.c#6 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/machdep.c#75 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.226 2004/11/27 06:51:32 das Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.227 2004/12/26 13:23:01 wilko Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -338,7 +338,7 @@ "EV3", /* 1 */ "EV4 (21064)", /* 2 */ "Simulation", /* 3 */ - "LCA Family", /* 4 */ + "LCA (21066/21068)", /* 4 */ "EV5 (21164)", /* 5 */ "EV45 (21064A)", /* 6 */ "EV56 (21164A)", /* 7 */ @@ -348,7 +348,8 @@ "EV67 (21264A)", /* 11 */ "EV68CB (21264C)" /* 12 */ "EV68AL (21264B)", /* 13 */ - "EV68CX (21264D)" /* 14 */ + "EV68CX (21264D)", /* 14 */ + "EV7 (21364)" /* 15 */ }; /* ==== //depot/projects/smpng/sys/amd64/amd64/vm_machdep.c#21 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.240 2004/11/30 20:25:46 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.242 2004/12/27 06:42:25 njl Exp $"); #include "opt_isa.h" #include "opt_cpu.h" @@ -79,6 +79,11 @@ #include static void cpu_reset_real(void); +#ifdef SMP +static void cpu_reset_proxy(void); +static u_int cpu_reset_proxyid; +static volatile u_int cpu_reset_proxy_active; +#endif /* * Finish a fork operation, with process p2 nearly set up. @@ -322,33 +327,58 @@ td->td_frame->tf_rdi = (register_t)ku->ku_mailbox; } +#ifdef SMP +static void +cpu_reset_proxy() +{ + + cpu_reset_proxy_active = 1; + while (cpu_reset_proxy_active == 1) + ; /* Wait for other cpu to see that we've started */ + stop_cpus((1<" */ ==== //depot/projects/smpng/sys/amd64/isa/isa.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/isa/isa.c,v 1.146 2004/03/17 21:45:55 jmg Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/isa/isa.c,v 1.147 2004/12/24 23:03:17 imp Exp $"); /* * Modifications for Intel architecture by Garrett A. Wollman. @@ -59,7 +59,9 @@ #include #include +#include #include +#include #include #include @@ -157,3 +159,8 @@ { return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); } + +/* + * On this platform, isa can also attach to the legacy bus. + */ +DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0); ==== //depot/projects/smpng/sys/conf/files#130 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.975 2004/12/09 13:54:28 takawata Exp $ +# $FreeBSD: src/sys/conf/files,v 1.976 2004/12/28 00:07:56 rik Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1251,6 +1251,8 @@ net/if_mib.c standard net/if_ppp.c optional ppp net/if_sl.c optional sl +net/if_spppfr.c optional sppp +net/if_spppfr.c optional i4bisppp net/if_spppsubr.c optional sppp net/if_spppsubr.c optional i4bisppp net/if_stf.c optional stf ==== //depot/projects/smpng/sys/conf/majors#42 (text+ko) ==== @@ -1,4 +1,7 @@ -# $FreeBSD: src/sys/conf/majors,v 1.203 2004/10/01 06:04:24 imp Exp $ +# $FreeBSD: src/sys/conf/majors,v 1.205 2004/12/27 18:58:57 imp Exp $ +# +# Major numbers are now assigned in RELENG_4. This file is left to +# rot in peace in current. # # This list is semi-obsoleted by DEVFS, but for now it still contains # the current allocation of device major numbers. ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/fil.c#15 (text+ko) ==== @@ -100,7 +100,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed"; -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.40 2004/12/16 21:02:15 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.42 2004/12/26 09:08:42 darrenr Exp $"; #endif #ifndef _KERNEL @@ -115,10 +115,10 @@ # define FR_VERBOSE(verb_pr) # define FR_DEBUG(verb_pr) # define IPLLOG(a, c, d, e) ipflog(a, c, d, e) -# if SOLARIS || defined(__sgi) +# ifdef USE_MUTEX extern KRWLOCK_T ipf_mutex, ipf_auth, ipf_nat; extern kmutex_t ipf_rw; -# endif /* SOLARIS || __sgi */ +# endif /* USE_MUTEX */ #endif /* _KERNEL */ @@ -1051,15 +1051,6 @@ fin->fin_out = out; #endif /* _KERNEL */ -#ifndef __FreeBSD__ - /* - * Be careful here: ip_id is in network byte order when called - * from ip_output() - */ - if ((out) && (v == 4)) - ip->ip_id = ntohs(ip->ip_id); -#endif - changed = 0; fin->fin_v = v; fin->fin_ifp = ifp; @@ -1305,11 +1296,6 @@ } #endif /* IPFILTER_LOG */ -#ifndef __FreeBSD__ - if ((out) && (v == 4)) - ip->ip_id = htons(ip->ip_id); -#endif - #ifdef _KERNEL /* * Only allow FR_DUP to work if a rule matched - it makes no sense to ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_auth.c#12 (text+ko) ==== @@ -105,11 +105,11 @@ #if !defined(lint) /* static const char rcsid[] = "@(#)$Id: ip_auth.c,v 2.11.2.12 2001/07/18 14:57:08 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_auth.c,v 1.36 2004/06/22 05:20:30 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_auth.c,v 1.38 2004/12/26 09:09:29 darrenr Exp $"; #endif -#if (SOLARIS || defined(__sgi)) && defined(_KERNEL) +#ifdef USE_MUTEX extern KRWLOCK_T ipf_auth, ipf_mutex; extern kmutex_t ipf_authmx; # if SOLARIS @@ -283,11 +283,6 @@ bo = ip->ip_len; ip->ip_len = htons(bo); -# if !SOLARIS && !defined(__NetBSD__) && !defined(__FreeBSD__) - /* 4.4BSD converts this ip_input.c, but I don't in solaris.c */ - bo = ip->ip_id; - ip->ip_id = htons(bo); -# endif bo = ip->ip_off; ip->ip_off = htons(bo); } ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_compat.h#10 (text+ko) ==== @@ -5,7 +5,7 @@ * * @(#)ip_compat.h 1.8 1/14/96 * $Id: ip_compat.h,v 2.26.2.9 2001/01/14 14:58:01 darrenr Exp $ - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.23 2004/06/21 22:46:35 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.24 2004/12/24 09:14:26 darrenr Exp $ */ #ifndef __IP_COMPAT_H__ @@ -424,6 +424,15 @@ # undef MUTEX_INIT # undef MUTEX_DESTROY #endif +#if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043) +# include +# include +# include +# define USE_MUTEX 1 +# define kmutex_t struct mtx +# define KRWLOCK_T struct sx +# define NETBSD_PF +#endif #ifdef KERNEL # if SOLARIS # if SOLARIS2 >= 6 @@ -449,6 +458,7 @@ mutex_exit(&ipf_rw); } # endif # define MUTEX_ENTER(x) mutex_enter(x) +# define USE_MUTEX 1 # if 1 # define KRWLOCK_T krwlock_t # define READ_ENTER(x) rw_enter(x, RW_READER) @@ -497,6 +507,7 @@ # define IFNAME(x) ((ill_t *)x)->ill_name # else /* SOLARIS */ # if defined(__sgi) +# define USE_MUTEX 1 # define ATOMIC_INC(x) { MUTEX_ENTER(&ipf_rw); \ (x)++; MUTEX_EXIT(&ipf_rw); } # define ATOMIC_DEC(x) { MUTEX_ENTER(&ipf_rw); \ @@ -512,17 +523,45 @@ # define MUTEX_INIT(x,y,z) (x)->l = LOCK_ALLOC((uchar_t)-1, IPF_LOCK_PL, (lkinfo_t *)-1, KM_NOSLEEP) # define MUTEX_DESTROY(x) LOCK_DEALLOC((x)->l) # else /* __sgi */ -# define ATOMIC_INC(x) (x)++ -# define ATOMIC_DEC(x) (x)-- -# define MUTEX_ENTER(x) ; -# define READ_ENTER(x) ; -# define WRITE_ENTER(x) ; -# define RW_UPGRADE(x) ; -# define MUTEX_DOWNGRADE(x) ; -# define RWLOCK_EXIT(x) ; -# define MUTEX_EXIT(x) ; -# define MUTEX_INIT(x,y,z) ; -# define MUTEX_DESTROY(x) ; +# if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043) +# include +# include +# include +# define USE_MUTEX 1 +# define kmutex_t struct mtx +# define KRWLOCK_T struct sx +# define ATOMIC_INC(x) { MUTEX_ENTER(&ipf_rw); \ + (x)++; MUTEX_EXIT(&ipf_rw); } +# define ATOMIC_DEC(x) { MUTEX_ENTER(&ipf_rw); \ + (x)--; MUTEX_EXIT(&ipf_rw); } +# define MUTEX_ENTER(x) mtx_lock(x) +# define READ_ENTER(x) sx_slock(x) +# define WRITE_ENTER(x) sx_xlock(x) +# define RW_UPGRADE(x) ; +# define MUTEX_DOWNGRADE(x) sx_downgrade(x) +# define RWLOCK_INIT(x, y, z) sx_init((x), (y)) +# define RWLOCK_EXIT(x) do { \ + if ((x)->sx_cnt < 0) \ + sx_xunlock(x); \ + else \ + sx_sunlock(x); \ + } while (0) +# define MUTEX_EXIT(x) mtx_unlock(x) +# define MUTEX_INIT(x,y,z) mtx_init((x), (y), NULL, MTX_DEF) +# define MUTEX_DESTROY(x) mtx_destroy(x) +# else +# define ATOMIC_INC(x) (x)++ +# define ATOMIC_DEC(x) (x)-- +# define MUTEX_ENTER(x) ; +# define READ_ENTER(x) ; +# define WRITE_ENTER(x) ; +# define RW_UPGRADE(x) ; +# define MUTEX_DOWNGRADE(x) ; +# define RWLOCK_EXIT(x) ; +# define MUTEX_EXIT(x) ; +# define MUTEX_INIT(x,y,z) ; +# define MUTEX_DESTROY(x) ; +# endif # endif /* __sgi */ # ifndef linux # define FREE_MB_T(m) m_freem(m) ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.c#18 (text+ko) ==== @@ -132,7 +132,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; /* static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.42.2.34 2001/07/23 13:49:57 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.49 2004/09/29 04:54:32 mlaier Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.51 2004/12/26 09:08:42 darrenr Exp $"; #endif extern struct protosw inetsw[]; @@ -169,6 +169,8 @@ # endif # ifdef __sgi extern int tcp_mtudisc; +# endif +# ifdef USE_MUTEX extern kmutex_t ipf_rw; extern KRWLOCK_T ipf_mutex; # endif ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.h#10 (text+ko) ==== @@ -5,7 +5,7 @@ * * @(#)ip_fil.h 1.35 6/5/96 * $Id: ip_fil.h,v 2.29.2.4 2000/11/12 11:54:53 darrenr Exp $ - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.27 2004/08/27 20:01:08 andre Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.29 2004/12/25 00:48:27 scottl Exp $ */ #ifndef __IP_FIL_H__ ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_frag.c#10 (text+ko) ==== @@ -90,7 +90,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed"; -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_frag.c,v 1.25 2004/06/21 22:46:35 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_frag.c,v 1.26 2004/12/24 09:14:26 darrenr Exp $"; #endif @@ -109,7 +109,7 @@ extern int ipfr_timer_id; # endif #endif -#if (SOLARIS || defined(__sgi)) && defined(_KERNEL) +#ifdef USE_MUTEX extern KRWLOCK_T ipf_frag, ipf_natfrag, ipf_nat, ipf_mutex; # if SOLARIS extern KRWLOCK_T ipf_solaris; ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_log.c#10 (text+ko) ==== @@ -4,7 +4,7 @@ * See the IPFILTER.LICENCE file for details on licencing. * * $Id: ip_log.c,v 2.5.2.1 2000/07/19 13:11:47 darrenr Exp $ - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_log.c,v 1.27 2004/06/21 22:46:35 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_log.c,v 1.28 2004/12/24 09:14:26 darrenr Exp $ */ #include #if defined(KERNEL) && !defined(_KERNEL) @@ -128,7 +128,7 @@ # endif -# if SOLARIS || defined(__sgi) +# if USE_MUTEX extern kmutex_t ipl_mutex; # if SOLARIS extern kcondvar_t iplwait; ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_nat.h#8 (text+ko) ==== @@ -5,7 +5,7 @@ * * @(#)ip_nat.h 1.5 2/4/96 * $Id: ip_nat.h,v 2.17.2.14 2000/11/18 03:58:04 darrenr Exp $ - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_nat.h,v 1.21 2004/06/21 22:46:36 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_nat.h,v 1.22 2004/12/24 09:14:26 darrenr Exp $ */ #ifndef __IP_NAT_H__ @@ -108,7 +108,7 @@ void *nat_ifp; int nat_dir; char nat_ifname[IFNAMSIZ]; -#if SOLARIS || defined(__sgi) +#if SOLARIS || defined(__sgi) || (__FreeBSD_version >= 500043) kmutex_t nat_lock; #endif } nat_t; ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_proxy.c#10 (text+ko) ==== @@ -77,10 +77,10 @@ #if !defined(lint) /* static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.9.2.6 2001/07/15 22:06:15 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_proxy.c,v 1.22 2003/02/15 06:23:45 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_proxy.c,v 1.23 2004/12/24 09:14:26 darrenr Exp $"; #endif -#if defined(_KERNEL) && (SOLARIS || defined(__sgi)) +#ifdef USE_MUTEX extern KRWLOCK_T ipf_nat, ipf_state; #endif ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_state.c#11 (text+ko) ==== @@ -95,7 +95,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-2000 Darren Reed"; /* static const char rcsid[] = "@(#)$Id: ip_state.c,v 2.30.2.38 2001/07/23 13:49:46 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.c,v 1.33 2004/06/21 22:46:36 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.c,v 1.34 2004/12/24 09:14:26 darrenr Exp $"; #endif #ifndef MIN @@ -108,7 +108,7 @@ static int ips_num = 0; static int ips_wild = 0; static ips_stat_t ips_stats; -#if (SOLARIS || defined(__sgi)) && defined(_KERNEL) +#ifdef USE_MUTEX extern KRWLOCK_T ipf_state, ipf_mutex; extern kmutex_t ipf_rw; #endif ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_state.h#7 (text+ko) ==== @@ -5,7 +5,7 @@ * * @(#)ip_state.h 1.3 1/12/96 (C) 1995 Darren Reed * $Id: ip_state.h,v 2.13.2.1 2000/07/08 02:15:35 darrenr Exp $ - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.h,v 1.15 2004/06/21 22:46:36 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.h,v 1.16 2004/12/24 09:14:26 darrenr Exp $ */ #ifndef __IP_STATE_H__ #define __IP_STATE_H__ @@ -90,7 +90,7 @@ } is_ps; u_32_t is_group; char is_ifname[4][IFNAMSIZ]; -#if SOLARIS || defined(__sgi) +#if SOLARIS || defined(__sgi) || (__FreeBSD_version >= 500043) kmutex_t is_lock; #endif } ipstate_t; ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/mlfk_ipl.c#6 (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/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.13 2004/06/16 09:46:34 phk Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.14 2004/12/24 09:14:26 darrenr Exp $ */ @@ -106,7 +106,7 @@ #define CDEV_MAJOR 79 static struct cdevsw ipl_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, + .d_flags = 0, .d_open = iplopen, .d_close = iplclose, .d_read = iplread, @@ -115,6 +115,11 @@ .d_maj = CDEV_MAJOR, }; +#if (__FreeBSD_version >= 500000) +kmutex_t ipl_mutex, ipf_rw; +KRWLOCK_T ipf_mutex, ipf_frag, ipf_state, ipf_nat, ipf_natfrag, ipf_auth; +#endif + static int ipfilter_modevent(module_t mod, int type, void *unused) { @@ -127,11 +132,21 @@ error = iplattach(); if (error) break; +#if (__FreeBSD_version >= 500000) + MUTEX_INIT(&ipl_mutex, "ipf log mutex", NULL); + MUTEX_INIT(&ipf_rw, "ipf rw mutex", NULL); + RWLOCK_INIT(&ipf_mutex, "ipf filter rwlock", NULL); + RWLOCK_INIT(&ipf_frag, "ipf fragment rwlock", NULL); + RWLOCK_INIT(&ipf_state, "ipf IP state rwlock", NULL); + RWLOCK_INIT(&ipf_nat, "ipf IP NAT rwlock", NULL); + RWLOCK_INIT(&ipf_natfrag, "ipf IP NAT-Frag rwlock", NULL); + RWLOCK_INIT(&ipf_auth, "ipf User-Auth rwlock", NULL); +#endif c = NULL; - for(i=strlen(IPL_NAME); i>0; i--) + for(i = strlen(IPL_NAME); i > 0; i--) if (IPL_NAME[i] == '/') { - c = &IPL_NAME[i+1]; + c = &IPL_NAME[i + 1]; break; } if (!c) @@ -140,9 +155,9 @@ make_dev(&ipl_cdevsw, IPL_LOGIPF, 0, 0, 0600, c); c = NULL; - for(i=strlen(IPL_NAT); i>0; i--) + for(i = strlen(IPL_NAT); i > 0; i--) if (IPL_NAT[i] == '/') { - c = &IPL_NAT[i+1]; + c = &IPL_NAT[i + 1]; break; } if (!c) @@ -151,9 +166,9 @@ make_dev(&ipl_cdevsw, IPL_LOGNAT, 0, 0, 0600, c); c = NULL; - for(i=strlen(IPL_STATE); i>0; i--) + for(i = strlen(IPL_STATE); i > 0; i--) if (IPL_STATE[i] == '/') { - c = &IPL_STATE[i+1]; + c = &IPL_STATE[i + 1]; break; } if (!c) @@ -162,9 +177,9 @@ make_dev(&ipl_cdevsw, IPL_LOGSTATE, 0, 0, 0600, c); c = NULL; - for(i=strlen(IPL_AUTH); i>0; i--) + for(i = strlen(IPL_AUTH); i > 0; i--) if (IPL_AUTH[i] == '/') { - c = &IPL_AUTH[i+1]; + c = &IPL_AUTH[i + 1]; break; } if (!c) ==== //depot/projects/smpng/sys/dev/acpica/acpi.c#76 (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/dev/acpica/acpi.c,v 1.196 2004/12/05 01:35:18 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.197 2004/12/27 05:36:47 njl Exp $ */ #include "opt_acpi.h" @@ -1900,7 +1900,7 @@ rp = (ACPI_RESOURCE *)buf->Pointer; i = index; while (i-- > 0) { - /* Range check */ + /* Range check */ if (rp > (ACPI_RESOURCE *)((u_int8_t *)buf->Pointer + buf->Length)) return (AE_BAD_PARAMETER); @@ -2657,7 +2657,7 @@ return (0); } -void +void acpi_deregister_ioctl(u_long cmd, acpi_ioctl_fn fn) { struct acpi_ioctl_hook *hp; @@ -3034,7 +3034,7 @@ va_start(ap, arg); state = va_arg(ap, int); - va_end(ap); + va_end(ap); switch (state) { case POWER_SLEEP_STATE_STANDBY: ==== //depot/projects/smpng/sys/dev/acpica/acpi_ec.c#33 (text+ko) ==== @@ -135,7 +135,7 @@ *****************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.59 2004/08/13 06:21:53 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.60 2004/12/27 05:36:47 njl Exp $"); #include "opt_acpi.h" #include @@ -176,7 +176,7 @@ * Note that a set bit (1) indicates the property is TRUE * (e.g. if bit 0 is set then the output buffer is full). * +-+-+-+-+-+-+-+-+ - * |7|6|5|4|3|2|1|0| + * |7|6|5|4|3|2|1|0| * +-+-+-+-+-+-+-+-+ * | | | | | | | | * | | | | | | | +- Output Buffer Full? ==== //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#26 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.42 2004/12/20 10:46:56 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.43 2004/12/27 05:42:32 njl Exp $"); #include "opt_acpi.h" #include @@ -141,25 +141,23 @@ static int acpi_pci_link_probe(device_t dev) { - char descr[64], name[10]; + char descr[28], name[12]; /* * We explicitly do not check _STA since not all systems set it to * sensible values. */ - if (!acpi_disabled("pci_link") && - ACPI_ID_PROBE(device_get_parent(dev), dev, pci_link_ids) != NULL) { - if (ACPI_FAILURE(acpi_short_name(acpi_get_handle(dev), name, - sizeof(name)))) - device_set_desc(dev, "ACPI PCI Link"); - else { - snprintf(descr, sizeof(descr), "ACPI PCI Link %s", - name); - device_set_desc_copy(dev, descr); - } - return (0); - } - return (ENXIO); + if (acpi_disabled("pci_link") || + ACPI_ID_PROBE(device_get_parent(dev), dev, pci_link_ids) == NULL) + return (ENXIO); + + if (ACPI_SUCCESS(acpi_short_name(acpi_get_handle(dev), name, + sizeof(name)))) { + snprintf(descr, sizeof(descr), "ACPI PCI Link %s", name); + device_set_desc_copy(dev, descr); + } else + device_set_desc(dev, "ACPI PCI Link"); + return (0); } static ACPI_STATUS @@ -300,7 +298,7 @@ */ if (req->in_dpf == DPF_IGNORE) break; - + KASSERT(req->link_index < req->sc->pl_num_links, ("%s: array boundary violation", __func__)); link = &req->sc->pl_links[req->link_index]; @@ -327,13 +325,13 @@ * valid IRQs are ISA IRQs, then mark this link as * routed via an ISA interrupt. */ - link->l_isa_irq = 1; + link->l_isa_irq = TRUE; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Dec 28 16:15:39 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4376116A4D0; Tue, 28 Dec 2004 16:15:39 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F220716A4CE for ; Tue, 28 Dec 2004 16:15:38 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E07DE43D45 for ; Tue, 28 Dec 2004 16:15:38 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSGFcF1028821 for ; Tue, 28 Dec 2004 16:15:38 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSGFcJT028818 for perforce@freebsd.org; Tue, 28 Dec 2004 16:15:38 GMT (envelope-from sam@freebsd.org) Date: Tue, 28 Dec 2004 16:15:38 GMT Message-Id: <200412281615.iBSGFcJT028818@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67796 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 16:15:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=67796 Change 67796 by sam@sam_ebb on 2004/12/28 16:15:34 check for beacon interval being zero when setting up the beacon timers; this can happen when an interface is configured in monitor mode w/o previous configuration Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#48 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#48 (text+ko) ==== @@ -1984,7 +1984,8 @@ DPRINTF(sc, ATH_DEBUG_BEACON, "%s: nexttbtt %u intval %u\n", __func__, nexttbtt, ni->ni_intval); intval = MS_TO_TU(ni->ni_intval) & HAL_BEACON_PERIOD; - nexttbtt = roundup(nexttbtt, intval); + if (intval) /* NB: can be 0 for monitor mode */ + nexttbtt = roundup(nexttbtt, intval); if (ic->ic_opmode == IEEE80211_M_STA) { HAL_BEACON_STATE bs; u_int32_t bmisstime; From owner-p4-projects@FreeBSD.ORG Tue Dec 28 16:16:41 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 275E816A4FF; Tue, 28 Dec 2004 16:16:41 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB07716A4FA for ; Tue, 28 Dec 2004 16:16:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B909043D31 for ; Tue, 28 Dec 2004 16:16:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSGGeGM028873 for ; Tue, 28 Dec 2004 16:16:40 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSGGe2q028870 for perforce@freebsd.org; Tue, 28 Dec 2004 16:16:40 GMT (envelope-from jhb@freebsd.org) Date: Tue, 28 Dec 2004 16:16:40 GMT Message-Id: <200412281616.iBSGGe2q028870@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 67797 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 16:16:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=67797 Change 67797 by jhb@jhb_slimer on 2004/12/28 16:16:22 Simplify the fix for the PPro lapic errata now that we always include the local APIC vectors. Affected files ... .. //depot/projects/smpng/sys/i386/i386/exception.s#20 edit .. //depot/projects/smpng/sys/i386/i386/initcpu.c#22 edit .. //depot/projects/smpng/sys/i386/i386/local_apic.c#23 edit .. //depot/projects/smpng/sys/i386/i386/machdep.c#85 edit Differences ... ==== //depot/projects/smpng/sys/i386/i386/exception.s#20 (text+ko) ==== @@ -112,13 +112,6 @@ TRAP(T_ALIGNFLT) IDTVEC(xmm) pushl $0; TRAP(T_XMMFLT) - -IDTVEC(trap0f) - /* - * Workaround for PentiumPro Errata 5AP: Spurious interrupts routed - * to int15 in APIC virtual wire mode. - */ - iret /* * alltraps entry point. Interrupts are enabled if this was a trap ==== //depot/projects/smpng/sys/i386/i386/initcpu.c#22 (text+ko) ==== @@ -68,7 +68,6 @@ #ifdef I686_CPU static void init_6x86MX(void); -static void init_ppro(void); static void init_mendocino(void); #endif @@ -471,19 +470,6 @@ write_eflags(eflags); } -static void -init_ppro(void) -{ - u_int64_t apicbase; - - /* - * Local APIC should be disabled if it is not going to be used. - */ - apicbase = rdmsr(MSR_APICBASE); - apicbase &= ~APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apicbase); -} - /* * Initialize BBL_CR_CTL3 (Control register 3: used to configure the * L2 cache). @@ -574,9 +560,6 @@ case CPU_686: if (strcmp(cpu_vendor, "GenuineIntel") == 0) { switch (cpu_id & 0xff0) { - case 0x610: - init_ppro(); - break; case 0x660: init_mendocino(); break; ==== //depot/projects/smpng/sys/i386/i386/local_apic.c#23 (text+ko) ==== @@ -605,18 +605,6 @@ printf("APIC: Using the %s enumerator.\n", best_enum->apic_name); - /* - * To work around an errata, we disable the local APIC on some - * CPUs during early startup. We need to turn the local APIC back - * on on such CPUs now. - */ - if (cpu == CPU_686 && strcmp(cpu_vendor, "GenuineIntel") == 0 && - (cpu_id & 0xff0) == 0x610) { - apic_base = rdmsr(MSR_APICBASE); - apic_base |= APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apic_base); - } - /* Second, probe the CPU's in the system. */ retval = best_enum->apic_probe_cpus(); if (retval != 0) ==== //depot/projects/smpng/sys/i386/i386/machdep.c#85 (text+ko) ==== @@ -1461,7 +1461,7 @@ extern inthand_t IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl), - IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(trap0f), + IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), IDTVEC(xmm), IDTVEC(lcall_syscall), IDTVEC(int0x80_syscall); @@ -2077,8 +2077,6 @@ GSEL(GCODE_SEL, SEL_KPL)); setidt(IDT_PF, &IDTVEC(page), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(15, &IDTVEC(trap0f), SDT_SYS386TGT, SEL_KPL, - GSEL(GCODE_SEL, SEL_KPL)); setidt(IDT_MF, &IDTVEC(fpu), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); setidt(IDT_AC, &IDTVEC(align), SDT_SYS386TGT, SEL_KPL, @@ -2090,6 +2088,13 @@ setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); + /* + * Workaround for PentiumPro Errata 5AP: Spurious interrupts routed + * to int15 in APIC virtual wire mode. + */ + setidt(15, &IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (int) idt; lidt(&r_idt); From owner-p4-projects@FreeBSD.ORG Tue Dec 28 16:31:00 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F0A4416A4D0; Tue, 28 Dec 2004 16:30:59 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEFE816A4CE for ; Tue, 28 Dec 2004 16:30:59 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9690B43D53 for ; Tue, 28 Dec 2004 16:30:59 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSGUxVE029315 for ; Tue, 28 Dec 2004 16:30:59 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSGUxs0029312 for perforce@freebsd.org; Tue, 28 Dec 2004 16:30:59 GMT (envelope-from sam@freebsd.org) Date: Tue, 28 Dec 2004 16:30:59 GMT Message-Id: <200412281630.iBSGUxs0029312@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67799 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 16:31:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=67799 Change 67799 by sam@sam_ebb on 2004/12/28 16:30:24 expose ieee80211_phymode_name and use it to improve debug msgs for scanning Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211.c#16 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#29 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#12 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211.c#16 (text+ko) ==== @@ -51,7 +51,7 @@ #include -static const char *ieee80211_phymode_name[] = { +const char *ieee80211_phymode_name[] = { "auto", /* IEEE80211_MODE_AUTO */ "11a", /* IEEE80211_MODE_11A */ "11b", /* IEEE80211_MODE_11B */ ==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#29 (text+ko) ==== @@ -286,9 +286,10 @@ ic->ic_stats.is_scan_active++; } else ic->ic_stats.is_scan_passive++; - IEEE80211_DPRINTF(ic, IEEE80211_MSG_SCAN, "begin %s scan, scangen %u\n", + IEEE80211_DPRINTF(ic, IEEE80211_MSG_SCAN, + "begin %s scan in %s mode, scangen %u\n", (ic->ic_flags & IEEE80211_F_ASCAN) ? "active" : "passive", - ic->ic_scan.nt_scangen); + ieee80211_phymode_name[ic->ic_curmode], ic->ic_scan.nt_scangen); /* * Clear scan state and flush any previously seen AP's. */ ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#12 (text+ko) ==== @@ -51,6 +51,7 @@ ((*(_ic)->ic_send_mgmt)(_ic, _ni, _type, _arg)) extern const char *ieee80211_mgt_subtype_name[]; +extern const char *ieee80211_phymode_name[]; extern void ieee80211_proto_attach(struct ieee80211com *); extern void ieee80211_proto_detach(struct ieee80211com *); From owner-p4-projects@FreeBSD.ORG Tue Dec 28 16:33:03 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF71F16A4D0; Tue, 28 Dec 2004 16:33:02 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BA0016A4CE for ; Tue, 28 Dec 2004 16:33:02 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 742C243D46 for ; Tue, 28 Dec 2004 16:33:02 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSGX2kJ029352 for ; Tue, 28 Dec 2004 16:33:02 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSGX2Ci029349 for perforce@freebsd.org; Tue, 28 Dec 2004 16:33:02 GMT (envelope-from sam@freebsd.org) Date: Tue, 28 Dec 2004 16:33:02 GMT Message-Id: <200412281633.iBSGX2Ci029349@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67800 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 16:33:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=67800 Change 67800 by sam@sam_ebb on 2004/12/28 16:32:45 fully process beacon/probe_resp frames when associated and a scan occurs so the ap we're associated to has it's scan state updated Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#32 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#32 (text+ko) ==== @@ -1869,7 +1869,8 @@ ieee80211_parse_wmeparams(ic, wme, wh) > 0) ieee80211_wme_updateparams(ic); /* NB: don't need the rest of this */ - return; + if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) + return; } if (ni == ic->ic_bss) { From owner-p4-projects@FreeBSD.ORG Tue Dec 28 16:36:08 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D1A7716A4D1; Tue, 28 Dec 2004 16:36:07 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB2BB16A4CE for ; Tue, 28 Dec 2004 16:36:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56D3343D45 for ; Tue, 28 Dec 2004 16:36:07 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSGa7s6029486 for ; Tue, 28 Dec 2004 16:36:07 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSGa6Ej029483 for perforce@freebsd.org; Tue, 28 Dec 2004 16:36:06 GMT (envelope-from sam@freebsd.org) Date: Tue, 28 Dec 2004 16:36:06 GMT Message-Id: <200412281636.iBSGa6Ej029483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67802 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 16:36:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=67802 Change 67802 by sam@sam_ebb on 2004/12/28 16:35:41 move a routine so related code is kept together Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#28 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#28 (text+ko) ==== @@ -203,74 +203,6 @@ return 0; } -/* - * Insure there is sufficient contiguous space to encapsulate the - * 802.11 data frame. If room isn't already there, arrange for it. - * Drivers and cipher modules assume we have done the necessary work - * and fail rudely if they don't find the space they need. - */ -static struct mbuf * -ieee80211_mbuf_adjust(struct ieee80211com *ic, int hdrsize, - struct ieee80211_key *key, struct mbuf *m) -{ -#define TO_BE_RECLAIMED (sizeof(struct ether_header) - sizeof(struct llc)) - int needed_space = hdrsize; - - if (key != NULL) { - /* XXX belongs in crypto code? */ - needed_space += key->wk_cipher->ic_header; - /* XXX frags */ - } - /* - * We know we are called just before stripping an Ethernet - * header and prepending an LLC header. This means we know - * there will be - * sizeof(struct ether_header) - sizeof(struct llc) - * bytes recovered to which we need additional space for the - * 802.11 header and any crypto header. - */ - /* XXX check trailing space and copy instead? */ - if (M_LEADINGSPACE(m) < needed_space - TO_BE_RECLAIMED) { - struct mbuf *n = m_gethdr(M_NOWAIT, m->m_type); - if (n == NULL) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_OUTPUT, - "%s: cannot expand storage\n", __func__); - ic->ic_stats.is_tx_nobuf++; - m_freem(m); - return NULL; - } - KASSERT(needed_space <= MHLEN, - ("not enough room, need %u got %zu\n", needed_space, MHLEN)); - /* - * Setup new mbuf to have leading space to prepend the - * 802.11 header and any crypto header bits that are - * required (the latter are added when the driver calls - * back to ieee80211_crypto_encap to do crypto encapsulation). - */ - /* NB: must be first 'cuz it clobbers m_data */ - m_move_pkthdr(n, m); - n->m_len = 0; /* NB: m_gethdr does not set */ - n->m_data += needed_space; - /* - * Pull up Ethernet header to create the expected layout. - * We could use m_pullup but that's overkill (i.e. we don't - * need the actual data) and it cannot fail so do it inline - * for speed. - */ - /* NB: struct ether_header is known to be contiguous */ - n->m_len += sizeof(struct ether_header); - m->m_len -= sizeof(struct ether_header); - m->m_data += sizeof(struct ether_header); - /* - * Replace the head of the chain. - */ - n->m_next = m; - m = n; - } - return m; -#undef TO_BE_RECLAIMED -} - /* * Assign priority to a frame based on any vlan tag assigned * to the station and/or any Diffserv setting in an IP header. @@ -387,6 +319,74 @@ return 0; } +/* + * Insure there is sufficient contiguous space to encapsulate the + * 802.11 data frame. If room isn't already there, arrange for it. + * Drivers and cipher modules assume we have done the necessary work + * and fail rudely if they don't find the space they need. + */ +static struct mbuf * +ieee80211_mbuf_adjust(struct ieee80211com *ic, int hdrsize, + struct ieee80211_key *key, struct mbuf *m) +{ +#define TO_BE_RECLAIMED (sizeof(struct ether_header) - sizeof(struct llc)) + int needed_space = hdrsize; + + if (key != NULL) { + /* XXX belongs in crypto code? */ + needed_space += key->wk_cipher->ic_header; + /* XXX frags */ + } + /* + * We know we are called just before stripping an Ethernet + * header and prepending an LLC header. This means we know + * there will be + * sizeof(struct ether_header) - sizeof(struct llc) + * bytes recovered to which we need additional space for the + * 802.11 header and any crypto header. + */ + /* XXX check trailing space and copy instead? */ + if (M_LEADINGSPACE(m) < needed_space - TO_BE_RECLAIMED) { + struct mbuf *n = m_gethdr(M_NOWAIT, m->m_type); + if (n == NULL) { + IEEE80211_DPRINTF(ic, IEEE80211_MSG_OUTPUT, + "%s: cannot expand storage\n", __func__); + ic->ic_stats.is_tx_nobuf++; + m_freem(m); + return NULL; + } + KASSERT(needed_space <= MHLEN, + ("not enough room, need %u got %zu\n", needed_space, MHLEN)); + /* + * Setup new mbuf to have leading space to prepend the + * 802.11 header and any crypto header bits that are + * required (the latter are added when the driver calls + * back to ieee80211_crypto_encap to do crypto encapsulation). + */ + /* NB: must be first 'cuz it clobbers m_data */ + m_move_pkthdr(n, m); + n->m_len = 0; /* NB: m_gethdr does not set */ + n->m_data += needed_space; + /* + * Pull up Ethernet header to create the expected layout. + * We could use m_pullup but that's overkill (i.e. we don't + * need the actual data) and it cannot fail so do it inline + * for speed. + */ + /* NB: struct ether_header is known to be contiguous */ + n->m_len += sizeof(struct ether_header); + m->m_len -= sizeof(struct ether_header); + m->m_data += sizeof(struct ether_header); + /* + * Replace the head of the chain. + */ + n->m_next = m; + m = n; + } + return m; +#undef TO_BE_RECLAIMED +} + #define KEY_UNDEFINED(k) ((k).wk_cipher == &ieee80211_cipher_none) /* * Return the transmit key to use in sending a unicast frame. From owner-p4-projects@FreeBSD.ORG Tue Dec 28 17:01:42 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D2FE216A4D0; Tue, 28 Dec 2004 17:01:41 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A41616A4CE for ; Tue, 28 Dec 2004 17:01:41 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03CDD43D48 for ; Tue, 28 Dec 2004 17:01:41 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSH1ek9036771 for ; Tue, 28 Dec 2004 17:01:40 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSH1dqb036768 for perforce@freebsd.org; Tue, 28 Dec 2004 17:01:39 GMT (envelope-from sam@freebsd.org) Date: Tue, 28 Dec 2004 17:01:39 GMT Message-Id: <200412281701.iBSH1dqb036768@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67803 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 17:01:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=67803 Change 67803 by sam@sam_ebb on 2004/12/28 17:01:36 IFC @ 67802 Affected files ... .. //depot/projects/wifi/Makefile.inc1#9 integrate .. //depot/projects/wifi/UPDATING#9 integrate .. //depot/projects/wifi/bin/ps/ps.1#3 integrate .. //depot/projects/wifi/contrib/file/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/file/LEGAL.NOTICE#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/animation#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/archive#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/audio#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/console#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/elf#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/esri#1 branch .. //depot/projects/wifi/contrib/file/Magdir/filesystems#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/linux#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/msdos#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/os9#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/perl#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/plan9#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/sinclair#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/sniffer#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/tex#2 integrate .. //depot/projects/wifi/contrib/file/Magdir/virtutech#1 branch .. //depot/projects/wifi/contrib/file/Magdir/xo65#1 branch .. //depot/projects/wifi/contrib/file/Makefile.am#2 integrate .. //depot/projects/wifi/contrib/file/Makefile.in#2 integrate .. //depot/projects/wifi/contrib/file/PORTING#1 branch .. //depot/projects/wifi/contrib/file/aclocal.m4#2 integrate .. //depot/projects/wifi/contrib/file/apprentice.c#2 integrate .. //depot/projects/wifi/contrib/file/ascmagic.c#2 integrate .. //depot/projects/wifi/contrib/file/compress.c#2 integrate .. //depot/projects/wifi/contrib/file/config.h.in#2 integrate .. //depot/projects/wifi/contrib/file/configure#2 integrate .. //depot/projects/wifi/contrib/file/configure.in#2 integrate .. //depot/projects/wifi/contrib/file/file.c#2 integrate .. //depot/projects/wifi/contrib/file/file.h#2 integrate .. //depot/projects/wifi/contrib/file/fsmagic.c#2 integrate .. //depot/projects/wifi/contrib/file/funcs.c#2 integrate .. //depot/projects/wifi/contrib/file/install-sh#2 integrate .. //depot/projects/wifi/contrib/file/is_tar.c#2 integrate .. //depot/projects/wifi/contrib/file/magic.c#2 integrate .. //depot/projects/wifi/contrib/file/magic.h#2 integrate .. //depot/projects/wifi/contrib/file/magic.mime#2 integrate .. //depot/projects/wifi/contrib/file/mkinstalldirs#2 integrate .. //depot/projects/wifi/contrib/file/names.h#2 integrate .. //depot/projects/wifi/contrib/file/patchlevel.h#2 integrate .. //depot/projects/wifi/contrib/file/print.c#2 integrate .. //depot/projects/wifi/contrib/file/readelf.c#2 integrate .. //depot/projects/wifi/contrib/file/readelf.h#2 integrate .. //depot/projects/wifi/contrib/file/softmagic.c#2 integrate .. //depot/projects/wifi/contrib/file/tar.h#2 integrate .. //depot/projects/wifi/contrib/file/test.c#2 integrate .. //depot/projects/wifi/etc/devd.conf#5 integrate .. //depot/projects/wifi/games/fortune/datfiles/fortunes#5 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_compression_bzip2.c#2 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_format_tar.c#4 integrate .. //depot/projects/wifi/lib/libarchive/archive_string.c#2 integrate .. //depot/projects/wifi/lib/libarchive/archive_string.h#3 integrate .. //depot/projects/wifi/lib/libarchive/libarchive-formats.5#2 integrate .. //depot/projects/wifi/lib/libc/gen/signal.3#2 integrate .. //depot/projects/wifi/lib/libc/gen/syslog.c#3 integrate .. //depot/projects/wifi/lib/libc/sys/_exit.2#2 integrate .. //depot/projects/wifi/lib/libc/sys/acct.2#2 integrate .. //depot/projects/wifi/lib/libc/sys/adjtime.2#2 integrate .. //depot/projects/wifi/lib/libc/sys/aio_suspend.2#2 integrate .. //depot/projects/wifi/lib/libc/sys/getitimer.2#2 integrate .. //depot/projects/wifi/lib/libc/sys/recv.2#2 integrate .. //depot/projects/wifi/lib/libc/sys/select.2#2 integrate .. //depot/projects/wifi/lib/libdisk/disk.c#3 integrate .. //depot/projects/wifi/lib/libmagic/config.h#2 integrate .. //depot/projects/wifi/rescue/rescue/Makefile#7 integrate .. //depot/projects/wifi/sbin/geom/class/mirror/geom_mirror.c#2 integrate .. //depot/projects/wifi/sbin/geom/class/raid3/geom_raid3.c#2 integrate .. //depot/projects/wifi/sbin/growfs/growfs.8#2 integrate .. //depot/projects/wifi/sbin/mdconfig/mdconfig.c#4 integrate .. //depot/projects/wifi/sbin/mount/mount.8#3 integrate .. //depot/projects/wifi/share/man/man4/aac.4#3 integrate .. //depot/projects/wifi/share/man/man4/altq.4#6 integrate .. //depot/projects/wifi/share/man/man4/pccbb.4#2 integrate .. //depot/projects/wifi/share/man/man4/random.4#2 integrate .. //depot/projects/wifi/share/mk/bsd.init.mk#3 integrate .. //depot/projects/wifi/share/mk/sys.mk#4 integrate .. //depot/projects/wifi/sys/alpha/alpha/machdep.c#5 integrate .. //depot/projects/wifi/sys/alpha/alpha/pmap.c#4 integrate .. //depot/projects/wifi/sys/amd64/amd64/pmap.c#7 integrate .. //depot/projects/wifi/sys/amd64/amd64/vm_machdep.c#4 integrate .. //depot/projects/wifi/sys/amd64/isa/isa.c#2 integrate .. //depot/projects/wifi/sys/arm/arm/pmap.c#6 integrate .. //depot/projects/wifi/sys/conf/files#11 integrate .. //depot/projects/wifi/sys/conf/majors#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/fil.c#3 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_auth.c#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_compat.h#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_fil.c#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_fil.h#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_frag.c#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_log.c#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_nat.h#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_proxy.c#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_state.c#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/ip_state.h#2 integrate .. //depot/projects/wifi/sys/contrib/ipfilter/netinet/mlfk_ipl.c#2 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi.c#4 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_ec.c#2 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pci_link.c#8 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pcib.c#4 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pcib_pci.c#3 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_powerres.c#2 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_resource.c#2 integrate .. //depot/projects/wifi/sys/dev/ata/ata-chipset.c#3 integrate .. //depot/projects/wifi/sys/dev/ata/ata-lowlevel.c#4 integrate .. //depot/projects/wifi/sys/dev/kbd/kbd.c#2 integrate .. //depot/projects/wifi/sys/dev/md/md.c#4 integrate .. //depot/projects/wifi/sys/dev/nmdm/nmdm.c#2 integrate .. //depot/projects/wifi/sys/dev/ofw/ofw_disk.c#3 integrate .. //depot/projects/wifi/sys/dev/pccbb/pccbb_pci.c#2 integrate .. //depot/projects/wifi/sys/dev/pccbb/pccbbdevid.h#2 integrate .. //depot/projects/wifi/sys/dev/random/randomdev.c#2 integrate .. //depot/projects/wifi/sys/dev/random/randomdev_soft.c#3 integrate .. //depot/projects/wifi/sys/dev/snp/snp.c#3 integrate .. //depot/projects/wifi/sys/dev/sound/usb/uaudio.c#2 integrate .. //depot/projects/wifi/sys/dev/sound/usb/uaudio.h#2 integrate .. //depot/projects/wifi/sys/dev/sound/usb/uaudio_pcm.c#2 integrate .. //depot/projects/wifi/sys/dev/sound/usb/uaudioreg.h#2 integrate .. //depot/projects/wifi/sys/dev/usb/ugen.c#4 integrate .. //depot/projects/wifi/sys/dev/usb/uhid.c#3 integrate .. //depot/projects/wifi/sys/dev/usb/ums.c#4 integrate .. //depot/projects/wifi/sys/dev/usb/usb.c#3 integrate .. //depot/projects/wifi/sys/dev/usb/usbdevs#7 integrate .. //depot/projects/wifi/sys/dev/vkbd/vkbd.c#2 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_vnops.c#12 integrate .. //depot/projects/wifi/sys/geom/mirror/g_mirror.c#5 integrate .. //depot/projects/wifi/sys/geom/mirror/g_mirror.h#3 integrate .. //depot/projects/wifi/sys/geom/mirror/g_mirror_ctl.c#3 integrate .. //depot/projects/wifi/sys/geom/raid3/g_raid3.c#7 integrate .. //depot/projects/wifi/sys/geom/raid3/g_raid3.h#3 integrate .. //depot/projects/wifi/sys/geom/raid3/g_raid3_ctl.c#2 integrate .. //depot/projects/wifi/sys/i386/i386/intr_machdep.c#5 integrate .. //depot/projects/wifi/sys/i386/i386/local_apic.c#2 integrate .. //depot/projects/wifi/sys/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/wifi/sys/i386/i386/pmap.c#8 integrate .. //depot/projects/wifi/sys/i386/i386/vm_machdep.c#6 integrate .. //depot/projects/wifi/sys/i386/include/apicreg.h#2 integrate .. //depot/projects/wifi/sys/i386/include/apicvar.h#3 integrate .. //depot/projects/wifi/sys/i386/include/intr_machdep.h#2 integrate .. //depot/projects/wifi/sys/i386/isa/isa.c#2 integrate .. //depot/projects/wifi/sys/ia64/ia64/pmap.c#5 integrate .. //depot/projects/wifi/sys/isa/isa_common.c#2 integrate .. //depot/projects/wifi/sys/isa/isa_common.h#2 integrate .. //depot/projects/wifi/sys/isa/pnp.c#2 integrate .. //depot/projects/wifi/sys/isa/pnpvar.h#2 integrate .. //depot/projects/wifi/sys/kern/init_sysent.c#5 integrate .. //depot/projects/wifi/sys/kern/kern_clock.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_kse.c#3 integrate .. //depot/projects/wifi/sys/kern/kern_switch.c#5 integrate .. //depot/projects/wifi/sys/kern/kern_synch.c#3 integrate .. //depot/projects/wifi/sys/kern/kern_umtx.c#4 integrate .. //depot/projects/wifi/sys/kern/sched_4bsd.c#4 integrate .. //depot/projects/wifi/sys/kern/sched_ule.c#6 integrate .. //depot/projects/wifi/sys/kern/subr_trap.c#2 integrate .. //depot/projects/wifi/sys/kern/subr_witness.c#3 integrate .. //depot/projects/wifi/sys/kern/syscalls.c#5 integrate .. //depot/projects/wifi/sys/kern/syscalls.master#5 integrate .. //depot/projects/wifi/sys/kern/tty_pty.c#2 integrate .. //depot/projects/wifi/sys/kern/uipc_sem.c#2 integrate .. //depot/projects/wifi/sys/kern/uipc_socket.c#7 integrate .. //depot/projects/wifi/sys/kern/uipc_socket2.c#3 integrate .. //depot/projects/wifi/sys/kern/uipc_usrreq.c#4 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#11 integrate .. //depot/projects/wifi/sys/modules/ipfilter/Makefile#3 integrate .. //depot/projects/wifi/sys/modules/sppp/Makefile#2 integrate .. //depot/projects/wifi/sys/net/bpf.c#5 integrate .. //depot/projects/wifi/sys/net/if_sppp.h#3 integrate .. //depot/projects/wifi/sys/net/if_spppfr.c#1 branch .. //depot/projects/wifi/sys/net/if_spppsubr.c#4 integrate .. //depot/projects/wifi/sys/net/if_tap.c#3 integrate .. //depot/projects/wifi/sys/net/if_tun.c#3 integrate .. //depot/projects/wifi/sys/net/ppp_tty.c#3 integrate .. //depot/projects/wifi/sys/netgraph/netflow/netflow.c#3 integrate .. //depot/projects/wifi/sys/netgraph/ng_base.c#6 integrate .. //depot/projects/wifi/sys/netgraph/ng_device.c#4 integrate .. //depot/projects/wifi/sys/netgraph/ng_sample.c#2 integrate .. //depot/projects/wifi/sys/netinet/ip_output.c#3 integrate .. //depot/projects/wifi/sys/netinet/tcp_input.c#7 integrate .. //depot/projects/wifi/sys/netinet/tcp_subr.c#6 integrate .. //depot/projects/wifi/sys/netinet/tcp_timer.c#5 integrate .. //depot/projects/wifi/sys/netinet/tcp_var.h#3 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_vnops.c#10 integrate .. //depot/projects/wifi/sys/pc98/pc98/fd.c#3 integrate .. //depot/projects/wifi/sys/pci/if_sk.c#6 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/pmap.c#3 integrate .. //depot/projects/wifi/sys/sparc64/include/ver.h#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/identcpu.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/pmap.c#5 integrate .. //depot/projects/wifi/sys/sys/ktr.h#3 integrate .. //depot/projects/wifi/sys/sys/mdioctl.h#3 integrate .. //depot/projects/wifi/sys/sys/syscall.h#4 integrate .. //depot/projects/wifi/sys/sys/syscall.mk#4 integrate .. //depot/projects/wifi/sys/sys/sysproto.h#4 integrate .. //depot/projects/wifi/sys/sys/umtx.h#3 integrate .. //depot/projects/wifi/sys/sys/vnode.h#9 integrate .. //depot/projects/wifi/sys/vm/uma.h#2 integrate .. //depot/projects/wifi/sys/vm/uma_core.c#5 integrate .. //depot/projects/wifi/sys/vm/uma_dbg.c#2 integrate .. //depot/projects/wifi/sys/vm/uma_dbg.h#2 integrate .. //depot/projects/wifi/sys/vm/uma_int.h#3 integrate .. //depot/projects/wifi/sys/vm/vm_fault.c#3 integrate .. //depot/projects/wifi/sys/vm/vm_map.c#3 integrate .. //depot/projects/wifi/sys/vm/vm_page.c#5 integrate .. //depot/projects/wifi/sys/vm/vm_page.h#3 integrate .. //depot/projects/wifi/sys/vm/vnode_pager.c#8 integrate .. //depot/projects/wifi/tools/sched/schedgraph.py#1 branch .. //depot/projects/wifi/usr.bin/catman/Makefile#2 integrate .. //depot/projects/wifi/usr.bin/catman/catman.1#2 integrate .. //depot/projects/wifi/usr.bin/catman/catman.c#2 integrate .. //depot/projects/wifi/usr.bin/file/config.h#2 integrate .. //depot/projects/wifi/usr.bin/file/file.1#2 integrate .. //depot/projects/wifi/usr.bin/file/magic.5#2 integrate .. //depot/projects/wifi/usr.bin/tar/bsdtar.c#2 integrate .. //depot/projects/wifi/usr.bin/tar/bsdtar_platform.h#3 integrate .. //depot/projects/wifi/usr.bin/tar/configure.ac.in#2 integrate .. //depot/projects/wifi/usr.bin/tar/matching.c#2 integrate .. //depot/projects/wifi/usr.bin/wc/Makefile#2 integrate .. //depot/projects/wifi/usr.bin/wc/wc.c#2 integrate .. //depot/projects/wifi/usr.sbin/arp/arp.c#2 integrate .. //depot/projects/wifi/usr.sbin/sysinstall/devices.c#3 integrate Differences ... ==== //depot/projects/wifi/Makefile.inc1#9 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.470 2004/12/21 12:21:25 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.471 2004/12/22 22:00:01 ru Exp $ # # Make command line options: # -DNO_DYNAMICROOT do not link /bin and /sbin dynamically @@ -112,8 +112,8 @@ .else _TARGET_CPUTYPE=dummy .endif -_CPUTYPE!= MAKEFLAGS= ${MAKE} -f /dev/null -m ${.CURDIR}/share/mk \ - CPUTYPE=${_TARGET_CPUTYPE} -V CPUTYPE +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \ + -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE .if ${_CPUTYPE} != ${_TARGET_CPUTYPE} .error CPUTYPE global should be set with ?=. .endif ==== //depot/projects/wifi/UPDATING#9 (text+ko) ==== @@ -23,6 +23,13 @@ developers choose to disable these features on build machines to maximize performance. +20041221: + By a popular demand, a lot of NOFOO options were renamed + to NO_FOO (see bsd.compat.mk for a full list). The old + spellings are still supported, but will cause annoying + warnings on stderr. Make sure you upgrade properly (see + the COMMON ITEMS: section later in this file). + 20041219: Auto-loading of ancillary wlan modules such as wlan_wep has been temporarily disabled; you need to statically configure @@ -1993,4 +2000,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.384 2004/12/20 04:27:23 sam Exp $ +$FreeBSD: src/UPDATING,v 1.385 2004/12/23 16:03:08 ru Exp $ ==== //depot/projects/wifi/bin/ps/ps.1#3 (text+ko) ==== @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 -.\" $FreeBSD: src/bin/ps/ps.1,v 1.80 2004/11/29 12:00:24 rwatson Exp $ +.\" $FreeBSD: src/bin/ps/ps.1,v 1.81 2004/12/22 09:04:47 rwatson Exp $ .\" .Dd March 27, 2004 .Dt PS 1 @@ -603,7 +603,6 @@ .El .Sh FILES .Bl -tag -width ".Pa /boot/kernel/kernel" -compact -KLD .It Pa /boot/kernel/kernel default system namelist .It Pa /proc ==== //depot/projects/wifi/contrib/file/ChangeLog#2 (text+ko) ==== @@ -1,3 +1,30 @@ +2004-11-24 12:39 Christos Zoulas + + * Stack smash fix, and ELF more conservative reading. + Jakub Bogusz + +2004-11-20 18:50 Christos Zoulas + + * New FreeBSD version parsing code: + Jon Noack + + * Hackish support for ucs16 strings + +2004-11-13 03:07 Christos Zoulas + + * print the file name and line number in syntax errors. + +2004 10-12 10:50 Christos Zoulas + + * Fix stack overwriting on 0 length strings: Tim Waugh + Ned Ludd + +2004-09-27 11:30 Christos Zoulas + + * Remove 3rd and 4th copyright clause; approved by Ian Darwin. + + * Fix small memory leaks; caught by: Tamas Sarlos + 2004-07-24 16:33 Christos Zoulas ==== //depot/projects/wifi/contrib/file/LEGAL.NOTICE#2 (text+ko) ==== @@ -1,7 +1,7 @@ -$Id: LEGAL.NOTICE,v 1.13 2003/03/23 22:23:30 christos Exp $ +$Id: LEGAL.NOTICE,v 1.14 2004/09/11 19:15:56 christos Exp $ Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software written by Ian F. Darwin and others; -maintained 1994-2003 Christos Zoulas. +maintained 1994-2004 Christos Zoulas. This software is not subject to any export provision of the United States Department of Commerce, and may be exported to any country or planet. @@ -15,11 +15,6 @@ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by Ian F. Darwin and others. -4. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ==== //depot/projects/wifi/contrib/file/Magdir/animation#2 (text+ko) ==== @@ -6,123 +6,524 @@ # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8) # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com) -# MPEG animation format -0 belong 0x000001b3 MPEG video stream data -#>4 beshort&0xfff0 x (%d x -#>5 beshort&0x0fff x %d) -0 belong 0x000001ba MPEG system stream data +# MPEG sequences +# Scans for all common MPEG header start codes +0 belong&0xFFFFFF00 0x00000100 MPEG sequence +>3 byte 0xBA +>>4 byte &0x40 \b, v2, program multiplex +>>4 byte ^0x40 \b, v1, system multiplex +>3 byte 0xBB \b, v1/2, multiplex (missing pack header) +>3 byte 0xB0 \b, v4 +>>5 belong 0x000001B5 +>>>9 byte &0x80 +>>>>10 byte&0xF0 16 \b, video +>>>>10 byte&0xF0 32 \b, still texture +>>>>10 byte&0xF0 48 \b, mesh +>>>>10 byte&0xF0 64 \b, face +>>>9 byte ^0x80 +>>>>9 byte&0xF8 8 \b, video +>>>>9 byte&0xF8 16 \b, still texture +>>>>9 byte&0xF8 24 \b, mesh +>>>>9 byte&0xF8 32 \b, face +>>4 byte 1 \b, simple @ L1 +>>4 byte 2 \b, simple @ L2 +>>4 byte 3 \b, simple @ L3 +>>4 byte 4 \b, simple @ L0 +>>4 byte 17 \b, simple scalable @ L1 +>>4 byte 18 \b, simple scalable @ L2 +>>4 byte 33 \b, core @ L1 +>>4 byte 34 \b, core @ L2 +>>4 byte 50 \b, main @ L2 +>>4 byte 51 \b, main @ L3 +>>4 byte 53 \b, main @ L4 +>>4 byte 66 \b, n-bit @ L2 +>>4 byte 81 \b, scalable texture @ L1 +>>4 byte 97 \b, simple face animation @ L1 +>>4 byte 98 \b, simple face animation @ L2 +>>4 byte 99 \b, simple face basic animation @ L1 +>>4 byte 100 \b, simple face basic animation @ L2 +>>4 byte 113 \b, basic animation text @ L1 +>>4 byte 114 \b, basic animation text @ L2 +>>4 byte 129 \b, hybrid @ L1 +>>4 byte 130 \b, hybrid @ L2 +>>4 byte 145 \b, advanced RT simple @ L! +>>4 byte 146 \b, advanced RT simple @ L2 +>>4 byte 147 \b, advanced RT simple @ L3 +>>4 byte 148 \b, advanced RT simple @ L4 +>>4 byte 161 \b, core scalable @ L1 +>>4 byte 162 \b, core scalable @ L2 +>>4 byte 163 \b, core scalable @ L3 +>>4 byte 177 \b, advanced coding efficiency @ L1 +>>4 byte 178 \b, advanced coding efficiency @ L2 +>>4 byte 179 \b, advanced coding efficiency @ L3 +>>4 byte 180 \b, advanced coding efficiency @ L4 +>>4 byte 193 \b, advanced core @ L1 +>>4 byte 194 \b, advanced core @ L2 +>>4 byte 209 \b, advanced scalable texture @ L1 +>>4 byte 210 \b, advanced scalable texture @ L2 +>>4 byte 211 \b, advanced scalable texture @ L3 +>>4 byte 225 \b, simple studio @ L1 +>>4 byte 226 \b, simple studio @ L2 +>>4 byte 227 \b, simple studio @ L3 +>>4 byte 228 \b, simple studio @ L4 +>>4 byte 229 \b, core studio @ L1 +>>4 byte 230 \b, core studio @ L2 +>>4 byte 231 \b, core studio @ L3 +>>4 byte 232 \b, core studio @ L4 +>>4 byte 240 \b, advanced simple @ L0 +>>4 byte 241 \b, advanced simple @ L1 +>>4 byte 242 \b, advanced simple @ L2 +>>4 byte 243 \b, advanced simple @ L3 +>>4 byte 244 \b, advanced simple @ L4 +>>4 byte 245 \b, advanced simple @ L5 +>>4 byte 247 \b, advanced simple @ L3b +>>4 byte 248 \b, FGS @ L0 +>>4 byte 249 \b, FGS @ L1 +>>4 byte 250 \b, FGS @ L2 +>>4 byte 251 \b, FGS @ L3 +>>4 byte 252 \b, FGS @ L4 +>>4 byte 253 \b, FGS @ L5 +>3 byte 0xB5 \b, v4 +>>4 byte &0x80 +>>>5 byte&0xF0 16 \b, video (missing profile header) +>>>5 byte&0xF0 32 \b, still texture (missing profile header) +>>>5 byte&0xF0 48 \b, mesh (missing profile header) +>>>5 byte&0xF0 64 \b, face (missing profile header) +>>4 byte ^0x80 +>>>4 byte&0xF8 8 \b, video (missing profile header) +>>>4 byte&0xF8 16 \b, still texture (missing profile header) +>>>4 byte&0xF8 24 \b, mesh (missing profile header) +>>>4 byte&0xF8 32 \b, face (missing profile header) +>3 byte 0xB3 +>>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video +>>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video +>>12 belong 0x000001B5 \b, v2, +>>>16 byte&0x0F 1 \b HP +>>>16 byte&0x0F 2 \b Spt +>>>16 byte&0x0F 3 \b SNR +>>>16 byte&0x0F 4 \b MP +>>>16 byte&0x0F 5 \b SP +>>>17 byte&0xF0 64 \b@HL +>>>17 byte&0xF0 96 \b@H-14 +>>>17 byte&0xF0 128 \b@ML +>>>17 byte&0xF0 160 \b@LL +>>>17 byte &0x08 \b progressive +>>>17 byte ^0x08 \b interlaced +>>>17 byte&0x06 2 \b Y'CbCr 4:2:0 video +>>>17 byte&0x06 4 \b Y'CbCr 4:2:2 video +>>>17 byte&0x06 6 \b Y'CbCr 4:4:4 video +>>11 byte &0x02 +>>>75 byte &0x01 +>>>>140 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video +>>>>140 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video +>>>>140 belong 0x000001B5 \b, v2, +>>>>>144 byte&0x0F 1 \b HP +>>>>>144 byte&0x0F 2 \b Spt +>>>>>144 byte&0x0F 3 \b SNR +>>>>>144 byte&0x0F 4 \b MP +>>>>>144 byte&0x0F 5 \b SP +>>>>>145 byte&0xF0 64 \b@HL +>>>>>145 byte&0xF0 96 \b@H-14 +>>>>>145 byte&0xF0 128 \b@ML +>>>>>145 byte&0xF0 160 \b@LL +>>>>>145 byte &0x08 \b progressive +>>>>>145 byte ^0x08 \b interlaced +>>>>>145 byte&0x06 2 \b Y'CbCr 4:2:0 video +>>>>>145 byte&0x06 4 \b Y'CbCr 4:2:2 video +>>>>>145 byte&0x06 6 \b Y'CbCr 4:4:4 video +>>>76 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video +>>>76 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video +>>>76 belong 0x000001B5 \b, v2, +>>>80 byte&0x0F 1 \b HP +>>>80 byte&0x0F 2 \b Spt +>>>80 byte&0x0F 3 \b SNR +>>>80 byte&0x0F 4 \b MP +>>>80 byte&0x0F 5 \b SP +>>>81 byte&0xF0 64 \b@HL +>>>81 byte&0xF0 96 \b@H-14 +>>>81 byte&0xF0 128 \b@ML +>>>81 byte&0xF0 160 \b@LL +>>>81 byte &0x08 \b progressive +>>>81 byte ^0x08 \b interlaced +>>>81 byte&0x06 2 \b Y'CbCr 4:2:0 video +>>>81 byte&0x06 4 \b Y'CbCr 4:2:2 video +>>>81 byte&0x06 6 \b Y'CbCr 4:4:4 video +>>4 belong&0xFFFFFF00 0x78043800 \b, HD-TV 1920P +>>>7 byte&0xF0 0x10 \b, 16:9 +>>4 belong&0xFFFFFF00 0x50002D00 \b, SD-TV 1280I +>>>7 byte&0xF0 0x10 \b, 16:9 +>>4 belong&0xFFFFFF00 0x30024000 \b, PAL Capture +>>>7 byte&0xF0 0x10 \b, 4:3 +>>4 beshort&0xFFF0 0x2C00 \b, 4CIF +>>>5 beshort&0x0FFF 0x01E0 \b NTSC +>>>5 beshort&0x0FFF 0x0240 \b PAL +>>>7 byte&0xF0 0x20 \b, 4:3 +>>>7 byte&0xF0 0x30 \b, 16:9 +>>>7 byte&0xF0 0x40 \b, 11:5 +>>>7 byte&0xF0 0x80 \b, PAL 4:3 +>>>7 byte&0xF0 0xC0 \b, NTSC 4:3 +>>4 belong&0xFFFFFF00 0x2801E000 \b, LD-TV 640P +>>>7 byte&0xF0 0x10 \b, 4:3 +>>4 belong&0xFFFFFF00 0x1400F000 \b, 320x240 +>>>7 byte&0xF0 0x10 \b, 4:3 +>>4 belong&0xFFFFFF00 0x0F00A000 \b, 240x160 +>>>7 byte&0xF0 0x10 \b, 4:3 +>>4 belong&0xFFFFFF00 0x0A007800 \b, 160x120 +>>>7 byte&0xF0 0x10 \b, 4:3 +>>4 beshort&0xFFF0 0x1600 \b, CIF +>>>5 beshort&0x0FFF 0x00F0 \b NTSC +>>>5 beshort&0x0FFF 0x0120 \b PAL +>>>7 byte&0xF0 0x20 \b, 4:3 +>>>7 byte&0xF0 0x30 \b, 16:9 +>>>7 byte&0xF0 0x40 \b, 11:5 +>>>7 byte&0xF0 0x80 \b, PAL 4:3 +>>>7 byte&0xF0 0xC0 \b, NTSC 4:3 +>>>5 beshort&0x0FFF 0x0240 \b PAL 625 +>>>>7 byte&0xF0 0x20 \b, 4:3 +>>>>7 byte&0xF0 0x30 \b, 16:9 +>>>>7 byte&0xF0 0x40 \b, 11:5 +>>4 beshort&0xFFF0 0x2D00 \b, CCIR/ITU +>>>5 beshort&0x0FFF 0x01E0 \b NTSC 525 +>>>5 beshort&0x0FFF 0x0240 \b PAL 625 +>>>7 byte&0xF0 0x20 \b, 4:3 +>>>7 byte&0xF0 0x30 \b, 16:9 +>>>7 byte&0xF0 0x40 \b, 11:5 +>>4 beshort&0xFFF0 0x1E00 \b, SVCD +>>>5 beshort&0x0FFF 0x01E0 \b NTSC 525 +>>>5 beshort&0x0FFF 0x0240 \b PAL 625 +>>>7 byte&0xF0 0x20 \b, 4:3 +>>>7 byte&0xF0 0x30 \b, 16:9 +>>>7 byte&0xF0 0x40 \b, 11:5 +>>7 byte&0x0F 1 \b, 23.976 fps +>>7 byte&0x0F 2 \b, 24 fps +>>7 byte&0x0F 3 \b, 25 fps +>>7 byte&0x0F 4 \b, 29.97 fps +>>7 byte&0x0F 5 \b, 30 fps +>>7 byte&0x0F 6 \b, 50 fps +>>7 byte&0x0F 7 \b, 59.94 fps +>>7 byte&0x0F 8 \b, 60 fps +>>11 byte &0x04 \b, Constrained -# MPEG Audio (*.mpx) +# MPEG ADTS Audio (*.mpx/mxa/aac) # from dreesen@math.fu-berlin.de +# modified to fully support MPEG ADTS + +# MP3, M1A +0 beshort&0xFFFE 0xFFFA MPEG ADTS, layer III, v1 +# rates +>2 byte&0xF0 0x10 \b, 32 kBits +>2 byte&0xF0 0x20 \b, 40 kBits +>2 byte&0xF0 0x30 \b, 48 kBits +>2 byte&0xF0 0x40 \b, 56 kBits +>2 byte&0xF0 0x50 \b, 64 kBits +>2 byte&0xF0 0x60 \b, 80 kBits +>2 byte&0xF0 0x70 \b, 96 kBits +>2 byte&0xF0 0x80 \b, 112 kBits +>2 byte&0xF0 0x90 \b, 128 kBits +>2 byte&0xF0 0xA0 \b, 160 kBits +>2 byte&0xF0 0xB0 \b, 192 kBits +>2 byte&0xF0 0xC0 \b, 224 kBits +>2 byte&0xF0 0xD0 \b, 256 kBits +>2 byte&0xF0 0xE0 \b, 320 kBits +# timing +>2 byte&0x0C 0x00 \b, 44.1 kHz +>2 byte&0x0C 0x04 \b, 48 kHz +>2 byte&0x0C 0x08 \b, 32 kHz +# channels/options +>3 byte&0xC0 0x00 \b, Stereo +>3 byte&0xC0 0x40 \b, JntStereo +>3 byte&0xC0 0x80 \b, 2x Monaural +>3 byte&0xC0 0xC0 \b, Monaural +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Packet Pad +#>2 byte &0x01 \b, Custom Flag +#>3 byte &0x08 \b, Copyrighted +#>3 byte &0x04 \b, Original Source +#>3 byte&0x03 1 \b, NR: 50/15 ms +#>3 byte&0x03 3 \b, NR: CCIT J.17 + +# MP2, M1A +0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1 +# rates +>2 byte&0xF0 0x10 \b, 32 kBits +>2 byte&0xF0 0x20 \b, 48 kBits +>2 byte&0xF0 0x30 \b, 56 kBits +>2 byte&0xF0 0x40 \b, 64 kBits +>2 byte&0xF0 0x50 \b, 80 kBits +>2 byte&0xF0 0x60 \b, 96 kBits +>2 byte&0xF0 0x70 \b, 112 kBits +>2 byte&0xF0 0x80 \b, 128 kBits +>2 byte&0xF0 0x90 \b, 160 kBits +>2 byte&0xF0 0xA0 \b, 192 kBits +>2 byte&0xF0 0xB0 \b, 224 kBits +>2 byte&0xF0 0xC0 \b, 256 kBits +>2 byte&0xF0 0xD0 \b, 320 kBits +>2 byte&0xF0 0xE0 \b, 384 kBits +# timing +>2 byte&0x0C 0x00 \b, 44.1 kHz +>2 byte&0x0C 0x04 \b, 48 kHz +>2 byte&0x0C 0x08 \b, 32 kHz +# channels/options +>3 byte&0xC0 0x00 \b, Stereo +>3 byte&0xC0 0x40 \b, JntStereo +>3 byte&0xC0 0x80 \b, 2x Monaural +>3 byte&0xC0 0xC0 \b, Monaural +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Packet Pad +#>2 byte &0x01 \b, Custom Flag +#>3 byte &0x08 \b, Copyrighted +#>3 byte &0x04 \b, Original Source +#>3 byte&0x03 1 \b, NR: 50/15 ms +#>3 byte&0x03 3 \b, NR: CCIT J.17 + +# MPA, M1A +0 beshort&0xFFFE 0xFFFE MPEG ADTS, layer I, v1 +# rate +>2 byte&0xF0 0x10 \b, 32 kBits +>2 byte&0xF0 0x20 \b, 64 kBits +>2 byte&0xF0 0x30 \b, 96 kBits +>2 byte&0xF0 0x40 \b, 128 kBits +>2 byte&0xF0 0x50 \b, 160 kBits +>2 byte&0xF0 0x60 \b, 192 kBits +>2 byte&0xF0 0x70 \b, 224 kBits +>2 byte&0xF0 0x80 \b, 256 kBits +>2 byte&0xF0 0x90 \b, 288 kBits +>2 byte&0xF0 0xA0 \b, 320 kBits +>2 byte&0xF0 0xB0 \b, 352 kBits +>2 byte&0xF0 0xC0 \b, 384 kBits +>2 byte&0xF0 0xD0 \b, 416 kBits +>2 byte&0xF0 0xE0 \b, 448 kBits +# timing +>2 byte&0x0C 0x00 \b, 44.1 kHz +>2 byte&0x0C 0x04 \b, 48 kHz +>2 byte&0x0C 0x08 \b, 32 kHz +# channels/options +>3 byte&0xC0 0x00 \b, Stereo +>3 byte&0xC0 0x40 \b, JntStereo +>3 byte&0xC0 0x80 \b, 2x Monaural +>3 byte&0xC0 0xC0 \b, Monaural +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Packet Pad +#>2 byte &0x01 \b, Custom Flag +#>3 byte &0x08 \b, Copyrighted +#>3 byte &0x04 \b, Original Source +#>3 byte&0x03 1 \b, NR: 50/15 ms +#>3 byte&0x03 3 \b, NR: CCIT J.17 + +# MP3, M2A +0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2 +# rate +>2 byte&0xF0 0x10 \b, 8 kBits +>2 byte&0xF0 0x20 \b, 16 kBits +>2 byte&0xF0 0x30 \b, 24 kBits +>2 byte&0xF0 0x40 \b, 32 kBits +>2 byte&0xF0 0x50 \b, 40 kBits +>2 byte&0xF0 0x60 \b, 48 kBits +>2 byte&0xF0 0x70 \b, 56 kBits +>2 byte&0xF0 0x80 \b, 64 kBits +>2 byte&0xF0 0x90 \b, 80 kBits +>2 byte&0xF0 0xA0 \b, 96 kBits +>2 byte&0xF0 0xB0 \b, 112 kBits +>2 byte&0xF0 0xC0 \b, 128 kBits +>2 byte&0xF0 0xD0 \b, 144 kBits +>2 byte&0xF0 0xE0 \b, 160 kBits +# timing +>2 byte&0x0C 0x00 \b, 22.05 kHz +>2 byte&0x0C 0x04 \b, 24 kHz +>2 byte&0x0C 0x08 \b, 16 kHz +# channels/options +>3 byte&0xC0 0x00 \b, Stereo +>3 byte&0xC0 0x40 \b, JntStereo +>3 byte&0xC0 0x80 \b, 2x Monaural +>3 byte&0xC0 0xC0 \b, Monaural +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Packet Pad +#>2 byte &0x01 \b, Custom Flag +#>3 byte &0x08 \b, Copyrighted +#>3 byte &0x04 \b, Original Source +#>3 byte&0x03 1 \b, NR: 50/15 ms +#>3 byte&0x03 3 \b, NR: CCIT J.17 + +# MP2, M2A +0 beshort&0xFFFE 0xFFF4 MPEG ADTS, layer II, v2 +# rate +>2 byte&0xF0 0x10 \b, 8 kBits +>2 byte&0xF0 0x20 \b, 16 kBits +>2 byte&0xF0 0x30 \b, 24 kBits +>2 byte&0xF0 0x40 \b, 32 kBits +>2 byte&0xF0 0x50 \b, 40 kBits +>2 byte&0xF0 0x60 \b, 48 kBits +>2 byte&0xF0 0x70 \b, 56 kBits +>2 byte&0xF0 0x80 \b, 64 kBits +>2 byte&0xF0 0x90 \b, 80 kBits +>2 byte&0xF0 0xA0 \b, 96 kBits +>2 byte&0xF0 0xB0 \b, 112 kBits +>2 byte&0xF0 0xC0 \b, 128 kBits +>2 byte&0xF0 0xD0 \b, 144 kBits +>2 byte&0xF0 0xE0 \b, 160 kBits +# timing +>2 byte&0x0C 0x00 \b, 22.05 kHz +>2 byte&0x0C 0x04 \b, 24 kHz +>2 byte&0x0C 0x08 \b, 16 kHz +# channels/options +>3 byte&0xC0 0x00 \b, Stereo +>3 byte&0xC0 0x40 \b, JntStereo +>3 byte&0xC0 0x80 \b, 2x Monaural +>3 byte&0xC0 0xC0 \b, Monaural +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Packet Pad +#>2 byte &0x01 \b, Custom Flag +#>3 byte &0x08 \b, Copyrighted +#>3 byte &0x04 \b, Original Source +#>3 byte&0x03 1 \b, NR: 50/15 ms +#>3 byte&0x03 3 \b, NR: CCIT J.17 -# MPEG 1.0 Layer 3 -0 beshort&0xfffe =0xfffa \bMP3 ->2 byte&0xf0 =0x10 \b, 32 kBits ->2 byte&0xf0 =0x20 \b, 40 kBits ->2 byte&0xf0 =0x30 \b, 48 kBits ->2 byte&0xf0 =0x40 \b, 56 kBits ->2 byte&0xf0 =0x50 \b, 64 kBits ->2 byte&0xf0 =0x60 \b, 80 kBits ->2 byte&0xf0 =0x70 \b, 96 kBits ->2 byte&0xf0 =0x80 \b, 112 kBits ->2 byte&0xf0 =0x90 \b, 128 kBits ->2 byte&0xf0 =0xA0 \b, 160 kBits ->2 byte&0xf0 =0xB0 \b, 192 kBits ->2 byte&0xf0 =0xC0 \b, 224 kBits ->2 byte&0xf0 =0xD0 \b, 256 kBits ->2 byte&0xf0 =0xE0 \b, 320 kBits -# freq ->2 byte&0x0C =0x00 \b, 44.1 kHz ->2 byte&0x0C =0x04 \b, 48 kHz ->2 byte&0x0C =0x08 \b, 32 kHz -# misc ->3 byte&0xC0 =0x00 \b, Stereo ->3 byte&0xC0 =0x40 \b, JStereo ->3 byte&0xC0 =0x80 \b, Dual-Ch ->3 byte&0xC0 =0xC0 \b, Mono -#>1 byte&0x01 =0x00 \b, Error Protection -#>2 byte&0x02 =0x02 \b, Padding -#>2 byte&0x01 =0x01 \b, Private -#>3 byte&0x08 =0x08 \b, Copyright -#>3 byte&0x04 =0x04 \b, Original -#>3 byte&0x03 1 \b, Emphasis 5 -#>3 byte&0x03 3 \b, Emphasis c +# MPA, M2A +0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2 +# rate +>2 byte&0xF0 0x10 \b, 32 kBits +>2 byte&0xF0 0x20 \b, 48 kBits +>2 byte&0xF0 0x30 \b, 56 kBits +>2 byte&0xF0 0x40 \b, 64 kBits +>2 byte&0xF0 0x50 \b, 80 kBits +>2 byte&0xF0 0x60 \b, 96 kBits +>2 byte&0xF0 0x70 \b, 112 kBits +>2 byte&0xF0 0x80 \b, 128 kBits +>2 byte&0xF0 0x90 \b, 144 kBits +>2 byte&0xF0 0xA0 \b, 160 kBits +>2 byte&0xF0 0xB0 \b, 176 kBits +>2 byte&0xF0 0xC0 \b, 192 kBits +>2 byte&0xF0 0xD0 \b, 224 kBits +>2 byte&0xF0 0xE0 \b, 256 kBits +# timing +>2 byte&0x0C 0x00 \b, 22.05 kHz +>2 byte&0x0C 0x04 \b, 24 kHz +>2 byte&0x0C 0x08 \b, 16 kHz +# channels/options +>3 byte&0xC0 0x00 \b, Stereo +>3 byte&0xC0 0x40 \b, JntStereo +>3 byte&0xC0 0x80 \b, 2x Monaural +>3 byte&0xC0 0xC0 \b, Monaural +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Packet Pad +#>2 byte &0x01 \b, Custom Flag +#>3 byte &0x08 \b, Copyrighted +#>3 byte &0x04 \b, Original Source +#>3 byte&0x03 1 \b, NR: 50/15 ms +#>3 byte&0x03 3 \b, NR: CCIT J.17 -# MPEG 1.0 Layer 2 -0 beshort&0xfffe =0xfffc \bMP2 ->2 byte&0xf0 =0x10 \b, 32 kBits ->2 byte&0xf0 =0x20 \b, 48 kBits ->2 byte&0xf0 =0x30 \b, 56 kBits ->2 byte&0xf0 =0x40 \b, 64 kBits ->2 byte&0xf0 =0x50 \b, 80 kBits ->2 byte&0xf0 =0x60 \b, 96 kBits ->2 byte&0xf0 =0x70 \b, 112 kBits ->2 byte&0xf0 =0x80 \b, 128 kBits ->2 byte&0xf0 =0x90 \b, 160 kBits ->2 byte&0xf0 =0xA0 \b, 192 kBits ->2 byte&0xf0 =0xB0 \b, 224 kBits ->2 byte&0xf0 =0xC0 \b, 256 kBits ->2 byte&0xf0 =0xD0 \b, 320 kBits ->2 byte&0xf0 =0xE0 \b, 384 kBits -# freq ->2 byte&0x0C =0x00 \b, 44.1 kHz ->2 byte&0x0C =0x04 \b, 48 kHz ->2 byte&0x0C =0x08 \b, 32 kHz -# misc ->3 byte&0xC0 =0x00 \b, Stereo ->3 byte&0xC0 =0x40 \b, JStereo ->3 byte&0xC0 =0x80 \b, Dual-Ch ->3 byte&0xC0 =0xC0 \b, Mono -#>1 byte&0x01 =0x00 \b, Error Protection -#>2 byte&0x02 =0x02 \b, Padding -#>2 byte&0x01 =0x01 \b, Private -#>3 byte&0x08 =0x08 \b, Copyright -#>3 byte&0x04 =0x04 \b, Original -#>3 byte&0x03 1 \b, Emphasis 5 -#>3 byte&0x03 3 \b, Emphasis c +# MP3, M25A +0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5 +# rate +>2 byte&0xF0 0x10 \b, 8 kBits +>2 byte&0xF0 0x20 \b, 16 kBits +>2 byte&0xF0 0x30 \b, 24 kBits +>2 byte&0xF0 0x40 \b, 32 kBits +>2 byte&0xF0 0x50 \b, 40 kBits +>2 byte&0xF0 0x60 \b, 48 kBits +>2 byte&0xF0 0x70 \b, 56 kBits +>2 byte&0xF0 0x80 \b, 64 kBits +>2 byte&0xF0 0x90 \b, 80 kBits +>2 byte&0xF0 0xA0 \b, 96 kBits +>2 byte&0xF0 0xB0 \b, 112 kBits +>2 byte&0xF0 0xC0 \b, 128 kBits +>2 byte&0xF0 0xD0 \b, 144 kBits +>2 byte&0xF0 0xE0 \b, 160 kBits +# timing +>2 byte&0x0C 0x00 \b, 11.025 kHz +>2 byte&0x0C 0x04 \b, 12 kHz +>2 byte&0x0C 0x08 \b, 8 kHz +# channels/options +>3 byte&0xC0 0x00 \b, Stereo +>3 byte&0xC0 0x40 \b, JntStereo +>3 byte&0xC0 0x80 \b, 2x Monaural +>3 byte&0xC0 0xC0 \b, Monaural +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Packet Pad +#>2 byte &0x01 \b, Custom Flag +#>3 byte &0x08 \b, Copyrighted +#>3 byte &0x04 \b, Original Source +#>3 byte&0x03 1 \b, NR: 50/15 ms +#>3 byte&0x03 3 \b, NR: CCIT J.17 -# MPEG 2.0 -0 beshort&0xfff8 =0xfff0 MP -# Layer 3 ->1 byte &0x02 \b3 -# Layer 2 ->1 byte &0x04 \b2 ->2 byte&0xf0 =0x10 \b, 8 kBits ->2 byte&0xf0 =0x20 \b, 16 kBits ->2 byte&0xf0 =0x30 \b, 24 kBits ->2 byte&0xf0 =0x40 \b, 32 kBits ->2 byte&0xf0 =0x50 \b, 40 kBits ->2 byte&0xf0 =0x60 \b, 48 kBits ->2 byte&0xf0 =0x70 \b, 56 kBits ->2 byte&0xf0 =0x80 \b, 64 kBits ->2 byte&0xf0 =0x90 \b, 80 kBits ->2 byte&0xf0 =0xA0 \b, 96 kBits ->2 byte&0xf0 =0xB0 \b, 112 kBits ->2 byte&0xf0 =0xC0 \b, 128 kBits ->2 byte&0xf0 =0xD0 \b, 144 kBits ->2 byte&0xf0 =0xE0 \b, 160 kBits -# freq ->2 byte&0x0C =0x00 \b, 22.05 kHz ->2 byte&0x0C =0x04 \b, 24 kHz ->2 byte&0x0C =0x08 \b, 16 kHz -# misc ->3 byte&0xC0 =0x00 \b, Stereo ->3 byte&0xC0 =0x40 \b, JStereo ->3 byte&0xC0 =0x80 \b, Dual-Ch ->3 byte&0xC0 =0xC0 \b, Mono -#>1 byte&0x01 =0x00 \b, Error Protection -#>2 byte&0x02 =0x02 \b, Padding -#>2 byte&0x01 =0x01 \b, Private -#>3 byte&0x08 =0x08 \b, Copyright -#>3 byte&0x04 =0x04 \b, Original -#>3 byte&0x03 1 \b, Emphasis 5 -#>3 byte&0x03 3 \b, Emphasis c +# AAC (aka MPEG-2 NBC audio) and MPEG-4 audio -#From: Johan Gade +# Stored AAC streams (instead of the MP4 format) +0 string ADIF MPEG ADIF, AAC +>4 byte &0x80 +>>13 byte &0x10 \b, VBR +>>13 byte ^0x10 \b, CBR +>>16 byte&0x1E 0x02 \b, single stream +>>16 byte&0x1E 0x04 \b, 2 streams +>>16 byte&0x1E 0x06 \b, 3 streams +>>16 byte &0x08 \b, 4 or more streams +>>16 byte &0x10 \b, 8 or more streams +>>4 byte &0x80 \b, Copyrighted +>>13 byte &0x40 \b, Original Source +>>13 byte &0x20 \b, Home Flag +>4 byte ^0x80 +>>4 byte &0x10 \b, VBR +>>4 byte ^0x10 \b, CBR +>>7 byte&0x1E 0x02 \b, single stream +>>7 byte&0x1E 0x04 \b, 2 streams +>>7 byte&0x1E 0x06 \b, 3 streams +>>7 byte &0x08 \b, 4 or more streams +>>7 byte &0x10 \b, 8 or more streams +>>4 byte &0x40 \b, Original Stream(s) +>>4 byte &0x20 \b, Home Source -# MPEG-4 Advanced Audio Coding (AAC) file (perhaps also MPEG-2 ACC?) -16 string M4A MPEG-4 Advanced Audio Coding file (AAC) +# Live or stored single AAC stream (used with MPEG-2 systems) +0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC +>1 byte ^0x08 \b, v2 +>1 byte &0x08 \b, v4 +# profile +>>2 byte &0xC0 \b LTP +>2 byte&0xc0 0x00 \b, Main +>2 byte&0xc0 0x40 \b, LC +>2 byte&0xc0 0x80 \b, SSR +# timing +>2 byte&0x3c 0x00 \b, 96 kHz +>2 byte&0x3c 0x04 \b, 88.2 kHz +>2 byte&0x3c 0x08 \b, 64 kHz +>2 byte&0x3c 0x0c \b, 48 kHz +>2 byte&0x3c 0x10 \b, 44.1 kHz +>2 byte&0x3c 0x14 \b, 32 kHz +>2 byte&0x3c 0x18 \b, 24 kHz +>2 byte&0x3c 0x1c \b, 22.05 kHz +>2 byte&0x3c 0x20 \b, 16 kHz +>2 byte&0x3c 0x24 \b, 12 kHz +>2 byte&0x3c 0x28 \b, 11.025 kHz +>2 byte&0x3c 0x2c \b, 8 kHz +# channels/options +>2 beshort&0x01c0 0x0040 \b, monaural +>2 beshort&0x01c0 0x0080 \b, stereo +>2 beshort&0x01c0 0x00c0 \b, stereo + center +>2 beshort&0x01c0 0x0100 \b, stereo+center+LFE +>2 beshort&0x01c0 0x0140 \b, surround +>2 beshort&0x01c0 0x0180 \b, surround + LFE +>2 beshort &0x01C0 \b, surround + side +#>1 byte ^0x01 \b, Data Verify +#>2 byte &0x02 \b, Custom Flag +#>3 byte &0x20 \b, Original Stream +#>3 byte &0x10 \b, Home Source +#>3 byte &0x08 \b, Copyrighted +# Live MPEG-4 audio streams (instead of RTP FlexMux) +0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS +#>1 beshort&0x1FFF x \b, %u byte packet +>3 byte&0xE0 0x40 +>>4 byte&0x3C 0x04 \b, single stream +>>4 byte&0x3C 0x08 \b, 2 streams +>>4 byte&0x3C 0x0C \b, 3 streams +>>4 byte &0x08 \b, 4 or more streams +>>4 byte &0x20 \b, 8 or more streams +>3 byte&0xC0 0 +>>4 byte&0x78 0x08 \b, single stream +>>4 byte&0x78 0x10 \b, 2 streams +>>4 byte&0x78 0x18 \b, 3 streams +>>4 byte &0x20 \b, 4 or more streams +>>4 byte &0x40 \b, 8 or more streams +0 beshort 0x4DE1 MPEG-4 LO-EP audio stream # FLI animation format 4 leshort 0xAF11 FLI file @@ -166,16 +567,31 @@ # SGI formats 0 string MOVI Silicon Graphics movie file -# Apple Quicktime: Scan for all known top-level QT atom markers -4 string moov Apple QuickTime movie file (moov) -4 string mdat Apple QuickTime movie file (mdat) -4 string ftyp Apple QuickTime movie file (ftyp) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Dec 28 22:02:48 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8921616A4D0; Tue, 28 Dec 2004 22:02:47 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 445F716A4CE for ; Tue, 28 Dec 2004 22:02:47 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B58F643D2F for ; Tue, 28 Dec 2004 22:02:46 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSM2k2P056700 for ; Tue, 28 Dec 2004 22:02:46 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBSM2iK3056671 for perforce@freebsd.org; Tue, 28 Dec 2004 22:02:44 GMT (envelope-from peter@freebsd.org) Date: Tue, 28 Dec 2004 22:02:44 GMT Message-Id: <200412282202.iBSM2iK3056671@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 67809 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 22:02:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=67809 Change 67809 by peter@peter_daintree on 2004/12/28 22:02:28 IFC @67807 Affected files ... .. //depot/projects/hammer/Makefile#29 integrate .. //depot/projects/hammer/Makefile.inc1#82 integrate .. //depot/projects/hammer/UPDATING#70 integrate .. //depot/projects/hammer/UPDATING.64BTT#5 delete .. //depot/projects/hammer/bin/Makefile.inc#8 integrate .. //depot/projects/hammer/bin/ed/Makefile#9 integrate .. //depot/projects/hammer/bin/ps/ps.1#19 integrate .. //depot/projects/hammer/bin/rmail/Makefile#5 integrate .. //depot/projects/hammer/contrib/bind9/FREEBSD-Upgrade#3 integrate .. //depot/projects/hammer/contrib/file/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/file/LEGAL.NOTICE#3 integrate .. //depot/projects/hammer/contrib/file/Magdir/animation#4 integrate .. //depot/projects/hammer/contrib/file/Magdir/archive#5 integrate .. //depot/projects/hammer/contrib/file/Magdir/audio#5 integrate .. //depot/projects/hammer/contrib/file/Magdir/console#3 integrate .. //depot/projects/hammer/contrib/file/Magdir/elf#5 integrate .. //depot/projects/hammer/contrib/file/Magdir/esri#1 branch .. //depot/projects/hammer/contrib/file/Magdir/filesystems#5 integrate .. //depot/projects/hammer/contrib/file/Magdir/linux#4 integrate .. //depot/projects/hammer/contrib/file/Magdir/msdos#4 integrate .. //depot/projects/hammer/contrib/file/Magdir/os9#2 integrate .. //depot/projects/hammer/contrib/file/Magdir/perl#3 integrate .. //depot/projects/hammer/contrib/file/Magdir/plan9#2 integrate .. //depot/projects/hammer/contrib/file/Magdir/sinclair#2 integrate .. //depot/projects/hammer/contrib/file/Magdir/sniffer#3 integrate .. //depot/projects/hammer/contrib/file/Magdir/tex#3 integrate .. //depot/projects/hammer/contrib/file/Magdir/virtutech#1 branch .. //depot/projects/hammer/contrib/file/Magdir/xo65#1 branch .. //depot/projects/hammer/contrib/file/Makefile.am#5 integrate .. //depot/projects/hammer/contrib/file/Makefile.in#5 integrate .. //depot/projects/hammer/contrib/file/PORTING#1 branch .. //depot/projects/hammer/contrib/file/aclocal.m4#5 integrate .. //depot/projects/hammer/contrib/file/apprentice.c#5 integrate .. //depot/projects/hammer/contrib/file/ascmagic.c#5 integrate .. //depot/projects/hammer/contrib/file/compress.c#4 integrate .. //depot/projects/hammer/contrib/file/config.h.in#5 integrate .. //depot/projects/hammer/contrib/file/configure#5 integrate .. //depot/projects/hammer/contrib/file/configure.in#5 integrate .. //depot/projects/hammer/contrib/file/file.c#5 integrate .. //depot/projects/hammer/contrib/file/file.h#5 integrate .. //depot/projects/hammer/contrib/file/fsmagic.c#4 integrate .. //depot/projects/hammer/contrib/file/funcs.c#2 integrate .. //depot/projects/hammer/contrib/file/install-sh#2 integrate .. //depot/projects/hammer/contrib/file/is_tar.c#4 integrate .. //depot/projects/hammer/contrib/file/magic.c#2 integrate .. //depot/projects/hammer/contrib/file/magic.h#2 integrate .. //depot/projects/hammer/contrib/file/magic.mime#5 integrate .. //depot/projects/hammer/contrib/file/mkinstalldirs#2 integrate .. //depot/projects/hammer/contrib/file/names.h#4 integrate .. //depot/projects/hammer/contrib/file/patchlevel.h#5 integrate .. //depot/projects/hammer/contrib/file/print.c#5 integrate .. //depot/projects/hammer/contrib/file/readelf.c#5 integrate .. //depot/projects/hammer/contrib/file/readelf.h#4 integrate .. //depot/projects/hammer/contrib/file/softmagic.c#5 integrate .. //depot/projects/hammer/contrib/file/tar.h#3 integrate .. //depot/projects/hammer/contrib/file/test.c#2 integrate .. //depot/projects/hammer/contrib/groff/tmac/doc-common#10 integrate .. //depot/projects/hammer/etc/Makefile#35 integrate .. //depot/projects/hammer/etc/defaults/Makefile#4 integrate .. //depot/projects/hammer/etc/defaults/rc.conf#45 integrate .. //depot/projects/hammer/etc/devd.conf#17 integrate .. //depot/projects/hammer/etc/isdn/Makefile#4 integrate .. //depot/projects/hammer/etc/mtree/BSD.include.dist#28 integrate .. //depot/projects/hammer/etc/mtree/Makefile#4 integrate .. //depot/projects/hammer/etc/namedb/Makefile#3 integrate .. //depot/projects/hammer/etc/pam.d/Makefile#6 integrate .. //depot/projects/hammer/etc/periodic/Makefile.inc#2 integrate .. //depot/projects/hammer/etc/rc.d/jail#12 integrate .. //depot/projects/hammer/etc/rc.d/named#10 integrate .. //depot/projects/hammer/etc/rc.d/ppp-user#7 integrate .. //depot/projects/hammer/etc/rc.shutdown#8 integrate .. //depot/projects/hammer/games/factor/Makefile#6 integrate .. //depot/projects/hammer/games/fortune/datfiles/fortunes#33 integrate .. //depot/projects/hammer/games/fortune/unstr/Makefile#3 integrate .. //depot/projects/hammer/games/ppt/Makefile#4 integrate .. //depot/projects/hammer/games/primes/Makefile#3 integrate .. //depot/projects/hammer/gnu/Makefile.inc#3 integrate .. //depot/projects/hammer/gnu/lib/libdialog/Makefile#5 integrate .. //depot/projects/hammer/gnu/lib/libg2c/Makefile#6 integrate .. //depot/projects/hammer/gnu/lib/libgcc/Makefile#12 integrate .. //depot/projects/hammer/gnu/lib/libgcov/Makefile#3 integrate .. //depot/projects/hammer/gnu/lib/libobjc/Makefile#9 integrate .. //depot/projects/hammer/gnu/usr.bin/binutils/ar/Makefile#4 integrate .. //depot/projects/hammer/gnu/usr.bin/binutils/as/Makefile#6 integrate .. //depot/projects/hammer/gnu/usr.bin/binutils/gdb/Makefile#13 integrate .. //depot/projects/hammer/gnu/usr.bin/binutils/gdbreplay/Makefile#3 integrate .. //depot/projects/hammer/gnu/usr.bin/binutils/ld/Makefile#8 integrate .. //depot/projects/hammer/gnu/usr.bin/binutils/ranlib/Makefile#5 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/c++/Makefile#5 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/c++filt/Makefile#7 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/cc/Makefile#4 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/cc1/Makefile#6 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/cc1obj/Makefile#5 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/cc1plus/Makefile#7 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/collect2/Makefile#4 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/f771/Makefile#6 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/include/Makefile#7 integrate .. //depot/projects/hammer/gnu/usr.bin/cc/protoize/Makefile#2 integrate .. //depot/projects/hammer/gnu/usr.bin/cvs/cvs/Makefile#10 integrate .. //depot/projects/hammer/gnu/usr.bin/dialog/TESTS/Makefile#3 integrate .. //depot/projects/hammer/gnu/usr.bin/gdb/Makefile.inc#6 integrate .. //depot/projects/hammer/gnu/usr.bin/gdb/gdbtui/Makefile#5 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/font/devX100-12/Makefile#2 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/font/devX100/Makefile#2 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/font/devX75-12/Makefile#2 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/font/devX75/Makefile#2 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/src/devices/grohtml/Makefile#5 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/src/preproc/html/Makefile#5 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/tmac/mdoc.local#18 integrate .. //depot/projects/hammer/gnu/usr.bin/texinfo/infokey/Makefile#3 integrate .. //depot/projects/hammer/include/arpa/Makefile#3 integrate .. //depot/projects/hammer/include/protocols/Makefile#3 integrate .. //depot/projects/hammer/installworld_newk#2 delete .. //depot/projects/hammer/installworld_oldk#2 delete .. //depot/projects/hammer/kerberos5/Makefile.inc#11 integrate .. //depot/projects/hammer/kerberos5/libexec/ipropd-master/Makefile#8 integrate .. //depot/projects/hammer/kerberos5/libexec/ipropd-slave/Makefile#8 integrate .. //depot/projects/hammer/kerberos5/tools/asn1_compile/Makefile#2 integrate .. //depot/projects/hammer/kerberos5/tools/make-print-version/Makefile#2 integrate .. //depot/projects/hammer/kerberos5/tools/make-roken/Makefile#2 integrate .. //depot/projects/hammer/kerberos5/usr.bin/ksu/Makefile#7 integrate .. //depot/projects/hammer/lib/Makefile#46 integrate .. //depot/projects/hammer/lib/bind/config.mk#5 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_compression_bzip2.c#6 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#18 integrate .. //depot/projects/hammer/lib/libarchive/archive_string.c#6 integrate .. //depot/projects/hammer/lib/libarchive/archive_string.h#5 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_format_pax.c#16 integrate .. //depot/projects/hammer/lib/libarchive/libarchive-formats.5#3 integrate .. //depot/projects/hammer/lib/libbsnmp/modules/Makefile#3 integrate .. //depot/projects/hammer/lib/libc/gen/signal.3#8 integrate .. //depot/projects/hammer/lib/libc/gen/sigsetops.3#4 integrate .. //depot/projects/hammer/lib/libc/gen/syslog.c#7 integrate .. //depot/projects/hammer/lib/libc/sys/_exit.2#3 integrate .. //depot/projects/hammer/lib/libc/sys/acct.2#6 integrate .. //depot/projects/hammer/lib/libc/sys/adjtime.2#3 integrate .. //depot/projects/hammer/lib/libc/sys/aio_suspend.2#5 integrate .. //depot/projects/hammer/lib/libc/sys/getitimer.2#5 integrate .. //depot/projects/hammer/lib/libc/sys/recv.2#7 integrate .. //depot/projects/hammer/lib/libc/sys/select.2#9 integrate .. //depot/projects/hammer/lib/libc_r/Makefile#9 integrate .. //depot/projects/hammer/lib/libcompat/Makefile#4 integrate .. //depot/projects/hammer/lib/libcrypt/Makefile#6 integrate .. //depot/projects/hammer/lib/libdisk/Makefile#9 integrate .. //depot/projects/hammer/lib/libdisk/disk.c#20 integrate .. //depot/projects/hammer/lib/libfetch/Makefile#10 integrate .. //depot/projects/hammer/lib/libio/Makefile#3 integrate .. //depot/projects/hammer/lib/libipsec/Makefile#5 integrate .. //depot/projects/hammer/lib/libmagic/config.h#2 integrate .. //depot/projects/hammer/lib/libmilter/Makefile#4 integrate .. //depot/projects/hammer/lib/libncp/Makefile#3 integrate .. //depot/projects/hammer/lib/libncurses/Makefile#15 integrate .. //depot/projects/hammer/lib/libpam/libpam/Makefile#14 integrate .. //depot/projects/hammer/lib/libpam/modules/Makefile.inc#5 integrate .. //depot/projects/hammer/lib/libpam/modules/modules.inc#10 integrate .. //depot/projects/hammer/lib/libpcap/Makefile#6 integrate .. //depot/projects/hammer/lib/libpcap/config.h#3 integrate .. //depot/projects/hammer/lib/libpthread/pthread.map#12 integrate .. //depot/projects/hammer/lib/libpthread/sys/thr_error.c#5 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_cancel.c#15 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_clean.c#3 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_concurrency.c#7 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_cond.c#17 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_create.c#18 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_fork.c#5 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_init.c#18 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_kern.c#35 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_mutex.c#15 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_once.c#4 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_private.h#31 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_sem.c#5 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_sig.c#25 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_sigsuspend.c#12 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_spinlock.c#11 integrate .. //depot/projects/hammer/lib/libradius/Makefile#7 integrate .. //depot/projects/hammer/lib/librpcsvc/Makefile#7 integrate .. //depot/projects/hammer/lib/libsm/Makefile#6 integrate .. //depot/projects/hammer/lib/libsmb/Makefile#5 integrate .. //depot/projects/hammer/lib/libstand/Makefile#11 integrate .. //depot/projects/hammer/lib/libtelnet/Makefile#6 integrate .. //depot/projects/hammer/lib/libutil/_secure_path.c#3 integrate .. //depot/projects/hammer/lib/libwrap/Makefile#7 integrate .. //depot/projects/hammer/lib/liby/Makefile#5 integrate .. //depot/projects/hammer/lib/msun/bsdsrc/b_exp.c#3 integrate .. //depot/projects/hammer/lib/msun/bsdsrc/b_log.c#3 integrate .. //depot/projects/hammer/lib/msun/bsdsrc/b_tgamma.c#2 integrate .. //depot/projects/hammer/lib/msun/bsdsrc/mathimpl.h#3 integrate .. //depot/projects/hammer/libexec/Makefile#26 integrate .. //depot/projects/hammer/libexec/bootpd/bootpgw/Makefile#3 integrate .. //depot/projects/hammer/libexec/ftpd/Makefile#6 integrate .. //depot/projects/hammer/libexec/ftpd/ftpd.c#24 integrate .. //depot/projects/hammer/libexec/lukemftpd/Makefile#10 integrate .. //depot/projects/hammer/libexec/pt_chown/Makefile#3 integrate .. //depot/projects/hammer/libexec/save-entropy/Makefile#3 integrate .. //depot/projects/hammer/libexec/tcpd/Makefile#4 integrate .. //depot/projects/hammer/libexec/telnetd/Makefile#5 integrate .. //depot/projects/hammer/release/Makefile#66 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#68 integrate .. //depot/projects/hammer/release/doc/share/misc/dev.archlist.txt#18 integrate .. //depot/projects/hammer/release/doc/share/misc/man2hwnotes.pl#6 integrate .. //depot/projects/hammer/release/picobsd/bridge/crunch.conf#5 integrate .. //depot/projects/hammer/release/picobsd/build/picobsd#4 integrate .. //depot/projects/hammer/release/picobsd/tinyware/aps/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/help/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/login/Makefile#4 integrate .. //depot/projects/hammer/release/picobsd/tinyware/msg/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/ns/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/oinit/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/passwd/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/simple_httpd/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/sps/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/view/Makefile#3 integrate .. //depot/projects/hammer/release/picobsd/tinyware/vm/Makefile#3 integrate .. //depot/projects/hammer/rescue/rescue/Makefile#20 integrate .. //depot/projects/hammer/sbin/Makefile#32 integrate .. //depot/projects/hammer/sbin/Makefile.inc#7 integrate .. //depot/projects/hammer/sbin/atm/atmconfig/Makefile#6 integrate .. //depot/projects/hammer/sbin/devd/Makefile#6 integrate .. //depot/projects/hammer/sbin/dhclient/dhcpctl/Makefile#3 integrate .. //depot/projects/hammer/sbin/dhclient/omapip/Makefile#3 integrate .. //depot/projects/hammer/sbin/geom/class/mirror/geom_mirror.c#4 integrate .. //depot/projects/hammer/sbin/geom/class/raid3/geom_raid3.c#7 integrate .. //depot/projects/hammer/sbin/geom/core/Makefile#4 integrate .. //depot/projects/hammer/sbin/geom/core/geom.c#5 integrate .. //depot/projects/hammer/sbin/growfs/growfs.8#7 integrate .. //depot/projects/hammer/sbin/gvinum/Makefile#3 integrate .. //depot/projects/hammer/sbin/init/Makefile#5 integrate .. //depot/projects/hammer/sbin/mca/Makefile#4 integrate .. //depot/projects/hammer/sbin/mdconfig/mdconfig.c#15 integrate .. //depot/projects/hammer/sbin/mknod/mknod.8#9 integrate .. //depot/projects/hammer/sbin/mount/mount.8#14 integrate .. //depot/projects/hammer/sbin/mount_cd9660/Makefile#4 integrate .. //depot/projects/hammer/sbin/mount_msdosfs/Makefile#4 integrate .. //depot/projects/hammer/sbin/mount_ntfs/Makefile#4 integrate .. //depot/projects/hammer/sbin/mount_udf/Makefile#4 integrate .. //depot/projects/hammer/sbin/mount_ufs/Makefile#2 integrate .. //depot/projects/hammer/sbin/rtsol/Makefile#6 integrate .. //depot/projects/hammer/secure/Makefile#6 integrate .. //depot/projects/hammer/secure/lib/libcrypto/Makefile#14 integrate .. //depot/projects/hammer/secure/lib/libssh/Makefile#9 integrate .. //depot/projects/hammer/secure/lib/libssl/Makefile#7 integrate .. //depot/projects/hammer/secure/usr.sbin/sshd/Makefile#10 integrate .. //depot/projects/hammer/share/dict/Makefile#3 integrate .. //depot/projects/hammer/share/doc/IPv6/Makefile#3 integrate .. //depot/projects/hammer/share/doc/bind9/Makefile#3 integrate .. //depot/projects/hammer/share/examples/FreeBSD_version/Makefile#2 integrate .. //depot/projects/hammer/share/examples/Makefile#8 integrate .. //depot/projects/hammer/share/examples/autofs/driver/Makefile#4 integrate .. //depot/projects/hammer/share/examples/cvsup/ports-supfile#8 integrate .. //depot/projects/hammer/share/examples/etc/make.conf#31 integrate .. //depot/projects/hammer/share/examples/find_interface/Makefile#2 integrate .. //depot/projects/hammer/share/examples/ipfilter/Makefile#3 integrate .. //depot/projects/hammer/share/examples/isdn/v21/Makefile#4 integrate .. //depot/projects/hammer/share/examples/kld/cdev/test/Makefile#3 integrate .. //depot/projects/hammer/share/examples/kld/syscall/test/Makefile#3 integrate .. //depot/projects/hammer/share/examples/libvgl/Makefile#4 integrate .. //depot/projects/hammer/share/examples/perfmon/Makefile#2 integrate .. //depot/projects/hammer/share/examples/pf/Makefile#3 integrate .. //depot/projects/hammer/share/examples/ppi/Makefile#3 integrate .. //depot/projects/hammer/share/examples/ppp/ppp.conf.isdn#3 integrate .. //depot/projects/hammer/share/examples/ppp/ppp.conf.sample#6 integrate .. //depot/projects/hammer/share/examples/ppp/ppp.conf.span-isp#4 integrate .. //depot/projects/hammer/share/examples/ppp/ppp.conf.span-isp.working#3 integrate .. //depot/projects/hammer/share/examples/smbfs/Makefile#3 integrate .. //depot/projects/hammer/share/examples/smbfs/print/Makefile#3 integrate .. //depot/projects/hammer/share/info/Makefile#3 integrate .. //depot/projects/hammer/share/man/Makefile#4 integrate .. //depot/projects/hammer/share/man/man3/Makefile#9 integrate .. //depot/projects/hammer/share/man/man4/Makefile#60 integrate .. //depot/projects/hammer/share/man/man4/aac.4#9 integrate .. //depot/projects/hammer/share/man/man4/acpi.4#29 integrate .. //depot/projects/hammer/share/man/man4/altq.4#5 integrate .. //depot/projects/hammer/share/man/man4/ata.4#11 integrate .. //depot/projects/hammer/share/man/man4/ath.4#20 integrate .. //depot/projects/hammer/share/man/man4/atkbd.4#4 integrate .. //depot/projects/hammer/share/man/man4/aue.4#8 integrate .. //depot/projects/hammer/share/man/man4/bge.4#12 integrate .. //depot/projects/hammer/share/man/man4/bpf.4#7 integrate .. //depot/projects/hammer/share/man/man4/de.4#7 integrate .. //depot/projects/hammer/share/man/man4/divert.4#7 integrate .. //depot/projects/hammer/share/man/man4/ef.4#3 integrate .. //depot/projects/hammer/share/man/man4/firewire.4#7 integrate .. //depot/projects/hammer/share/man/man4/fwe.4#4 integrate .. //depot/projects/hammer/share/man/man4/fwip.4#2 integrate .. //depot/projects/hammer/share/man/man4/fwohci.4#7 integrate .. //depot/projects/hammer/share/man/man4/lp.4#4 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/cs.4#3 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/ndis.4#7 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/ray.4#3 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/wl.4#3 integrate .. //depot/projects/hammer/share/man/man4/man4.sparc64/Makefile#2 integrate .. //depot/projects/hammer/share/man/man4/man4.sparc64/snd_audiocs.4#1 branch .. //depot/projects/hammer/share/man/man4/mpt.4#5 integrate .. //depot/projects/hammer/share/man/man4/netgraph.4#8 integrate .. //depot/projects/hammer/share/man/man4/ng_bt3c.4#8 integrate .. //depot/projects/hammer/share/man/man4/ng_etf.4#3 integrate .. //depot/projects/hammer/share/man/man4/ng_netflow.4#2 integrate .. //depot/projects/hammer/share/man/man4/ng_source.4#4 integrate .. //depot/projects/hammer/share/man/man4/pccbb.4#6 integrate .. //depot/projects/hammer/share/man/man4/polling.4#13 integrate .. //depot/projects/hammer/share/man/man4/pst.4#3 integrate .. //depot/projects/hammer/share/man/man4/random.4#8 integrate .. //depot/projects/hammer/share/man/man4/smp.4#8 integrate .. //depot/projects/hammer/share/man/man4/snd_maestro.4#1 branch .. //depot/projects/hammer/share/man/man4/snd_maestro3.4#2 integrate .. //depot/projects/hammer/share/man/man4/ti.4#9 integrate .. //depot/projects/hammer/share/man/man4/txp.4#4 integrate .. //depot/projects/hammer/share/man/man4/ubser.4#4 integrate .. //depot/projects/hammer/share/man/man4/umass.4#14 integrate .. //depot/projects/hammer/share/man/man4/vlan.4#9 integrate .. //depot/projects/hammer/share/man/man4/vpo.4#6 integrate .. //depot/projects/hammer/share/man/man4/wi.4#19 integrate .. //depot/projects/hammer/share/man/man4/xl.4#8 integrate .. //depot/projects/hammer/share/man/man5/make.conf.5#30 integrate .. //depot/projects/hammer/share/man/man5/rc.conf.5#45 integrate .. //depot/projects/hammer/share/man/man7/hier.7#23 integrate .. //depot/projects/hammer/share/man/man7/ports.7#11 integrate .. //depot/projects/hammer/share/man/man7/release.7#23 integrate .. //depot/projects/hammer/share/man/man8/picobsd.8#5 integrate .. //depot/projects/hammer/share/man/man9/Makefile#46 integrate .. //depot/projects/hammer/share/man/man9/kernel_mount.9#1 branch .. //depot/projects/hammer/share/misc/Makefile#4 integrate .. //depot/projects/hammer/share/misc/bsd-family-tree#22 integrate .. //depot/projects/hammer/share/mk/Makefile#5 integrate .. //depot/projects/hammer/share/mk/bsd.README#7 integrate .. //depot/projects/hammer/share/mk/bsd.compat.mk#1 branch .. //depot/projects/hammer/share/mk/bsd.dep.mk#10 integrate .. //depot/projects/hammer/share/mk/bsd.doc.mk#3 integrate .. //depot/projects/hammer/share/mk/bsd.info.mk#4 integrate .. //depot/projects/hammer/share/mk/bsd.init.mk#2 integrate .. //depot/projects/hammer/share/mk/bsd.lib.mk#21 integrate .. //depot/projects/hammer/share/mk/bsd.libnames.mk#25 integrate .. //depot/projects/hammer/share/mk/bsd.man.mk#6 integrate .. //depot/projects/hammer/share/mk/bsd.obj.mk#6 integrate .. //depot/projects/hammer/share/mk/bsd.pkg.mk#1 branch .. //depot/projects/hammer/share/mk/bsd.prog.mk#12 integrate .. //depot/projects/hammer/share/mk/sys.mk#18 integrate .. //depot/projects/hammer/share/security/Makefile#4 integrate .. //depot/projects/hammer/share/sendmail/Makefile#5 integrate .. //depot/projects/hammer/share/skel/Makefile#4 integrate .. //depot/projects/hammer/share/snmp/mibs/Makefile#3 integrate .. //depot/projects/hammer/share/syscons/fonts/Makefile#6 integrate .. //depot/projects/hammer/share/syscons/keymaps/Makefile#12 integrate .. //depot/projects/hammer/sys/alpha/alpha/machdep.c#29 integrate .. //depot/projects/hammer/sys/alpha/alpha/pmap.c#40 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#120 integrate .. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#60 integrate .. //depot/projects/hammer/sys/amd64/isa/isa.c#12 integrate .. //depot/projects/hammer/sys/arm/arm/intr.c#6 integrate .. //depot/projects/hammer/sys/arm/arm/pmap.c#14 integrate .. //depot/projects/hammer/sys/arm/arm/swtch.S#10 integrate .. //depot/projects/hammer/sys/arm/conf/SIMICS#6 integrate .. //depot/projects/hammer/sys/arm/include/atomic.h#4 integrate .. //depot/projects/hammer/sys/arm/sa11x0/assabet_machdep.c#7 integrate .. //depot/projects/hammer/sys/arm/sa11x0/sa11x0_irqhandler.c#3 integrate .. //depot/projects/hammer/sys/arm/xscale/i80321/i80321_pci.c#2 integrate .. //depot/projects/hammer/sys/boot/Makefile#15 integrate .. //depot/projects/hammer/sys/boot/alpha/boot1/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/alpha/cdboot/Makefile#3 integrate .. //depot/projects/hammer/sys/boot/alpha/common/Makefile.common#5 integrate .. //depot/projects/hammer/sys/boot/alpha/netboot/Makefile#3 integrate .. //depot/projects/hammer/sys/boot/arc/loader/Makefile#2 integrate .. //depot/projects/hammer/sys/boot/i386/boot0/Makefile#8 integrate .. //depot/projects/hammer/sys/boot/i386/btx/btx/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/i386/btx/btxldr/Makefile#7 integrate .. //depot/projects/hammer/sys/boot/i386/btx/lib/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/i386/cdboot/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/i386/kgzldr/Makefile#7 integrate .. //depot/projects/hammer/sys/boot/i386/loader/Makefile#10 integrate .. //depot/projects/hammer/sys/boot/i386/mbr/Makefile#6 integrate .. //depot/projects/hammer/sys/boot/ia64/efi/Makefile#2 integrate .. //depot/projects/hammer/sys/boot/ia64/ski/Makefile#3 integrate .. //depot/projects/hammer/sys/boot/pc98/boot0.5/Makefile#3 integrate .. //depot/projects/hammer/sys/boot/pc98/boot0/Makefile#3 integrate .. //depot/projects/hammer/sys/boot/pc98/boot2/Makefile#7 integrate .. //depot/projects/hammer/sys/boot/pc98/btx/btx/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/pc98/btx/btxldr/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/pc98/btx/lib/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/pc98/kgzldr/Makefile#7 integrate .. //depot/projects/hammer/sys/boot/pc98/loader/Makefile#8 integrate .. //depot/projects/hammer/sys/boot/powerpc/loader/Makefile#9 integrate .. //depot/projects/hammer/sys/boot/sparc64/boot1/Makefile#3 integrate .. //depot/projects/hammer/sys/boot/sparc64/loader/Makefile#8 integrate .. //depot/projects/hammer/sys/conf/NOTES#75 integrate .. //depot/projects/hammer/sys/conf/files#98 integrate .. //depot/projects/hammer/sys/conf/files.amd64#61 integrate .. //depot/projects/hammer/sys/conf/majors#26 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/fil.c#7 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_auth.c#5 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_compat.h#7 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_fil.c#13 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_fil.h#6 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_frag.c#5 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_log.c#6 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_nat.c#5 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_nat.h#5 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_proxy.c#4 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_state.c#6 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_state.h#4 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/mlfk_ipl.c#5 integrate .. //depot/projects/hammer/sys/contrib/pf/net/pf.c#18 integrate .. //depot/projects/hammer/sys/crypto/rijndael/Makefile#3 integrate .. //depot/projects/hammer/sys/dev/aac/aac_pci.c#18 integrate .. //depot/projects/hammer/sys/dev/acpi_support/acpi_asus.c#2 integrate .. //depot/projects/hammer/sys/dev/acpi_support/acpi_ibm.c#2 integrate .. //depot/projects/hammer/sys/dev/acpi_support/acpi_panasonic.c#2 integrate .. //depot/projects/hammer/sys/dev/acpi_support/acpi_sony.c#3 integrate .. //depot/projects/hammer/sys/dev/acpi_support/acpi_toshiba.c#2 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi.c#51 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_cmbat.c#21 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_ec.c#27 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_pci_link.c#26 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_pcib.c#23 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_pcib_pci.c#9 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_powerres.c#14 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_resource.c#16 integrate .. //depot/projects/hammer/sys/dev/acpica/acpivar.h#37 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aicasm/Makefile#7 integrate .. //depot/projects/hammer/sys/dev/ata/ata-chipset.c#50 integrate .. //depot/projects/hammer/sys/dev/ata/ata-lowlevel.c#24 integrate .. //depot/projects/hammer/sys/dev/ath/ath_rate/amrr/amrr.c#2 integrate .. //depot/projects/hammer/sys/dev/ath/ath_rate/onoe/onoe.c#3 integrate .. //depot/projects/hammer/sys/dev/ath/if_ath.c#24 integrate .. //depot/projects/hammer/sys/dev/bge/if_bge.c#40 integrate .. //depot/projects/hammer/sys/dev/bge/if_bgereg.h#20 integrate .. //depot/projects/hammer/sys/dev/bktr/bktr_card.c#7 integrate .. //depot/projects/hammer/sys/dev/bktr/bktr_card.h#4 integrate .. //depot/projects/hammer/sys/dev/bktr/bktr_tuner.c#5 integrate .. //depot/projects/hammer/sys/dev/bktr/bktr_tuner.h#2 integrate .. //depot/projects/hammer/sys/dev/bktr/msp34xx.c#5 integrate .. //depot/projects/hammer/sys/dev/cp/if_cp.c#13 integrate .. //depot/projects/hammer/sys/dev/ctau/if_ct.c#15 integrate .. //depot/projects/hammer/sys/dev/cx/if_cx.c#22 integrate .. //depot/projects/hammer/sys/dev/drm/drm_sysctl.h#7 integrate .. //depot/projects/hammer/sys/dev/fb/vga.c#19 integrate .. //depot/projects/hammer/sys/dev/fxp/if_fxp.c#38 integrate .. //depot/projects/hammer/sys/dev/hptmv/entry.c#3 integrate .. //depot/projects/hammer/sys/dev/ida/ida.c#12 integrate .. //depot/projects/hammer/sys/dev/ida/ida_pci.c#9 integrate .. //depot/projects/hammer/sys/dev/ida/idavar.h#6 integrate .. //depot/projects/hammer/sys/dev/kbd/atkbd.c#10 integrate .. //depot/projects/hammer/sys/dev/kbd/atkbdreg.h#2 integrate .. //depot/projects/hammer/sys/dev/kbd/kbd.c#10 integrate .. //depot/projects/hammer/sys/dev/md/md.c#45 integrate .. //depot/projects/hammer/sys/dev/mpt/mpt_pci.c#9 integrate .. //depot/projects/hammer/sys/dev/nmdm/nmdm.c#17 integrate .. //depot/projects/hammer/sys/dev/ofw/ofw_disk.c#11 integrate .. //depot/projects/hammer/sys/dev/patm/genrtab/Makefile#4 integrate .. //depot/projects/hammer/sys/dev/pccbb/pccbb_pci.c#3 integrate .. //depot/projects/hammer/sys/dev/pccbb/pccbbdevid.h#8 integrate .. //depot/projects/hammer/sys/dev/random/randomdev.c#20 integrate .. //depot/projects/hammer/sys/dev/random/randomdev_soft.c#9 integrate .. //depot/projects/hammer/sys/dev/snp/snp.c#15 integrate .. //depot/projects/hammer/sys/dev/sound/usb/uaudio.c#3 integrate .. //depot/projects/hammer/sys/dev/sound/usb/uaudio.h#2 integrate .. //depot/projects/hammer/sys/dev/sound/usb/uaudio_pcm.c#6 integrate .. //depot/projects/hammer/sys/dev/sound/usb/uaudioreg.h#3 integrate .. //depot/projects/hammer/sys/dev/twe/twe.c#11 integrate .. //depot/projects/hammer/sys/dev/twe/tweio.h#5 integrate .. //depot/projects/hammer/sys/dev/usb/ehci.c#17 integrate .. //depot/projects/hammer/sys/dev/usb/ohci.c#18 integrate .. //depot/projects/hammer/sys/dev/usb/ugen.c#24 integrate .. //depot/projects/hammer/sys/dev/usb/uhid.c#17 integrate .. //depot/projects/hammer/sys/dev/usb/ukbd.c#11 integrate .. //depot/projects/hammer/sys/dev/usb/umodem.c#8 integrate .. //depot/projects/hammer/sys/dev/usb/ums.c#14 integrate .. //depot/projects/hammer/sys/dev/usb/uplcom.c#14 integrate .. //depot/projects/hammer/sys/dev/usb/urio.c#9 integrate .. //depot/projects/hammer/sys/dev/usb/usb.c#13 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs#54 integrate .. //depot/projects/hammer/sys/dev/usb/usbdi.h#6 integrate .. //depot/projects/hammer/sys/dev/usb/uscanner.c#20 integrate .. //depot/projects/hammer/sys/dev/vkbd/vkbd.c#2 integrate .. //depot/projects/hammer/sys/dev/wi/if_wi.c#31 integrate .. //depot/projects/hammer/sys/fs/devfs/devfs_vnops.c#22 integrate .. //depot/projects/hammer/sys/fs/fifofs/fifo_vnops.c#26 integrate .. //depot/projects/hammer/sys/fs/ntfs/ntfs_vfsops.c#19 integrate .. //depot/projects/hammer/sys/geom/bde/g_bde_lock.c#7 integrate .. //depot/projects/hammer/sys/geom/geom.h#33 integrate .. //depot/projects/hammer/sys/geom/mirror/g_mirror.c#16 integrate .. //depot/projects/hammer/sys/geom/mirror/g_mirror.h#4 integrate .. //depot/projects/hammer/sys/geom/mirror/g_mirror_ctl.c#2 integrate .. //depot/projects/hammer/sys/geom/raid3/g_raid3.c#12 integrate .. //depot/projects/hammer/sys/geom/raid3/g_raid3.h#5 integrate .. //depot/projects/hammer/sys/geom/raid3/g_raid3_ctl.c#4 integrate .. //depot/projects/hammer/sys/gnu/ext2fs/ext2_vnops.c#19 integrate .. //depot/projects/hammer/sys/i386/i386/intr_machdep.c#15 integrate .. //depot/projects/hammer/sys/i386/i386/local_apic.c#10 integrate .. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#38 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#65 integrate .. //depot/projects/hammer/sys/i386/i386/vm_machdep.c#37 integrate .. //depot/projects/hammer/sys/i386/include/apicreg.h#3 integrate .. //depot/projects/hammer/sys/i386/include/apicvar.h#10 integrate .. //depot/projects/hammer/sys/i386/include/intr_machdep.h#5 integrate .. //depot/projects/hammer/sys/i386/isa/isa.c#6 integrate .. //depot/projects/hammer/sys/i386/pci/pci_cfgreg.c#20 integrate .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#41 integrate .. //depot/projects/hammer/sys/isa/isa_common.c#12 integrate .. //depot/projects/hammer/sys/isa/isa_common.h#3 integrate .. //depot/projects/hammer/sys/isa/pnp.c#6 integrate .. //depot/projects/hammer/sys/isa/pnpvar.h#2 integrate .. //depot/projects/hammer/sys/kern/init_sysent.c#38 integrate .. //depot/projects/hammer/sys/kern/kern_clock.c#22 integrate .. //depot/projects/hammer/sys/kern/kern_descrip.c#41 integrate .. //depot/projects/hammer/sys/kern/kern_exec.c#41 integrate .. //depot/projects/hammer/sys/kern/kern_fork.c#47 integrate .. //depot/projects/hammer/sys/kern/kern_kse.c#17 integrate .. //depot/projects/hammer/sys/kern/kern_sig.c#52 integrate .. //depot/projects/hammer/sys/kern/kern_subr.c#20 integrate .. //depot/projects/hammer/sys/kern/kern_switch.c#37 integrate .. //depot/projects/hammer/sys/kern/kern_synch.c#46 integrate .. //depot/projects/hammer/sys/kern/kern_thread.c#73 integrate .. //depot/projects/hammer/sys/kern/kern_umtx.c#15 integrate .. //depot/projects/hammer/sys/kern/sched_4bsd.c#33 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#53 integrate .. //depot/projects/hammer/sys/kern/subr_disk.c#12 integrate .. //depot/projects/hammer/sys/kern/subr_trap.c#29 integrate .. //depot/projects/hammer/sys/kern/subr_witness.c#37 integrate .. //depot/projects/hammer/sys/kern/syscalls.c#37 integrate .. //depot/projects/hammer/sys/kern/syscalls.master#37 integrate .. //depot/projects/hammer/sys/kern/tty.c#40 integrate .. //depot/projects/hammer/sys/kern/tty_pty.c#24 integrate .. //depot/projects/hammer/sys/kern/uipc_mbuf.c#23 integrate .. //depot/projects/hammer/sys/kern/uipc_sem.c#9 integrate .. //depot/projects/hammer/sys/kern/uipc_socket.c#47 integrate .. //depot/projects/hammer/sys/kern/uipc_socket2.c#29 integrate .. //depot/projects/hammer/sys/kern/uipc_usrreq.c#28 integrate .. //depot/projects/hammer/sys/kern/vfs_mount.c#45 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#66 integrate .. //depot/projects/hammer/sys/modules/Makefile#63 integrate .. //depot/projects/hammer/sys/modules/acpi/acpi_asus/Makefile#5 integrate .. //depot/projects/hammer/sys/modules/acpi/acpi_ibm/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/acpi/acpi_video/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/cp/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/if_gif/Makefile#5 integrate .. //depot/projects/hammer/sys/modules/ipfilter/Makefile#5 integrate .. //depot/projects/hammer/sys/modules/netgraph/Makefile#13 integrate .. //depot/projects/hammer/sys/modules/netgraph/fec/sample_startup#2 delete .. //depot/projects/hammer/sys/modules/pf/Makefile#6 integrate .. //depot/projects/hammer/sys/modules/sppp/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/wlan_ccmp/Makefile#2 integrate .. //depot/projects/hammer/sys/net/bpf.c#25 integrate .. //depot/projects/hammer/sys/net/if_sppp.h#3 integrate .. //depot/projects/hammer/sys/net/if_spppfr.c#1 branch .. //depot/projects/hammer/sys/net/if_spppsubr.c#18 integrate .. //depot/projects/hammer/sys/net/if_tap.c#19 integrate .. //depot/projects/hammer/sys/net/if_tun.c#22 integrate .. //depot/projects/hammer/sys/net/ppp_tty.c#10 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_crypto_ccmp.c#2 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_crypto_tkip.c#2 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_freebsd.c#2 integrate .. //depot/projects/hammer/sys/netgraph/netflow/netflow.c#3 integrate .. //depot/projects/hammer/sys/netgraph/ng_base.c#23 integrate .. //depot/projects/hammer/sys/netgraph/ng_bridge.c#13 integrate .. //depot/projects/hammer/sys/netgraph/ng_device.c#13 integrate .. //depot/projects/hammer/sys/netgraph/ng_sample.c#6 integrate .. //depot/projects/hammer/sys/netinet/ip_output.c#42 integrate .. //depot/projects/hammer/sys/netinet/tcp_input.c#42 integrate .. //depot/projects/hammer/sys/netinet/tcp_subr.c#35 integrate .. //depot/projects/hammer/sys/netinet/tcp_timer.c#14 integrate .. //depot/projects/hammer/sys/netinet/tcp_var.h#20 integrate .. //depot/projects/hammer/sys/nfsclient/nfs.h#15 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_bio.c#28 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_nfsiod.c#9 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_vfsops.c#33 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_vnops.c#32 integrate .. //depot/projects/hammer/sys/nfsclient/nfsnode.h#12 integrate .. //depot/projects/hammer/sys/pc98/pc98/fd.c#26 integrate .. //depot/projects/hammer/sys/pci/if_sk.c#32 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/pmap.c#31 integrate .. //depot/projects/hammer/sys/sparc64/include/ver.h#3 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/identcpu.c#6 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#30 integrate .. //depot/projects/hammer/sys/sys/bio.h#15 integrate .. //depot/projects/hammer/sys/sys/filedesc.h#13 integrate .. //depot/projects/hammer/sys/sys/ktr.h#9 integrate .. //depot/projects/hammer/sys/sys/mdioctl.h#9 integrate .. //depot/projects/hammer/sys/sys/mouse.h#4 integrate .. //depot/projects/hammer/sys/sys/proc.h#72 integrate .. //depot/projects/hammer/sys/sys/syscall.h#36 integrate .. //depot/projects/hammer/sys/sys/syscall.mk#36 integrate .. //depot/projects/hammer/sys/sys/sysproto.h#36 integrate .. //depot/projects/hammer/sys/sys/umtx.h#5 integrate .. //depot/projects/hammer/sys/sys/vnode.h#40 integrate .. //depot/projects/hammer/sys/tools/vnode_if.awk#8 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_vnops.c#29 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_extattr.c#13 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_vnops.c#26 integrate .. //depot/projects/hammer/sys/vm/uma.h#8 integrate .. //depot/projects/hammer/sys/vm/uma_core.c#34 integrate .. //depot/projects/hammer/sys/vm/uma_dbg.c#10 integrate .. //depot/projects/hammer/sys/vm/uma_dbg.h#4 integrate .. //depot/projects/hammer/sys/vm/uma_int.h#13 integrate .. //depot/projects/hammer/sys/vm/vm_fault.c#27 integrate .. //depot/projects/hammer/sys/vm/vm_map.c#45 integrate .. //depot/projects/hammer/sys/vm/vm_meter.c#13 integrate .. //depot/projects/hammer/sys/vm/vm_object.c#46 integrate .. //depot/projects/hammer/sys/vm/vm_page.c#39 integrate .. //depot/projects/hammer/sys/vm/vm_page.h#20 integrate .. //depot/projects/hammer/sys/vm/vnode_pager.c#27 integrate .. //depot/projects/hammer/tools/KSE/ksetest/Makefile#4 integrate .. //depot/projects/hammer/tools/KSE/rr/Makefile#2 integrate .. //depot/projects/hammer/tools/diag/dumpvfscache/Makefile#4 integrate .. //depot/projects/hammer/tools/diag/localeck/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/aio/aiotest/Makefile#2 integrate .. //depot/projects/hammer/tools/regression/fsx/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/gaithrstress/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/geom/ConfCmp/Makefile#5 integrate .. //depot/projects/hammer/tools/regression/geom/MdLoad/Makefile#4 integrate .. //depot/projects/hammer/tools/regression/geom_mirror/test-1.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_mirror/test-2.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_mirror/test-3.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_mirror/test-4.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_mirror/test-5.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_mirror/test-6.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_mirror/test-7.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_raid3/test-12.sh#2 integrate .. //depot/projects/hammer/tools/regression/ia64_unaligned/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/include/tgmath/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/netatalk/simple_send/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/netinet/ipsockopt/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/netinet/tcpconnect/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/netinet/tcpfullwindowrst/Makefile#2 integrate .. //depot/projects/hammer/tools/regression/netinet/tcpstream/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/nfsmmap/test1/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/nfsmmap/test2/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/p1003_1b/Makefile#4 integrate .. //depot/projects/hammer/tools/regression/pipe/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/security/access/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/security/proc_to_proc/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/sockets/accept_fd_leak/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/sockets/accf_data_attach/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/sockets/kqueue/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/sockets/listenclose/Makefile#2 integrate .. //depot/projects/hammer/tools/regression/sockets/socketpair/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/sysvmsg/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/sysvsem/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/sysvshm/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/tls/libxx/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/tls/libyy/Makefile#3 integrate .. //depot/projects/hammer/tools/regression/tls/ttls1/Makefile#4 integrate .. //depot/projects/hammer/tools/regression/tls/ttls2/Makefile#4 integrate .. //depot/projects/hammer/tools/sched/schedgraph.py#1 branch .. //depot/projects/hammer/tools/test/malloc/Makefile#3 integrate .. //depot/projects/hammer/tools/test/ppsapi/Makefile#4 integrate .. //depot/projects/hammer/tools/tools/aac/Makefile#3 integrate .. //depot/projects/hammer/tools/tools/find-sb/Makefile#2 integrate .. //depot/projects/hammer/tools/tools/gdb_regofs/Makefile#3 integrate .. //depot/projects/hammer/tools/tools/ifinfo/Makefile#2 integrate .. //depot/projects/hammer/tools/tools/kttcp/kttcp.c#2 integrate .. //depot/projects/hammer/tools/tools/kttcp/sys/kttcp.c#3 integrate .. //depot/projects/hammer/tools/tools/ministat/Makefile#5 integrate .. //depot/projects/hammer/tools/tools/nanobsd/Customize/comconsole#2 integrate .. //depot/projects/hammer/tools/tools/nanobsd/make.conf#10 integrate .. //depot/projects/hammer/tools/tools/netrate/Makefile.inc#1 branch .. //depot/projects/hammer/tools/tools/netrate/netblast/Makefile#3 integrate .. //depot/projects/hammer/tools/tools/netrate/netreceive/Makefile#3 integrate .. //depot/projects/hammer/tools/tools/netrate/netsend/Makefile#4 integrate .. //depot/projects/hammer/tools/tools/netrate/netsend/netsend.c#6 integrate .. //depot/projects/hammer/tools/tools/pirtool/Makefile#3 integrate .. //depot/projects/hammer/tools/tools/recoverdisk/Makefile#3 integrate .. //depot/projects/hammer/tools/tools/syscall_timing/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/Makefile#39 integrate .. //depot/projects/hammer/usr.bin/alias/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/bzip2recover/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.freebsd#29 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.music#3 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.musik#3 integrate .. //depot/projects/hammer/usr.bin/catman/Makefile#2 integrate .. //depot/projects/hammer/usr.bin/catman/catman.1#3 integrate .. //depot/projects/hammer/usr.bin/catman/catman.c#8 integrate .. //depot/projects/hammer/usr.bin/dirname/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/elf2aout/Makefile#4 integrate .. //depot/projects/hammer/usr.bin/fetch/Makefile#7 integrate .. //depot/projects/hammer/usr.bin/file/config.h#5 integrate .. //depot/projects/hammer/usr.bin/file/file.1#6 integrate .. //depot/projects/hammer/usr.bin/file/magic.5#5 integrate .. //depot/projects/hammer/usr.bin/lessecho/Makefile#2 integrate .. //depot/projects/hammer/usr.bin/lex/lib/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/limits/limits.c#3 integrate .. //depot/projects/hammer/usr.bin/locate/bigram/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/locate/code/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/make/Makefile#13 integrate .. //depot/projects/hammer/usr.bin/make/arch.c#9 integrate .. //depot/projects/hammer/usr.bin/make/compat.c#12 integrate .. //depot/projects/hammer/usr.bin/make/cond.c#12 integrate .. //depot/projects/hammer/usr.bin/make/dir.c#11 integrate .. //depot/projects/hammer/usr.bin/make/dir.h#6 integrate .. //depot/projects/hammer/usr.bin/make/for.c#10 integrate .. //depot/projects/hammer/usr.bin/make/job.c#17 integrate .. //depot/projects/hammer/usr.bin/make/lst.h#7 integrate .. //depot/projects/hammer/usr.bin/make/lst.lib/lstConcat.c#7 integrate .. //depot/projects/hammer/usr.bin/make/lst.lib/lstDestroy.c#7 integrate .. //depot/projects/hammer/usr.bin/make/lst.lib/lstDupl.c#8 integrate .. //depot/projects/hammer/usr.bin/make/lst.lib/lstInit.c#6 delete .. //depot/projects/hammer/usr.bin/make/main.c#24 integrate .. //depot/projects/hammer/usr.bin/make/make.c#9 integrate .. //depot/projects/hammer/usr.bin/make/make.h#6 integrate .. //depot/projects/hammer/usr.bin/make/nonints.h#9 integrate .. //depot/projects/hammer/usr.bin/make/parse.c#20 integrate .. //depot/projects/hammer/usr.bin/make/str.c#9 integrate .. //depot/projects/hammer/usr.bin/make/suff.c#11 integrate .. //depot/projects/hammer/usr.bin/make/targ.c#10 integrate .. //depot/projects/hammer/usr.bin/make/var.c#16 integrate .. //depot/projects/hammer/usr.bin/rev/rev.c#4 integrate .. //depot/projects/hammer/usr.bin/tar/Makefile#9 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.c#21 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar_platform.h#6 integrate .. //depot/projects/hammer/usr.bin/tar/configure.ac.in#2 integrate .. //depot/projects/hammer/usr.bin/tar/fts.c#3 integrate .. //depot/projects/hammer/usr.bin/tar/matching.c#8 integrate .. //depot/projects/hammer/usr.bin/telnet/Makefile#5 integrate .. //depot/projects/hammer/usr.bin/unexpand/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/uudecode/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/vgrind/RETEST/Makefile#3 integrate .. //depot/projects/hammer/usr.bin/wc/Makefile#2 integrate .. //depot/projects/hammer/usr.bin/wc/wc.c#4 integrate .. //depot/projects/hammer/usr.bin/xlint/lint2/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/Makefile#59 integrate .. //depot/projects/hammer/usr.sbin/arp/arp.c#9 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/bthidd/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/boot0cfg/boot0cfg.c#8 integrate .. //depot/projects/hammer/usr.sbin/bootparamd/callbootd/Makefile#5 integrate .. //depot/projects/hammer/usr.sbin/burncd/burncd.8#10 integrate .. //depot/projects/hammer/usr.sbin/burncd/burncd.c#9 integrate .. //depot/projects/hammer/usr.sbin/config/config.8#7 integrate .. //depot/projects/hammer/usr.sbin/crunch/examples/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/ctm/ctm_dequeue/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/ctm/ctm_smail/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/ctm/mkCTM/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/fwcontrol/fwcontrol.8#10 integrate .. //depot/projects/hammer/usr.sbin/lpr/filters.ru/koi2855/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/lpr/filters.ru/koi2alt/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/lpr/filters/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/lpr/lpd/printjob.c#4 integrate .. //depot/projects/hammer/usr.sbin/mount_smbfs/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/mrouted/testrsrr/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/nologin/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/ntp/Makefile#6 integrate .. //depot/projects/hammer/usr.sbin/ntp/Makefile.inc#6 integrate .. //depot/projects/hammer/usr.sbin/ntp/ntp-keygen/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/ntp/ntpd/Makefile#7 integrate .. //depot/projects/hammer/usr.sbin/ntp/ntpdate/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/ntp/ntpdc/Makefile#5 integrate .. //depot/projects/hammer/usr.sbin/ntp/ntpq/Makefile#6 integrate .. //depot/projects/hammer/usr.sbin/ntp/ntptime/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/ntp/ntptrace/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/ntp/sntp/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/pccard/Makefile.inc#2 integrate .. //depot/projects/hammer/usr.sbin/pcvt/Misc/Doc/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/pcvt/Misc/Etc/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/pcvt/Misc/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/pcvt/demo/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/pcvt/kbdio/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/pkg_install/Makefile#5 integrate .. //depot/projects/hammer/usr.sbin/pkg_install/Makefile.inc#4 integrate .. //depot/projects/hammer/usr.sbin/ppp/Makefile#10 integrate .. //depot/projects/hammer/usr.sbin/ppp/command.c#12 integrate .. //depot/projects/hammer/usr.sbin/ppp/lcp.c#4 integrate .. //depot/projects/hammer/usr.sbin/ppp/lcp.h#2 integrate .. //depot/projects/hammer/usr.sbin/ppp/lqr.c#4 integrate .. //depot/projects/hammer/usr.sbin/ppp/main.c#5 integrate .. //depot/projects/hammer/usr.sbin/ppp/ppp.8.m4#14 integrate .. //depot/projects/hammer/usr.sbin/pppctl/pppctl.c#4 integrate .. //depot/projects/hammer/usr.sbin/pppd/Makefile#7 integrate .. //depot/projects/hammer/usr.sbin/repquota/repquota.c#6 integrate .. //depot/projects/hammer/usr.sbin/rpc.ypupdated/Makefile#6 integrate .. //depot/projects/hammer/usr.sbin/sendmail/Makefile#12 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/Makefile#8 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/devices.c#14 integrate .. //depot/projects/hammer/usr.sbin/tcpdchk/Makefile#4 integrate .. //depot/projects/hammer/usr.sbin/tcpdmatch/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/tcpdump/tcpdump/Makefile#8 integrate .. //depot/projects/hammer/usr.sbin/traceroute/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/vnconfig/Makefile#3 integrate Differences ... ==== //depot/projects/hammer/Makefile#29 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile,v 1.311 2004/12/07 14:41:16 harti Exp $ +# $FreeBSD: src/Makefile,v 1.315 2004/12/21 09:59:39 ru Exp $ # # The user-driven targets are: # @@ -86,9 +86,9 @@ PATH= /sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX?= /usr/obj -_MAKEOBJDIRPREFIX!= /usr/bin/env -i \ - PATH=${PATH} MAKEFLAGS="${.MAKEFLAGS}" ${MAKE} \ - -f /dev/null -V MAKEOBJDIRPREFIX dummy +_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \ + ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} \ + -f /dev/null -V MAKEOBJDIRPREFIX dummy .if !empty(_MAKEOBJDIRPREFIX) .error MAKEOBJDIRPREFIX can only be set in environment, not as a global\ (in /etc/make.conf) or command-line variable. @@ -232,7 +232,7 @@ INSTALL="sh ${.CURDIR}/tools/install.sh" MMAKE= ${MMAKEENV} make \ -D_UPGRADING \ - -DNOMAN -DNOSHARED \ + -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WERROR make: .PHONY ==== //depot/projects/hammer/Makefile.inc1#82 (text+ko) ==== @@ -1,19 +1,19 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.459 2004/12/01 23:23:14 peter Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.471 2004/12/22 22:00:01 ru Exp $ # # Make command line options: # -DNO_DYNAMICROOT do not link /bin and /sbin dynamically # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) # -DNO_RESCUE do not build rescue binaries -# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir -# -DNOCLEAN do not clean at all -# -DNOCRYPT will prevent building of crypt versions -# -DNOMAN do not build the manual pages -# -DNOPROFILE do not build profiled libraries -# -DNOGAMES do not go into games subdir -# -DNOSHARE do not go into share subdir -# -DNOINFO do not make or install info files -# -DNOLIBC_R do not build libc_r. +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir +# -DNO_CLEAN do not clean at all +# -DNO_CRYPT will prevent building of crypt versions +# -DNO_MAN do not build the manual pages +# -DNO_PROFILE do not build profiled libraries +# -DNO_GAMES do not go into games subdir +# -DNO_SHARE do not go into share subdir +# -DNO_INFO do not make or install info files +# -DNO_LIBC_R do not build libc_r. # -DNO_FORTRAN do not build g77 and related libraries. # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel @@ -27,7 +27,7 @@ # The intended user-driven targets are: # buildworld - rebuild *everything*, including glue to help do upgrades # installworld- install everything built by "buildworld" -# update - convenient way to update your source tree (eg: sup/cvs) +# update - convenient way to update your source tree (eg: cvsup/cvs) # # Standard targets (not defined here) are documented in the makefiles in # /usr/share/mk. These include: @@ -45,21 +45,21 @@ # We must do etc last for install/distribute to work. # SUBDIR= share/info include lib libexec bin -.if !defined(NOGAMES) +.if !defined(NO_GAMES) SUBDIR+=games .endif SUBDIR+=gnu -.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) SUBDIR+=kerberos5 .endif .if !defined(NO_RESCUE) SUBDIR+=rescue .endif SUBDIR+=sbin -.if !defined(NOCRYPT) +.if !defined(NO_CRYPT) SUBDIR+=secure .endif -.if !defined(NOSHARE) +.if !defined(NO_SHARE) SUBDIR+=share .endif SUBDIR+=sys usr.bin usr.sbin etc @@ -76,7 +76,7 @@ SUBDIR= ${SUBDIR_OVERRIDE} .endif -.if defined(NOCLEANDIR) +.if defined(NO_CLEANDIR) CLEANDIR= clean cleandepend .else CLEANDIR= cleandir @@ -112,8 +112,8 @@ .else _TARGET_CPUTYPE=dummy .endif -_CPUTYPE!= MAKEFLAGS= ${MAKE} -f /dev/null -m ${.CURDIR}/share/mk \ - CPUTYPE=${_TARGET_CPUTYPE} -V CPUTYPE +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \ + -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE .if ${_CPUTYPE} != ${_TARGET_CPUTYPE} .error CPUTYPE global should be set with ?=. .endif @@ -182,14 +182,14 @@ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - -DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE \ - -DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS + -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PIC -DNO_PROFILE \ + -DNO_SHARED -DNO_CPU_CFLAGS -DNO_WARNS # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ - BOOTSTRAPPING=${OSRELDATE} -DNOLINT -DNO_CPU_CFLAGS -DNO_WARNS + BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB @@ -231,7 +231,7 @@ SHLIBDIR=/usr/lib32 LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ - -DNO_BIND -DNOMAN -DNODOC -DNOINFO -DNOHTML \ + -DNO_BIND -DNO_MAN -DNO_INFO -DNO_HTML \ CC="cc ${LIB32CC}" \ CXX="c++ ${LIB32CXX}" \ OBJC="cc ${LIB32OBJC}" \ @@ -273,7 +273,7 @@ @echo "--------------------------------------------------------------" @echo ">>> Rebuilding the temporary build tree" @echo "--------------------------------------------------------------" -.if !defined(NOCLEAN) +.if !defined(NO_CLEAN) rm -rf ${WORLDTMP} .else rm -rf ${WORLDTMP}/legacy/usr/include @@ -327,7 +327,7 @@ @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools _cleanobj: -.if !defined(NOCLEAN) +.if !defined(NO_CLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @@ -364,7 +364,7 @@ @echo ">>> stage 4.2: building libraries" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ - ${WMAKE} -DNOFSCHG -DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPROFILE \ + ${WMAKE} -DNO_FSCHG -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PROFILE \ libraries _depend: @echo @@ -393,7 +393,7 @@ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} -.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} @@ -406,11 +406,11 @@ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} cd ${.CURDIR}/gnu/lib; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} -.if !defined(NOCRYPT) +.if !defined(NO_CRYPT) cd ${.CURDIR}/secure/lib; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} .endif -.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) cd ${.CURDIR}/kerberos5/lib; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} .endif @@ -436,7 +436,7 @@ mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree cd ${.CURDIR}/lib; ${LIB32MAKE} install cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} install -.if !defined(NOCRYPT) +.if !defined(NO_CRYPT) cd ${.CURDIR}/secure/lib; ${LIB32MAKE} install .endif cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} install @@ -666,7 +666,7 @@ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ ${KERNCONFDIR}/${_kernel} .endif -.if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) +.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @@ -741,7 +741,7 @@ # >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Dec 29 00:36:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4532516A4D0; Wed, 29 Dec 2004 00:36:56 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5BE816A4CE for ; Wed, 29 Dec 2004 00:36:55 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9782343D3F for ; Wed, 29 Dec 2004 00:36:55 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBT0atAK065829 for ; Wed, 29 Dec 2004 00:36:55 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBT0at2A065826 for perforce@freebsd.org; Wed, 29 Dec 2004 00:36:55 GMT (envelope-from peter@freebsd.org) Date: Wed, 29 Dec 2004 00:36:55 GMT Message-Id: <200412290036.iBT0at2A065826@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 67817 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 00:36:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=67817 Change 67817 by peter@peter_daintree on 2004/12/29 00:36:49 merge i386 changes via i386_hammer branch Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#33 integrate .. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#40 integrate .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#79 integrate .. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#61 integrate .. //depot/projects/hammer/sys/amd64/include/apicreg.h#10 integrate .. //depot/projects/hammer/sys/amd64/include/apicvar.h#27 integrate .. //depot/projects/hammer/sys/amd64/include/intr_machdep.h#15 integrate .. //depot/projects/hammer/sys/amd64/isa/isa.c#13 integrate .. //depot/projects/hammer/sys/amd64/pci/pci_cfgreg.c#17 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#33 (text+ko) ==== @@ -286,6 +286,17 @@ is->is_straycount = &intrcnt[is->is_index + 1]; } +void +intrcnt_add(const char *name, u_long **countp) +{ + + mtx_lock_spin(&intr_table_lock); + *countp = &intrcnt[intrcnt_index]; + intrcnt_setname(name, intrcnt_index); + intrcnt_index++; + mtx_unlock_spin(&intr_table_lock); +} + static void intr_init(void *dummy __unused) { ==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#40 (text+ko) ==== @@ -61,7 +61,9 @@ #define MAX_APICID 16 /* Sanity checks on IDT vectors. */ -CTASSERT(APIC_IO_INTS + APIC_NUM_IOINTS <= APIC_LOCAL_INTS); +CTASSERT(APIC_IO_INTS + APIC_NUM_IOINTS == APIC_TIMER_INT); +CTASSERT(APIC_TIMER_INT < APIC_LOCAL_INTS); +CTASSERT(APIC_LOCAL_INTS == 240); CTASSERT(IPI_STOP < APIC_SPURIOUS_INT); /* @@ -96,10 +98,10 @@ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* Timer: needs a vector */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* Error: needs a vector */ + { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ + { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* PMC */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* Thermal: needs a vector */ + { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; static inthand_t *ioint_handlers[] = { @@ -115,6 +117,9 @@ volatile lapic_t *lapic; +static void lapic_enable(void); +static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value); + static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -148,11 +153,7 @@ /* Use a vector of 0. */ break; case APIC_LVT_DM_FIXED: -#if 0 value |= lvt->lvt_vector; -#else - panic("Fixed LINT pins not supported"); -#endif break; default: panic("bad APIC LVT delivery mode: %#x\n", value); @@ -166,7 +167,6 @@ void lapic_init(uintptr_t addr) { - u_int32_t value; /* Map the local APIC and setup the spurious interrupt handler. */ KASSERT(trunc_page(addr) == addr, @@ -175,10 +175,7 @@ setidt(APIC_SPURIOUS_INT, IDTVEC(spuriousint), SDT_SYSIGT, SEL_KPL, 0); /* Perform basic initialization of the BSP's local APIC. */ - value = lapic->svr; - value &= ~(APIC_SVR_VECTOR | APIC_SVR_FOCUS); - value |= (APIC_SVR_FEN | APIC_SVR_SWEN | APIC_SPURIOUS_INT); - lapic->svr = value; + lapic_enable(); /* Set BSP's per-CPU local APIC ID. */ PCPU_SET(apic_id, lapic_id()); @@ -231,6 +228,9 @@ lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, + lapic->lvt_pcint); } void @@ -257,17 +257,9 @@ eflags = intr_disable(); maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; - /* Program LINT[01] LVT entries. */ - lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); - lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); - - /* XXX: more LVT entries */ + /* Initialize the TPR to allow all interrupts. */ + lapic_set_tpr(0); - /* Clear the TPR. */ - value = lapic->tpr; - value &= ~APIC_TPR_PRIO; - lapic->tpr = value; - /* Use the cluster model for logical IDs. */ value = lapic->dfr; value &= ~APIC_DFR_MODEL_MASK; @@ -282,10 +274,14 @@ lapic->ldr = value; /* Setup spurious vector and enable the local APIC. */ - value = lapic->svr; - value &= ~(APIC_SVR_VECTOR | APIC_SVR_FOCUS); - value |= (APIC_SVR_FEN | APIC_SVR_SWEN | APIC_SPURIOUS_INT); - lapic->svr = value; + lapic_enable(); + + /* Program LINT[01] LVT entries. */ + lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); + lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + + /* XXX: more LVT entries */ + intr_restore(eflags); } @@ -300,6 +296,18 @@ lapic->svr = value; } +static void +lapic_enable(void) +{ + u_int32_t value; + + /* Program the spurious vector to enable the local APIC. */ + value = lapic->svr; + value &= ~(APIC_SVR_VECTOR | APIC_SVR_FOCUS); + value |= (APIC_SVR_FEN | APIC_SVR_SWEN | APIC_SPURIOUS_INT); + lapic->svr = value; +} + int lapic_id(void) { @@ -471,6 +479,24 @@ return (0); } +/* + * Adjust the TPR of the current CPU so that it blocks all interrupts below + * the passed in vector. + */ +void +lapic_set_tpr(u_int vector) +{ +#ifdef CHEAP_TPR + lapic->tpr = vector; +#else + u_int32_t tpr; + + tpr = lapic->tpr & ~APIC_TPR_PRIO; + tpr |= vector; + lapic->tpr = tpr; +#endif +} + void lapic_eoi(void) { @@ -637,10 +663,9 @@ #ifdef SMP /* * Inter Processor Interrupt functions. The lapic_ipi_*() functions are - * private the sys/i386 code. The public interface for the rest of the + * private to the sys/i386 code. The public interface for the rest of the * kernel is defined in mp_machdep.c. */ - int lapic_ipi_wait(int delay) { @@ -745,7 +770,7 @@ * the failure with the check above when the next IPI is * sent. * - * We could skiip this wait entirely, EXCEPT it probably + * We could skip this wait entirely, EXCEPT it probably * protects us from other routines that assume that the * message was delivered and acted upon when this function * returns. ==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#79 (text+ko) ==== @@ -915,8 +915,8 @@ ipi_selected(map, IPI_HARDCLOCK); } - -void ipi_bitmap_handler(struct clockframe frame) +void +ipi_bitmap_handler(struct clockframe frame) { int cpu = PCPU_GET(cpuid); u_int ipi_bitmap; @@ -950,7 +950,6 @@ critical_exit(); } - /* * send an IPI to a set of cpus. */ ==== //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#61 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/include/apicreg.h#10 (text+ko) ==== @@ -330,7 +330,12 @@ #define APIC_LVTT_DS 0x00001000 #define APIC_LVTT_M 0x00010000 #define APIC_LVTT_TM 0x00020000 +# define APIC_LVTT_TM_ONE_SHOT 0x00000000 +# define APIC_LVTT_TM_PERIODIC 0x00020000 + +/* APIC timer current count */ +#define APIC_TIMER_MAX_COUNT 0xffffffff /* fields in TDCR */ #define APIC_TDCR_2 0x00 ==== //depot/projects/hammer/sys/amd64/include/apicvar.h#27 (text+ko) ==== @@ -44,7 +44,7 @@ * 0xff (255) +-------------+ * | | 15 (Spurious / IPIs / Local Interrupts) * 0xf0 (240) +-------------+ - * | | 14 (I/O Interrupts) + * | | 14 (I/O Interrupts / Timer) * 0xe0 (224) +-------------+ * | | 13 (I/O Interrupts) * 0xd0 (208) +-------------+ @@ -80,8 +80,13 @@ */ #define APIC_ID_ALL 0xff + +/* I/O Interrupts are used for external devices such as ISA, PCI, etc. */ #define APIC_IO_INTS (IDT_IO_INTS + 16) -#define APIC_NUM_IOINTS 192 +#define APIC_NUM_IOINTS 191 + +/* The timer interrupt is used for clock handling and drives hardclock, etc. */ +#define APIC_TIMER_INT (APIC_IO_INTS + APIC_NUM_IOINTS) /* ********************* !!! WARNING !!! ****************************** @@ -103,15 +108,12 @@ * other deadlocks caused by IPI_STOP. */ +/* Interrupts for local APIC LVT entries other than the timer. */ #define APIC_LOCAL_INTS 240 +#define APIC_ERROR_INT APIC_LOCAL_INTS +#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) -#if 0 -#define APIC_TIMER_INT (APIC_LOCAL_INTS + X) -#define APIC_ERROR_INT (APIC_LOCAL_INTS + X) -#define APIC_THERMAL_INT (APIC_LOCAL_INTS + X) -#endif - -#define APIC_IPI_INTS (APIC_LOCAL_INTS + 0) +#define APIC_IPI_INTS (APIC_LOCAL_INTS + 2) #define IPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */ #define IPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */ #define IPI_INVLPG (APIC_IPI_INTS + 2) @@ -128,7 +130,8 @@ #define IPI_STOP (APIC_IPI_INTS + 6) /* Stop CPU until restarted. */ -/* The spurious interrupt can share the priority class with the IPIs since +/* + * The spurious interrupt can share the priority class with the IPIs since * it is not a normal interrupt. (Does not use the APIC's interrupt fifo) */ #define APIC_SPURIOUS_INT 255 @@ -207,6 +210,7 @@ enum intr_polarity pol); int lapic_set_lvt_triggermode(u_int apic_id, u_int lvt, enum intr_trigger trigger); +void lapic_set_tpr(u_int vector); void lapic_setup(void); #endif /* !LOCORE */ ==== //depot/projects/hammer/sys/amd64/include/intr_machdep.h#15 (text+ko) ==== @@ -100,6 +100,7 @@ int intr_remove_handler(void *cookie); void intr_resume(void); void intr_suspend(void); +void intrcnt_add(const char *name, u_long **countp); #endif /* !LOCORE */ #endif /* _KERNEL */ ==== //depot/projects/hammer/sys/amd64/isa/isa.c#13 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/pci/pci_cfgreg.c#17 (text+ko) ==== @@ -325,4 +325,3 @@ devmax = 0; return (cfgmech); } - From owner-p4-projects@FreeBSD.ORG Wed Dec 29 19:55:28 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9DF1016A4D0; Wed, 29 Dec 2004 19:55:27 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59E1116A4CE for ; Wed, 29 Dec 2004 19:55:27 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4777243D2F for ; Wed, 29 Dec 2004 19:55:27 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBTJtRNA041761 for ; Wed, 29 Dec 2004 19:55:27 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBTJtRJC041758 for perforce@freebsd.org; Wed, 29 Dec 2004 19:55:27 GMT (envelope-from sam@freebsd.org) Date: Wed, 29 Dec 2004 19:55:27 GMT Message-Id: <200412291955.iBTJtRJC041758@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67857 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 19:55:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=67857 Change 67857 by sam@sam_ebb on 2004/12/29 19:55:08 don't setup the station table if it's already there; this can happen when an ibss merge takes place Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#30 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#30 (text+ko) ==== @@ -759,17 +759,20 @@ return 0; } /* - * Create the neighbor table. + * Create the neighbor table; it will already + * exist if we are simply switching mastership. */ - ic->ic_sta = ieee80211_node_table_alloc(ic, + if (ic->ic_sta == NULL) { + ic->ic_sta = ieee80211_node_table_alloc(ic, "neighbor", ic->ic_inact_run, ieee80211_timeout_stations); - if (ic->ic_sta == NULL) { - /* - * Should remain in SCAN state and retry. - */ - /* XXX stat+msg */ - return 0; + if (ic->ic_sta == NULL) { + /* + * Should remain in SCAN state and retry. + */ + /* XXX stat+msg */ + return 0; + } } } From owner-p4-projects@FreeBSD.ORG Wed Dec 29 19:57:30 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9403216A4D0; Wed, 29 Dec 2004 19:57:30 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56A5516A4CE for ; Wed, 29 Dec 2004 19:57:30 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ABF743D1F for ; Wed, 29 Dec 2004 19:57:30 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBTJvU25041824 for ; Wed, 29 Dec 2004 19:57:30 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBTJvTwp041821 for perforce@freebsd.org; Wed, 29 Dec 2004 19:57:29 GMT (envelope-from sam@freebsd.org) Date: Wed, 29 Dec 2004 19:57:29 GMT Message-Id: <200412291957.iBTJvTwp041821@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67858 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 19:57:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=67858 Change 67858 by sam@sam_ebb on 2004/12/29 19:57:20 Eliminate some of the egregious bypass of the 802.11 state machine; instead use the intended entry points. There's still too much incestuous knowledge about the internals of the 802.11 layer but this at least fixes adhoc mode. NB: needs more testing. Affected files ... .. //depot/projects/wifi/sys/dev/wi/if_wi.c#10 edit Differences ... ==== //depot/projects/wifi/sys/dev/wi/if_wi.c#10 (text+ko) ==== @@ -784,9 +784,10 @@ ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; if (ic->ic_opmode == IEEE80211_M_AHDEMO || + ic->ic_opmode == IEEE80211_M_IBSS || ic->ic_opmode == IEEE80211_M_MONITOR || ic->ic_opmode == IEEE80211_M_HOSTAP) - ieee80211_new_state(ic, IEEE80211_S_RUN, -1); + ieee80211_create_ibss(ic, ic->ic_ibss_chan); /* Enable interrupts */ CSR_WRITE_2(sc, WI_INT_EN, WI_INTRS); @@ -1315,7 +1316,15 @@ WI_MAX_FALSE_SYNS)) return; - ieee80211_new_state(ic, IEEE80211_S_RUN, -1); + sc->sc_false_syns = MAX(0, sc->sc_false_syns - 1); + /* + * XXX hack; we should create a new node with the new bssid + * and replace the existing ic_bss with it but since we don't + * process management frames to collect state we cheat by + * reusing the existing node as we know wi_newstate will be + * called and it will overwrite the node state. + */ + ieee80211_sta_join(ic, ieee80211_ref_node(ni)); } static void @@ -2675,7 +2684,7 @@ { struct ifnet *ifp = ic->ic_ifp; struct wi_softc *sc = ifp->if_softc; - struct ieee80211_node *ni = ic->ic_bss; + struct ieee80211_node *ni; int buflen; u_int16_t val; struct wi_ssid ssid; @@ -2685,9 +2694,14 @@ ieee80211_state_name[ic->ic_state], ieee80211_state_name[nstate])); + /* + * Internal to the driver the INIT and RUN states are used + * so bypass the net80211 state machine for other states. + * Beware however that this requires use to net80211 state + * management that otherwise would be handled for us. + */ switch (nstate) { case IEEE80211_S_INIT: - ic->ic_flags &= ~IEEE80211_F_SIBSS; sc->sc_flags &= ~WI_FLAGS_OUTRANGE; return (*sc->sc_newstate)(ic, nstate, arg); @@ -2698,6 +2712,7 @@ break; case IEEE80211_S_RUN: + ni = ic->ic_bss; sc->sc_flags &= ~WI_FLAGS_OUTRANGE; buflen = IEEE80211_ADDR_LEN; IEEE80211_ADDR_COPY(old_bssid, ni->ni_bssid); @@ -2714,20 +2729,7 @@ sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = htole16(ni->ni_chan->ic_flags); #endif - - /* If not equal, then discount a false synchronization. */ - if (!IEEE80211_ADDR_EQ(old_bssid, ni->ni_bssid)) - sc->sc_false_syns = MAX(0, sc->sc_false_syns - 1); - - if (ic->ic_opmode == IEEE80211_M_HOSTAP) { - ni->ni_esslen = ic->ic_des_esslen; - memcpy(ni->ni_essid, ic->ic_des_essid, ni->ni_esslen); - ni->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11B]; - ni->ni_intval = ic->ic_lintval; - ni->ni_capinfo = IEEE80211_CAPINFO_ESS; - if (ic->ic_flags & IEEE80211_F_PRIVACY) - ni->ni_capinfo |= IEEE80211_CAPINFO_PRIVACY; - } else { + if (ic->ic_opmode != IEEE80211_M_HOSTAP) { /* * XXX hack; unceremoniously clear * IEEE80211_F_DROPUNENC when operating with From owner-p4-projects@FreeBSD.ORG Wed Dec 29 19:58:32 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3233E16A4D0; Wed, 29 Dec 2004 19:58:32 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D14216A4CE for ; Wed, 29 Dec 2004 19:58:32 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF62543D55 for ; Wed, 29 Dec 2004 19:58:31 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBTJwVP5041900 for ; Wed, 29 Dec 2004 19:58:31 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBTJwV6e041897 for perforce@freebsd.org; Wed, 29 Dec 2004 19:58:31 GMT (envelope-from sam@freebsd.org) Date: Wed, 29 Dec 2004 19:58:31 GMT Message-Id: <200412291958.iBTJwV6e041897@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67859 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 19:58:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=67859 Change 67859 by sam@sam_ebb on 2004/12/29 19:58:02 fix beacon timer setup for ap mode Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#49 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#49 (text+ko) ==== @@ -1981,11 +1981,13 @@ nexttbtt = (LE_READ_4(ni->ni_tstamp.data + 4) << 22) | (LE_READ_4(ni->ni_tstamp.data) >> 10); - DPRINTF(sc, ATH_DEBUG_BEACON, "%s: nexttbtt %u intval %u\n", - __func__, nexttbtt, ni->ni_intval); intval = MS_TO_TU(ni->ni_intval) & HAL_BEACON_PERIOD; - if (intval) /* NB: can be 0 for monitor mode */ + if (nexttbtt == 0) /* e.g. for ap mode */ + nexttbtt = intval; + else if (intval) /* NB: can be 0 for monitor mode */ nexttbtt = roundup(nexttbtt, intval); + DPRINTF(sc, ATH_DEBUG_BEACON, "%s: nexttbtt %u intval %u (%u)\n", + __func__, nexttbtt, intval, ni->ni_intval); if (ic->ic_opmode == IEEE80211_M_STA) { HAL_BEACON_STATE bs; u_int32_t bmisstime; From owner-p4-projects@FreeBSD.ORG Wed Dec 29 23:10:06 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E848D16A4D4; Wed, 29 Dec 2004 23:10:05 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3EFE16A4D1 for ; Wed, 29 Dec 2004 23:10:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5567A43D48 for ; Wed, 29 Dec 2004 23:10:05 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBTNA5Ou056590 for ; Wed, 29 Dec 2004 23:10:05 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBTNA5Pm056587 for perforce@freebsd.org; Wed, 29 Dec 2004 23:10:05 GMT (envelope-from sam@freebsd.org) Date: Wed, 29 Dec 2004 23:10:05 GMT Message-Id: <200412292310.iBTNA5Pm056587@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67866 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 23:10:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=67866 Change 67866 by sam@sam_ebb on 2004/12/29 23:09:31 add hack to not use QoS encapsulation for EAPOL frames as certain vendor ap's don't handle it Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#29 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#29 (text+ko) ==== @@ -434,7 +434,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct llc *llc; - int hdrsize, datalen; + int hdrsize, datalen, addqos; KASSERT(m->m_len >= sizeof(eh), ("no ethernet header!")); memcpy(&eh, mtod(m, caddr_t), sizeof(struct ether_header)); @@ -467,7 +467,15 @@ } else key = NULL; /* XXX 4-address format */ - if (ni->ni_flags & IEEE80211_NODE_QOS) + /* + * XXX Atheros ap's don't handle QoS-encapsulated EAPOL + * frames so suppress use. This may be an issue with + * other ap's that support WME+WPA in which case we'll + * need to make this configurable. + */ + addqos = (ni->ni_flags & IEEE80211_NODE_QOS) && + eh.ether_type != htons(ETHERTYPE_PAE); + if (addqos) hdrsize = sizeof(struct ieee80211_qosframe); else hdrsize = sizeof(struct ieee80211_frame); @@ -521,7 +529,7 @@ case IEEE80211_M_MONITOR: goto bad; } - if (ni->ni_flags & IEEE80211_NODE_QOS) { + if (addqos) { struct ieee80211_qosframe *qwh = (struct ieee80211_qosframe *) wh; int ac, tid; From owner-p4-projects@FreeBSD.ORG Wed Dec 29 23:14:11 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5711E16A4D1; Wed, 29 Dec 2004 23:14:11 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D81316A4CE for ; Wed, 29 Dec 2004 23:14:11 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D910F43D39 for ; Wed, 29 Dec 2004 23:14:10 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBTNEArm056800 for ; Wed, 29 Dec 2004 23:14:10 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBTNEAOo056797 for perforce@freebsd.org; Wed, 29 Dec 2004 23:14:10 GMT (envelope-from sam@freebsd.org) Date: Wed, 29 Dec 2004 23:14:10 GMT Message-Id: <200412292314.iBTNEAOo056797@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67867 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 23:14:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=67867 Change 67867 by sam@sam_ebb on 2004/12/29 23:13:12 Radiotap fixups: o catch one place where we were not using ath_chan_change to switch channels; this corrects a problem where the channel settings were not being reported in captured packets o return unique channel identification in the channel flags; ethereal gets confused if you return merged flags (e.g. ofdm, cck, and 2Ghz) (this is workaround and should be removed if we can ever cleanup radiotap consumers) o correct short/long preamble flag state for rx and treat tx the same--use a new hwflags array that gives us the data based on the h/w rate index/cookie Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#50 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#19 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#50 (text+ko) ==== @@ -821,7 +821,6 @@ struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &sc->sc_if; struct ieee80211_node *ni; - enum ieee80211_phymode mode; struct ath_hal *ah = sc->sc_ah; HAL_STATUS status; @@ -893,9 +892,7 @@ */ ni = ic->ic_bss; ni->ni_chan = ic->ic_ibss_chan; - mode = ieee80211_chan2mode(ic, ni->ni_chan); - if (mode != sc->sc_curmode) - ath_setcurmode(sc, mode); + ath_chan_change(sc, ni->ni_chan); if (ic->ic_opmode != IEEE80211_M_MONITOR) { if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); @@ -2616,6 +2613,7 @@ if (sc->sc_drvbpf) { const void *data; int hdrsize, hdrspace; + u_int8_t rix; /* * Discard anything shorter than an ack or cts. @@ -2628,8 +2626,9 @@ m_freem(m); goto rx_next; } - sc->sc_rx_th.wr_rate = - sc->sc_hwmap[ds->ds_rxstat.rs_rate]; + rix = ds->ds_rxstat.rs_rate; + sc->sc_rx_th.wr_flags = sc->sc_hwflags[rix]; + sc->sc_rx_th.wr_rate = sc->sc_hwmap[rix]; sc->sc_rx_th.wr_antsignal = ds->ds_rxstat.rs_rssi; sc->sc_rx_th.wr_antenna = ds->ds_rxstat.rs_antenna; /* XXX TSF */ @@ -3222,12 +3221,10 @@ if (ic->ic_rawbpf) bpf_mtap(ic->ic_rawbpf, m0); if (sc->sc_drvbpf) { - sc->sc_tx_th.wt_flags = 0; - if (shortPreamble) - sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + sc->sc_tx_th.wt_flags = sc->sc_hwflags[txrate]; if (iswep) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; - sc->sc_tx_th.wt_rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + sc->sc_tx_th.wt_rate = sc->sc_hwmap[txrate]; sc->sc_tx_th.wt_txpower = ni->ni_txpower; sc->sc_tx_th.wt_antenna = sc->sc_txantenna; @@ -3677,6 +3674,7 @@ { struct ieee80211com *ic = &sc->sc_ic; enum ieee80211_phymode mode; + u_int16_t flags; /* * Change channels and update the h/w rate map @@ -3686,12 +3684,25 @@ if (mode != sc->sc_curmode) ath_setcurmode(sc, mode); /* - * Update BPF state. + * Update BPF state. NB: ethereal et. al. don't handle + * merged flags well, so pick a mode for their use. */ + if (IEEE80211_IS_CHAN_A(chan)) + flags = IEEE80211_CHAN_A; + /* XXX 11g schizophrenia */ + else if (IEEE80211_IS_CHAN_G(chan) || + IEEE80211_IS_CHAN_PUREG(chan)) + flags = IEEE80211_CHAN_G; + else if (IEEE80211_IS_CHAN_B(chan)) + flags = IEEE80211_CHAN_B; + else + flags = 0; + if (IEEE80211_IS_CHAN_T(chan)) + flags |= IEEE80211_CHAN_TURBO; sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = htole16(chan->ic_freq); sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(chan->ic_flags); + htole16(flags); } /* @@ -4094,10 +4105,15 @@ for (i = 0; i < rt->rateCount; i++) sc->sc_rixmap[rt->info[i].dot11Rate & IEEE80211_RATE_VAL] = i; memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap)); + memset(sc->sc_hwflags, 0, sizeof(sc->sc_hwflags)); for (i = 0; i < 32; i++) { u_int8_t ix = rt->rateCodeToIndex[i]; - if (ix != 0xff) - sc->sc_hwmap[i] = rt->info[ix].dot11Rate & IEEE80211_RATE_VAL; + if (ix == 0xff) + continue; + sc->sc_hwmap[i] = rt->info[ix].dot11Rate & IEEE80211_RATE_VAL; + if (rt->info[ix].shortPreamble || + rt->info[ix].phy == IEEE80211_T_OFDM) + sc->sc_hwflags[i] |= IEEE80211_RADIOTAP_F_SHORTPRE; } sc->sc_currates = rt; sc->sc_curmode = mode; ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#19 (text+ko) ==== @@ -182,6 +182,7 @@ HAL_CHANNEL sc_curchan; /* current h/w channel */ u_int8_t sc_rixmap[256]; /* IEEE to h/w rate table ix */ u_int8_t sc_hwmap[32]; /* h/w rate ix to IEEE table */ + u_int8_t sc_hwflags[32]; /* " " " to radiotap flags */ u_int8_t sc_protrix; /* protection rate index */ u_int sc_txantenna; /* tx antenna (fixed or auto) */ HAL_INT sc_imask; /* interrupt mask copy */ From owner-p4-projects@FreeBSD.ORG Thu Dec 30 04:24:50 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BD8F216A4D0; Thu, 30 Dec 2004 04:24:49 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92FF616A4CE for ; Thu, 30 Dec 2004 04:24:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EB4B43D31 for ; Thu, 30 Dec 2004 04:24:49 +0000 (GMT) (envelope-from trhodes@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBU4OnwB074531 for ; Thu, 30 Dec 2004 04:24:49 GMT (envelope-from trhodes@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBU4Onwk074528 for perforce@freebsd.org; Thu, 30 Dec 2004 04:24:49 GMT (envelope-from trhodes@freebsd.org) Date: Thu, 30 Dec 2004 04:24:49 GMT Message-Id: <200412300424.iBU4Onwk074528@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trhodes@freebsd.org using -f From: Tom Rhodes To: Perforce Change Reviews Subject: PERFORCE change 67882 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 04:24:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=67882 Change 67882 by trhodes@trhodes_local on 2004/12/30 04:24:44 Make this file more realistic by gathering the flags passed in rc.conf. Add required files as requested by Wayne. Affected files ... .. //depot/projects/trustedbsd/audit3/etc/rc.d/auditd#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/etc/rc.d/auditd#2 (text+ko) ==== @@ -12,31 +12,12 @@ . /etc/rc.subr name="auditd" -start_cmd="auditd_start" stop_cmd="auditd_stop" - -auditd_start() -{ -if checkyesno auditd_enable; then - echo "Starting the audit daemon" - if [ -f /usr/sbin/auditd ]; then - /usr/sbin/auditd -fi - - -elif checkyesno auditd_failstop_enable; then - echo "Starting the audit daemon" - if [ -f /usr/sbin/auditd ]; then - /usr/sbin/auditd -s -fi - -elif checkyesno auditd_failhalt_enable; then - echo "Starting the audit daemon" - if [ -f /usr/sbin/auditd ]; then - /usr/sbin/auditd -h - fi -fi -} +command="/usr/sbin/${name}" +rcvar="auditd_enable" +command_args="${auditd_flags}" +requited_files="/etc/audit_class /etc/audit_control /etc/audit_event + /etc/audit_user /etc/audit_warn /etc/auditd_control" auditd_stop() { From owner-p4-projects@FreeBSD.ORG Thu Dec 30 13:58:09 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B82016A4D1; Thu, 30 Dec 2004 13:58:09 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB42C16A4CE for ; Thu, 30 Dec 2004 13:58:08 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ADB643D1F for ; Thu, 30 Dec 2004 13:58:08 +0000 (GMT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBUDw8cC015875 for ; Thu, 30 Dec 2004 13:58:08 GMT (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBUDw8vR015872 for perforce@freebsd.org; Thu, 30 Dec 2004 13:58:08 GMT (envelope-from areisse@nailabs.com) Date: Thu, 30 Dec 2004 13:58:08 GMT Message-Id: <200412301358.iBUDw8vR015872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 67894 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 13:58:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=67894 Change 67894 by areisse@areisse_tislabs on 2004/12/30 13:57:50 Add UseLogin support back to the ssh policy (the current NSA policy dropped support for this) Fix labelling of newrole. The system now boots and runs in enforcing mode, but very little has been tested (console logins and ssh). Affected files ... .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/domains/program/ssh.te#9 edit .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/file_contexts/program/newrole.fc#5 edit .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/macros/admin_macros.te#5 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/domains/program/ssh.te#9 (text+ko) ==== @@ -126,6 +126,7 @@ # type of the pty for the child define(`sshd_spawn_domain', ` login_spawn_domain($1, $2) +domain_auto_trans($1_t, shell_exec_t, user_t) ifdef(`xauth.te', ` domain_trans($1_t, xauth_exec_t, $2) ') @@ -211,6 +212,10 @@ role_transition sysadm_r sshd_exec_t system_r; ') +# for UseLogin +sshd_program_domain(sshd_login) +domain_auto_trans(sshd_t, login_exec_t, sshd_login_t) + undefine(`sshd_program_domain') # so a tunnel can point to another ssh tunnel... @@ -269,3 +274,31 @@ allow user_cvs_rw_t sshd_t:fd use; ') + +################################# +# +# Rules for the sshd_login_t domain +# +# sshd_login_t is the domain of a login process +# spawned by sshd +read_locale(sshd_login_t); + +# Use the pty created by sshd +allow sshd_login_t sshd_devpts_t:chr_file { setattr rw_file_perms poll }; + +# Write to /var/log/lastlog +allow sshd_login_t lastlog_t:file rw_file_perms; + +# Relabel ptys created by sshd +allow sshd_login_t sshd_devpts_t:chr_file { relabelfrom relabelto }; +allow sshd_login_t userpty_type:chr_file { getattr relabelfrom relabelto }; + +# open old-style ptys +#allow sshd_login_t devpts_t:chr_file { read write relabelfrom relabelto getattr setattr }; + +allow sshd_login_t self:capability { linux_immutable sys_resource }; + +# run user shells +domain_auto_trans(sshd_login_t, shell_exec_t, user_t) +domain_trans(sshd_login_t, shell_exec_t, unpriv_userdomain) + ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/file_contexts/program/newrole.fc#5 (text+ko) ==== @@ -1,2 +1,2 @@ # newrole -/usr/bin/newrole -- system_u:object_r:newrole_exec_t +/usr/sbin/sebsd_newrole -- system_u:object_r:newrole_exec_t ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/macros/admin_macros.te#5 (text+ko) ==== @@ -25,6 +25,7 @@ # Type for tty devices. type $1_tty_device_t, file_type, sysadmfile, ttyfile; +allow $1_tty_device_t device_t:filesystem associate; # Inherit rules for ordinary users. base_user_domain($1) From owner-p4-projects@FreeBSD.ORG Thu Dec 30 17:31:32 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 71B3416A4D0; Thu, 30 Dec 2004 17:31:32 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 336CB16A4CE for ; Thu, 30 Dec 2004 17:31:32 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F77D43D46 for ; Thu, 30 Dec 2004 17:31:32 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBUHVWwv030145 for ; Thu, 30 Dec 2004 17:31:32 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBUHVVNP030142 for perforce@freebsd.org; Thu, 30 Dec 2004 17:31:31 GMT (envelope-from sam@freebsd.org) Date: Thu, 30 Dec 2004 17:31:31 GMT Message-Id: <200412301731.iBUHVVNP030142@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67907 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 17:31:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=67907 Change 67907 by sam@sam_ebb on 2004/12/30 17:31:04 o slight simplification to previous change o correct some comments and and #undef Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#51 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#51 (text+ko) ==== @@ -2763,7 +2763,7 @@ if (qnum == -1) { /* * NB: don't print a message, this happens - * ormally on parts with too few tx queues + * normally on parts with too few tx queues */ return NULL; } @@ -3685,7 +3685,7 @@ ath_setcurmode(sc, mode); /* * Update BPF state. NB: ethereal et. al. don't handle - * merged flags well, so pick a mode for their use. + * merged flags well so pick a unique mode for their use. */ if (IEEE80211_IS_CHAN_A(chan)) flags = IEEE80211_CHAN_A; @@ -3693,10 +3693,8 @@ else if (IEEE80211_IS_CHAN_G(chan) || IEEE80211_IS_CHAN_PUREG(chan)) flags = IEEE80211_CHAN_G; - else if (IEEE80211_IS_CHAN_B(chan)) + else flags = IEEE80211_CHAN_B; - else - flags = 0; if (IEEE80211_IS_CHAN_T(chan)) flags |= IEEE80211_CHAN_TURBO; sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = @@ -4318,7 +4316,7 @@ } ATH_UNLOCK(sc); return error; -#undef IS_UP +#undef IS_RUNNING } static int From owner-p4-projects@FreeBSD.ORG Thu Dec 30 19:11:36 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE19C16A4D0; Thu, 30 Dec 2004 19:11:35 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 899E516A4CE for ; Thu, 30 Dec 2004 19:11:35 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3168943D31 for ; Thu, 30 Dec 2004 19:11:35 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBUJBZKB034631 for ; Thu, 30 Dec 2004 19:11:35 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBUJBYoQ034628 for perforce@freebsd.org; Thu, 30 Dec 2004 19:11:34 GMT (envelope-from jhb@freebsd.org) Date: Thu, 30 Dec 2004 19:11:34 GMT Message-Id: <200412301911.iBUJBYoQ034628@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 67913 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:11:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=67913 Change 67913 by jhb@jhb_slimer on 2004/12/30 19:10:39 IFC @67912. Affected files ... .. //depot/projects/smpng/sys/alpha/conf/GENERIC#45 integrate .. //depot/projects/smpng/sys/amd64/conf/GENERIC#26 integrate .. //depot/projects/smpng/sys/conf/NOTES#88 integrate .. //depot/projects/smpng/sys/dev/usb/ehci.c#16 integrate .. //depot/projects/smpng/sys/dev/usb/ehci_pci.c#13 integrate .. //depot/projects/smpng/sys/dev/usb/ehcivar.h#4 integrate .. //depot/projects/smpng/sys/dev/usb/ohci_pci.c#11 integrate .. //depot/projects/smpng/sys/dev/usb/ugen.c#33 integrate .. //depot/projects/smpng/sys/dev/usb/uhci_pci.c#12 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#69 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#11 integrate .. //depot/projects/smpng/sys/i386/conf/GENERIC#59 integrate .. //depot/projects/smpng/sys/kern/kern_umtx.c#15 integrate .. //depot/projects/smpng/sys/kern/subr_witness.c#125 integrate .. //depot/projects/smpng/sys/kern/sysv_msg.c#24 integrate .. //depot/projects/smpng/sys/kern/vfs_cluster.c#36 integrate .. //depot/projects/smpng/sys/modules/bktr/bktr/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/if_ppp/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/if_tun/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/io/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/mac_portacl/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/mem/Makefile#3 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/ubt/Makefile#6 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/snp/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/sound/driver/uaudio/Makefile#3 integrate .. //depot/projects/smpng/sys/modules/ti/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ubsa/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ubser/Makefile#3 integrate .. //depot/projects/smpng/sys/modules/ucom/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ucycom/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/uftdi/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ugen/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/uhid/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ukbd/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/ulpt/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/umct/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/umodem/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ums/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/uplcom/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/urio/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/usb/Makefile#7 integrate .. //depot/projects/smpng/sys/modules/uscanner/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/uvisor/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/uvscom/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/vkbd/Makefile#2 integrate .. //depot/projects/smpng/sys/netgraph/ng_ether.c#19 integrate .. //depot/projects/smpng/sys/netipx/ipx_input.c#10 integrate .. //depot/projects/smpng/sys/netipx/ipx_pcb.c#13 integrate .. //depot/projects/smpng/sys/netipx/ipx_pcb.h#5 integrate .. //depot/projects/smpng/sys/netipx/ipx_usrreq.c#17 integrate .. //depot/projects/smpng/sys/netipx/ipx_var.h#5 integrate .. //depot/projects/smpng/sys/netipx/spx_usrreq.c#16 integrate .. //depot/projects/smpng/sys/pci/agp_ali.c#11 integrate .. //depot/projects/smpng/sys/pci/agp_intel.c#18 integrate .. //depot/projects/smpng/sys/pci/agp_sis.c#11 integrate .. //depot/projects/smpng/sys/pci/agp_via.c#14 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/pmap.c#50 integrate .. //depot/projects/smpng/sys/sparc64/conf/GENERIC#51 integrate .. //depot/projects/smpng/sys/sys/umtx.h#7 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#60 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/conf/GENERIC#45 (text+ko) ==== @@ -18,17 +18,17 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.181 2004/11/09 22:23:34 wilko Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.182 2004/12/30 15:32:31 jhb Exp $ machine alpha cpu EV4 cpu EV5 ident GENERIC -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" +# To statically compile in device wiring instead of /boot/device.hints +#hints "GENERIC.hints" # Default places to look for devices. -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols # Platforms supported options API_UP1000 # UP1000, UP1100 (Nautilus) @@ -43,41 +43,44 @@ options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) -#options SCHED_ULE #ULE scheduler -options SCHED_4BSD #4BSD scheduler -options PREEMPTION #Enable kernel thread preemption -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES #Enable FFS soft updates support -options UFS_ACL #Support for access control lists -options UFS_DIRHASH #Improve performance on big directories -options MD_ROOT #MD is a potential root device -options NFSCLIENT #Network Filesystem Client -options NFSSERVER #Network Filesystem Server -options NFS_ROOT #NFS usable as root device -options MSDOSFS #MSDOS Filesystem -options CD9660 #ISO 9660 Filesystem -options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -options GEOM_GPT #GUID Partition Tables. -options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] -options COMPAT_FREEBSD4 #Compatible with FreeBSD4 -options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI -options KTRACE #ktrace(1) syscall trace support -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +#options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options MD_ROOT # MD is a potential root device +options NFSCLIENT # Network Filesystem Client +options NFSSERVER # Network Filesystem Server +options NFS_ROOT # NFS usable as /, requires NFSCLIENT +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_GPT # GUID Partition Tables. +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options COMPAT_FREEBSD4 # Compatible with FreeBSD4 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options AHC_REG_PRETTY_PRINT # Print register bitfields in debug + # output. Adds ~128k to driver. +options ADAPTIVE_GIANT # Giant mutex is adaptive. # Debugging for use in -current -options KDB #Enable kernel debugger support -options DDB #Support DDB -options GDB #Support remote GDB -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options KDB # Enable kernel debugger support. +options DDB # Support DDB. +options GDB # Support remote GDB. +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed # To make an SMP kernel, the next line is needed options SMP # Symmetric MultiProcessor Kernel @@ -157,8 +160,9 @@ device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. +# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support -device dc # DEC/Intel 21143 and workalikes +device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) device nge # NatSemi DP83820 gigabit ethernet device pcn # AMD Am79C97x PCI 10/100 NICs @@ -182,11 +186,11 @@ device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying/(translation) +device faith # IPv6-to-IPv4 relaying (translation) # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! -device bpf #Berkeley packet filter +device bpf # Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface @@ -196,13 +200,14 @@ device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer -device umass # Disks/Mass storage - Requires scbus and da0 +device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse -# USB Ethernet +# USB Ethernet, requires miibus device aue # ADMtek USB Ethernet device axe # ASIX Electronics USB Ethernet device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet +device rue # RealTek RTL8150 USB Ethernet # FireWire support device firewire # FireWire bus code ==== //depot/projects/smpng/sys/amd64/conf/GENERIC#26 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.426 2004/11/02 20:57:19 andre Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.427 2004/12/30 18:51:23 jhb Exp $ machine amd64 cpu HAMMER @@ -53,7 +53,7 @@ options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. @@ -72,6 +72,7 @@ # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel + # Workarounds for some known-to-be-broken chipsets (nVidia nForce3-Pro150) device atpic # 8259A compatability options NO_MIXED_MODE # Don't penalize working chipsets @@ -98,7 +99,7 @@ device ahd # AHA39320/29320 and onboard AIC79xx devices device amd # AMD 53C974 (Tekram DC-390(T)) device isp # Qlogic family -#device ispfw # Firmware for QLogic HBAs- normally a module +#device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') ==== //depot/projects/smpng/sys/conf/NOTES#88 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1290 2004/12/20 04:22:41 sam Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1291 2004/12/30 16:53:20 rwatson Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -423,7 +423,7 @@ options IPX #IPX/SPX communications protocols options IPXIP #IPX in IP encapsulation (not available) -#options NCP #NetWare Core protocol +options NCP #NetWare Core protocol options NETATALK #Appletalk communications protocols options NETATALKDEBUG #Appletalk debugging ==== //depot/projects/smpng/sys/dev/usb/ehci.c#16 (text+ko) ==== @@ -65,7 +65,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/ehci.c,v 1.25 2004/12/18 01:20:18 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ehci.c,v 1.26 2004/12/29 01:21:18 julian Exp $"); #include #include @@ -478,7 +478,8 @@ sqh->qh.qh_link = htole32(sqh->physaddr | EHCI_LINK_QH); sqh->qh.qh_curqtd = EHCI_NULL; - sqh->next = NULL; + sqh->prev = sqh; /*It's a circular list.. */ + sqh->next = sqh; /* Fill the overlay qTD */ sqh->qh.qh_qtd.qtd_next = EHCI_NULL; sqh->qh.qh_qtd.qtd_altnext = EHCI_NULL; @@ -1490,6 +1491,8 @@ /* * Add an ED to the schedule. Called at splusb(). + * If in the async schedule, it will always have a next. + * If in the intr schedule it may not. */ void ehci_add_qh(ehci_soft_qh_t *sqh, ehci_soft_qh_t *head) @@ -1497,8 +1500,11 @@ SPLUSBCHECK; sqh->next = head->next; + sqh->prev = head; sqh->qh.qh_link = head->qh.qh_link; head->next = sqh; + if (sqh->next) + sqh->next->prev = sqh; head->qh.qh_link = htole32(sqh->physaddr | EHCI_LINK_QH); #ifdef EHCI_DEBUG @@ -1511,21 +1517,17 @@ /* * Remove an ED from the schedule. Called at splusb(). + * Will always have a 'next' if it's in the async list as it's circular. */ void ehci_rem_qh(ehci_softc_t *sc, ehci_soft_qh_t *sqh, ehci_soft_qh_t *head) { - ehci_soft_qh_t *p; - SPLUSBCHECK; /* XXX */ - for (p = head; p != NULL && p->next != sqh; p = p->next) - ; - if (p == NULL) - panic("ehci_rem_qh: ED not found"); - p->next = sqh->next; - p->qh.qh_link = sqh->qh.qh_link; - + sqh->prev->qh.qh_link = sqh->qh.qh_link; + sqh->prev->next = sqh->next; + if (sqh->next) + sqh->next->prev = sqh->prev; ehci_sync_hc(sc); } @@ -2226,6 +2228,7 @@ sc->sc_freeqhs = sqh->next; memset(&sqh->qh, 0, sizeof(ehci_qh_t)); sqh->next = NULL; + sqh->prev = NULL; return (sqh); } @@ -2484,7 +2487,6 @@ * have happened since the hardware runs concurrently. * If the transaction has already happened we rely on the ordinary * interrupt processing to process it. - * XXX This is most probably wrong. */ void ehci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) @@ -2493,11 +2495,12 @@ struct ehci_pipe *epipe = (struct ehci_pipe *)xfer->pipe; ehci_softc_t *sc = (ehci_softc_t *)epipe->pipe.device->bus; ehci_soft_qh_t *sqh = epipe->sqh; - ehci_soft_qtd_t *sqtd; - ehci_physaddr_t cur; - u_int32_t qhstatus; + ehci_soft_qtd_t *sqtd, *snext, **psqtd; + ehci_physaddr_t cur, us, next; int s; int hit; + /* int count = 0; */ + ehci_soft_qh_t *psqh; DPRINTF(("ehci_abort_xfer: xfer=%p pipe=%p\n", xfer, epipe)); @@ -2516,27 +2519,29 @@ panic("ehci_abort_xfer: not in process context"); /* - * Step 1: Make interrupt routine and hardware ignore xfer. + * Step 1: Make interrupt routine and timeouts ignore xfer. */ s = splusb(); xfer->status = status; /* make software ignore it */ usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); usb_rem_task(epipe->pipe.device, &exfer->abort_task); - qhstatus = sqh->qh.qh_qtd.qtd_status; - sqh->qh.qh_qtd.qtd_status = qhstatus | htole32(EHCI_QTD_HALTED); - for (sqtd = exfer->sqtdstart; ; sqtd = sqtd->nextqtd) { - sqtd->qtd.qtd_status |= htole32(EHCI_QTD_HALTED); - if (sqtd == exfer->sqtdend) - break; - } splx(s); /* * Step 2: Wait until we know hardware has finished any possible - * use of the xfer. Also make sure the soft interrupt routine - * has run. + * use of the xfer. We do this by removing the entire + * queue from the async schedule and waiting for the doorbell. + * Nothing else should be touching the queue now. + */ + psqh = sqh->prev; + ehci_rem_qh(sc, sqh, psqh); + + /* + * Step 3: make sure the soft interrupt routine + * has run. This should remove any completed items off the queue. + * The hardware has no reference to completed items (TDs). + * It's safe to remove them at any time. */ - ehci_sync_hc(sc); s = splusb(); #ifdef USB_USE_SOFTINTR sc->sc_softwake = 1; @@ -2545,33 +2550,89 @@ #ifdef USB_USE_SOFTINTR tsleep(&sc->sc_softwake, PZERO, "ehciab", 0); #endif /* USB_USE_SOFTINTR */ - splx(s); /* - * Step 3: Remove any vestiges of the xfer from the hardware. + * Step 4: Remove any vestiges of the xfer from the hardware. * The complication here is that the hardware may have executed - * beyond the xfer we're trying to abort. So as we're scanning - * the TDs of this xfer we check if the hardware points to - * any of them. + * into or even beyond the xfer we're trying to abort. + * So as we're scanning the TDs of this xfer we check if + * the hardware points to any of them. + * + * first we need to see if there are any transfers + * on this queue before the xfer we are aborting.. we need + * to update any pointers that point to us to point past + * the aborting xfer. (If there is something past us). + * Hardware and software. */ - s = splusb(); /* XXX why? */ cur = EHCI_LINK_ADDR(le32toh(sqh->qh.qh_curqtd)); hit = 0; - for (sqtd = exfer->sqtdstart; ; sqtd = sqtd->nextqtd) { - hit |= cur == sqtd->physaddr; - if (sqtd == exfer->sqtdend) - break; + + /* If they initially point here. */ + us = exfer->sqtdstart->physaddr; + + /* We will change them to point here */ + snext = exfer->sqtdend->nextqtd; + next = snext ? snext->physaddr : htole32(EHCI_NULL); + + /* + * Now loop through any qTDs before us and keep track of the pointer + * that points to us for the end. + */ + psqtd = &sqh->sqtd; + sqtd = sqh->sqtd; + while (sqtd && sqtd != exfer->sqtdstart) { + hit |= (cur == sqtd->physaddr); + if (EHCI_LINK_ADDR(le32toh(sqtd->qtd.qtd_next)) == us) + sqtd->qtd.qtd_next = next; + if (EHCI_LINK_ADDR(le32toh(sqtd->qtd.qtd_altnext)) == us) + sqtd->qtd.qtd_altnext = next; + psqtd = &sqtd->nextqtd; + sqtd = sqtd->nextqtd; } - sqtd = sqtd->nextqtd; - /* Zap curqtd register if hardware pointed inside the xfer. */ - if (hit && sqtd != NULL) { - DPRINTFN(1,("ehci_abort_xfer: cur=0x%08x\n", sqtd->physaddr)); - sqh->qh.qh_curqtd = htole32(sqtd->physaddr); /* unlink qTDs */ - sqh->qh.qh_qtd.qtd_status = qhstatus; - } else { - DPRINTFN(1,("ehci_abort_xfer: no hit\n")); + /* make the software pointer bypass us too */ + *psqtd = exfer->sqtdend->nextqtd; + + /* + * If we already saw the active one then we are pretty much done. + * We've done all the relinking we need to do. + */ + if (!hit) { + + /* + * Now reinitialise the QH to point to the next qTD + * (if there is one). We only need to do this if + * it was previously pointing to us. + * XXX Not quite sure what to do about the data toggle. + */ + sqtd = exfer->sqtdstart; + for (sqtd = exfer->sqtdstart; ; sqtd = sqtd->nextqtd) { + if (cur == sqtd->physaddr) { + hit++; + } + /* count++; */ + if (sqtd == exfer->sqtdend) + break; + } + sqtd = sqtd->nextqtd; + /* + * Only need to alter the QH if it was pointing at a qTD + * that we are removing. + */ + if (hit) { + if (snext) { + ehci_set_qh_qtd(sqh, snext); + } else { + + sqh->qh.qh_curqtd = 0; /* unlink qTDs */ + sqh->qh.qh_qtd.qtd_status = 0; + sqh->qh.qh_qtd.qtd_next = + sqh->qh.qh_qtd.qtd_altnext + = htole32(EHCI_NULL); + DPRINTFN(1,("ehci_abort_xfer: no hit\n")); + } + } } - + ehci_add_qh(sqh, psqh); /* * Step 4: Execute callback. */ @@ -2580,6 +2641,7 @@ #endif usb_transfer_complete(xfer); + /* printf("%s: %d TDs aborted\n", __func__, count); */ splx(s); #undef exfer } ==== //depot/projects/smpng/sys/dev/usb/ehci_pci.c#13 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.14 2004/08/02 15:37:34 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.15 2004/12/28 22:17:10 jb Exp $"); /* * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller. @@ -239,7 +239,7 @@ ehci_pci_detach(self); return ENOMEM; } - device_set_ivars(sc->sc_bus.bdev, sc); + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); /* ehci_pci_match will never return NULL if ehci_pci_probe succeeded */ device_set_desc(sc->sc_bus.bdev, ehci_pci_match(self)); ==== //depot/projects/smpng/sys/dev/usb/ehcivar.h#4 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: ehcivar.h,v 1.12 2001/12/31 12:16:57 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.5 2004/10/30 15:13:09 iedowse Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.6 2004/12/29 01:21:18 julian Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -51,6 +51,7 @@ typedef struct ehci_soft_qh { ehci_qh_t qh; struct ehci_soft_qh *next; + struct ehci_soft_qh *prev; struct ehci_soft_qtd *sqtd; ehci_physaddr_t physaddr; int islot; /* Interrupt list slot. */ ==== //depot/projects/smpng/sys/dev/usb/ohci_pci.c#11 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/ohci_pci.c,v 1.40 2004/08/02 15:37:35 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ohci_pci.c,v 1.41 2004/12/28 22:17:10 jb Exp $"); /* * USB Open Host Controller driver. @@ -244,7 +244,7 @@ ohci_pci_detach(self); return ENOMEM; } - device_set_ivars(sc->sc_bus.bdev, sc); + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); /* ohci_pci_match will never return NULL if ohci_pci_probe succeeded */ device_set_desc(sc->sc_bus.bdev, ohci_pci_match(self)); ==== //depot/projects/smpng/sys/dev/usb/ugen.c#33 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/ugen.c,v 1.101 2004/12/22 17:31:44 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ugen.c,v 1.102 2004/12/29 21:36:43 julian Exp $"); /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1329,9 +1329,6 @@ case USB_SET_CONFIG: if (!(flag & FWRITE)) return (EPERM); -#if defined(__FreeBSD__) - ugen_destroy_devnodes(sc); -#endif err = ugen_set_config(sc, *(int *)addr); switch (err) { case USBD_NORMAL_COMPLETION: ==== //depot/projects/smpng/sys/dev/usb/uhci_pci.c#12 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.55 2004/10/13 14:51:42 le Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.56 2004/12/28 22:17:10 jb Exp $"); /* Universal Host Controller Interface * @@ -297,7 +297,7 @@ uhci_pci_detach(self); return ENOMEM; } - device_set_ivars(sc->sc_bus.bdev, sc); + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); /* uhci_pci_match must never return NULL if uhci_pci_probe succeeded */ device_set_desc(sc->sc_bus.bdev, uhci_pci_match(self)); ==== //depot/projects/smpng/sys/dev/usb/usbdevs#69 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.218 2004/12/27 06:58:05 imp Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.220 2004/12/29 06:21:41 imp Exp $ /* $NetBSD: usbdevs,v 1.388 2004/11/05 13:51:16 scw Exp $ */ /* @@ -41,6 +41,11 @@ /* * List of known USB vendors * + * USB.org publishes a VID list of USB-IF member companies at + * http://www.usb.org/developers/tools + * Note that it does not show companies that have obtained a Vendor ID + * without becoming full members. + * * Please note that these IDs do not do anything. Adding an ID here and * regenerating the usbdevs.h and usbdevs_data.h only makes a symbolic name * available to the source code and does not change any functionality, nor @@ -1477,6 +1482,9 @@ product WESTERN EXTHDD 0x0400 External HDD product WESTERN HUB 0x0500 USB HUB +/* Windbond Electronics */ +product WINBOND UH104 0x5518 4-port USB Hub + /* Xirlink products */ product XIRLINK PCCAM 0x8080 IBM PC Camera ==== //depot/projects/smpng/sys/geom/raid3/g_raid3.c#11 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/raid3/g_raid3.c,v 1.32 2004/12/25 19:17:47 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/raid3/g_raid3.c,v 1.33 2004/12/28 21:52:45 pjd Exp $"); #include #include @@ -1778,14 +1778,6 @@ G_RAID3_DEBUG(5, "%s: I'm here 1.", __func__); continue; } -#if 1 - if (ep != NULL) { - printf("The topology lock is already held.\n"); -#if 0 - tsleep(&ep, PRIBIO, "r3:hmm", hz * 3); -#endif - } -#endif /* * Now I/O requests. */ @@ -1799,7 +1791,7 @@ * already held? Try again. */ mtx_unlock(&sc->sc_queue_mtx); - tsleep(ep, PRIBIO, "r3:hmm1", hz / 5); + tsleep(ep, PRIBIO, "r3:top1", hz / 5); continue; } if ((sc->sc_flags & @@ -1879,7 +1871,7 @@ * We have some pending events, don't sleep now. */ G_RAID3_DEBUG(5, "%s: I'm here 7.", __func__); - tsleep(ep, PRIBIO, "r3:hmm2", hz / 5); + tsleep(ep, PRIBIO, "r3:top2", hz / 5); continue; } mtx_lock(&sc->sc_queue_mtx); ==== //depot/projects/smpng/sys/i386/conf/GENERIC#59 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.420 2004/11/02 20:57:19 andre Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.421 2004/12/30 15:30:23 jhb Exp $ machine i386 cpu I486_CPU @@ -71,9 +71,9 @@ options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -# To make an SMP kernel, the next two are needed -options SMP # Symmetric MultiProcessor Kernel -device apic # I/O APIC +# To make an SMP kernel, the next two lines are needed +options SMP # Symmetric MultiProcessor Kernel +device apic # I/O APIC # Bus support. Do not remove isa, even if you have no isa slots device isa @@ -275,7 +275,7 @@ device ums # Mouse device urio # Diamond Rio 500 MP3 player device uscanner # Scanners -# USB Ethernet, requires mii +# USB Ethernet, requires miibus device aue # ADMtek USB Ethernet device axe # ASIX Electronics USB Ethernet device cue # CATC USB Ethernet ==== //depot/projects/smpng/sys/kern/kern_umtx.c#15 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.24 2004/12/25 13:02:50 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.25 2004/12/30 02:56:17 davidxu Exp $"); #include #include @@ -608,53 +608,22 @@ } static int -do_unlock_and_wait(struct thread *td, struct umtx *umtx, long id, void *uaddr, - struct timespec *abstime) +do_wait(struct thread *td, struct umtx *umtx, long id, struct timespec *abstime) { struct umtx_q uq; - intptr_t owner; - intptr_t old; struct timespec ts1, ts2; struct timeval tv; + long tmp; int timo, error = 0; - if (umtx == uaddr) - return (EINVAL); - - /* - * Make sure we own this mtx. - * - * XXX Need a {fu,su}ptr this is not correct on arch where - * sizeof(intptr_t) != sizeof(long). - */ - if ((owner = fuword(&umtx->u_owner)) == -1) - return (EFAULT); - - if ((owner & ~UMTX_CONTESTED) != id) - return (EPERM); - - if ((error = umtxq_queue_me(td, uaddr, &uq)) != 0) + if ((error = umtxq_queue_me(td, umtx, &uq)) != 0) return (error); - - old = casuptr((intptr_t *)&umtx->u_owner, id, UMTX_UNOWNED); - if (old == -1) { + tmp = fuword(&umtx->u_owner); + if (tmp != id) { umtxq_lock(&uq.uq_key); umtxq_remove(&uq); umtxq_unlock(&uq.uq_key); - umtx_key_release(&uq.uq_key); - return (EFAULT); - } - if (old != id) { - error = do_unlock(td, umtx, id); - if (error) { - umtxq_lock(&uq.uq_key); - umtxq_remove(&uq); - umtxq_unlock(&uq.uq_key); - umtx_key_release(&uq.uq_key); - return (error); - } - } - if (abstime == NULL) { + } else if (abstime == NULL) { umtxq_lock(&uq.uq_key); if (td->td_flags & TDF_UMTXQ) error = umtxq_sleep(td, &uq.uq_key, @@ -750,7 +719,7 @@ return do_lock(td, uap->umtx, uap->id, ts); case UMTX_OP_UNLOCK: return do_unlock(td, uap->umtx, uap->id); - case UMTX_OP_UNLOCK_AND_WAIT: + case UMTX_OP_WAIT: /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) ts = NULL; @@ -763,10 +732,9 @@ return (EINVAL); ts = &abstime; } - return do_unlock_and_wait(td, uap->umtx, uap->id, - uap->uaddr, ts); + return do_wait(td, uap->umtx, uap->id, ts); case UMTX_OP_WAKE: - return do_wake(td, uap->uaddr, uap->id); + return do_wake(td, uap->umtx, uap->id); default: return (EINVAL); } ==== //depot/projects/smpng/sys/kern/subr_witness.c#125 (text+ko) ==== @@ -82,7 +82,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.185 2004/12/27 10:47:08 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.186 2004/12/28 21:21:27 jhb Exp $"); #include "opt_ddb.h" #include "opt_witness.h" @@ -106,7 +106,7 @@ /* Define this to check for blessed mutexes */ #undef BLESSING -#define WITNESS_COUNT 200 +#define WITNESS_COUNT 1024 #define WITNESS_CHILDCOUNT (WITNESS_COUNT * 4) /* * XXX: This is somewhat bogus, as we assume here that at most 1024 threads @@ -191,7 +191,6 @@ static void witness_display(void(*)(const char *fmt, ...)); #endif -MALLOC_DEFINE(M_WITNESS, "witness", "witness structure"); SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW, 0, "Witness Locking"); /* ==== //depot/projects/smpng/sys/kern/sysv_msg.c#24 (text+ko) ==== @@ -18,7 +18,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sysv_msg.c,v 1.54 2004/11/12 13:23:47 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sysv_msg.c,v 1.55 2004/12/30 13:56:34 rwatson Exp $"); #include "opt_sysvipc.h" @@ -132,6 +132,8 @@ TUNABLE_INT_FETCH("kern.ipc.msgssz", &msginfo.msgssz); msginfo.msgmax = msginfo.msgseg * msginfo.msgssz; TUNABLE_INT_FETCH("kern.ipc.msgmni", &msginfo.msgmni); + TUNABLE_INT_FETCH("kern.ipc.msgmnb", &msginfo.msgmnb); + TUNABLE_INT_FETCH("kern.ipc.msgtql", &msginfo.msgtql); msgpool = malloc(msginfo.msgmax, M_MSG, M_WAITOK); if (msgpool == NULL) @@ -1136,8 +1138,8 @@ SYSCTL_DECL(_kern_ipc); SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, ""); SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RD, &msginfo.msgmnb, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RD, &msginfo.msgtql, 0, ""); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RDTUN, &msginfo.msgmnb, 0, ""); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RDTUN, &msginfo.msgtql, 0, ""); SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RDTUN, &msginfo.msgssz, 0, ""); SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RDTUN, &msginfo.msgseg, 0, ""); SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD, ==== //depot/projects/smpng/sys/kern/vfs_cluster.c#36 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_cluster.c,v 1.160 2004/11/15 08:38:50 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_cluster.c,v 1.161 2004/12/29 04:49:10 alc Exp $"); #include "opt_debug_cluster.h" @@ -453,7 +453,6 @@ TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head, tbp, b_cluster.cluster_entry); VM_OBJECT_LOCK(tbp->b_bufobj->bo_object); - vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { vm_page_t m; m = tbp->b_pages[j]; @@ -467,7 +466,6 @@ if ((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) tbp->b_pages[j] = bogus_page; } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(tbp->b_bufobj->bo_object); /* * XXX shouldn't this be += size for both, like in @@ -938,7 +936,6 @@ } } } - vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { m = tbp->b_pages[j]; vm_page_io_start(m); @@ -949,7 +946,6 @@ bp->b_npages++; } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(tbp->b_bufobj->bo_object); } bp->b_bcount += size; ==== //depot/projects/smpng/sys/modules/bktr/bktr/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/bktr/bktr/Makefile,v 1.6 2003/08/12 09:45:34 alex Exp $ +# $FreeBSD: src/sys/modules/bktr/bktr/Makefile,v 1.7 2004/12/29 08:43:14 imp Exp $ # Makefile for the bktr Brooktree Bt848/Bt878 PCI video capture device @@ -7,7 +7,7 @@ KMOD= bktr SRCS= bktr_core.c bktr_os.c bktr_audio.c bktr_tuner.c bktr_card.c msp34xx.c \ opt_devfs.h opt_bktr.h bus_if.h device_if.h \ - pci_if.h vnode_if.h + pci_if.h opt_bktr.h: echo "#define BKTR_FREEBSD_MODULE 1" > opt_bktr.h ==== //depot/projects/smpng/sys/modules/if_ppp/Makefile#5 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/sys/modules/if_ppp/Makefile,v 1.32 2004/09/01 07:12:24 ru Exp $ +# $FreeBSD: src/sys/modules/if_ppp/Makefile,v 1.33 2004/12/29 08:45:48 imp Exp $ .PATH: ${.CURDIR}/../../net KMOD= if_ppp SRCS= if_ppp.c ppp_tty.c slcompress.c \ - opt_inet.h opt_ipx.h opt_mac.h opt_ppp.h vnode_if.h + opt_inet.h opt_ipx.h opt_mac.h opt_ppp.h PPP_BSDCOMP?= 1 # 0/1 PPP_DEFLATE?= 1 # 0/1 ==== //depot/projects/smpng/sys/modules/if_tun/Makefile#5 (text+ko) ==== @@ -1,10 +1,9 @@ -# $FreeBSD: src/sys/modules/if_tun/Makefile,v 1.27 2003/03/08 21:54:32 jlemon Exp $ +# $FreeBSD: src/sys/modules/if_tun/Makefile,v 1.28 2004/12/29 08:45:48 imp Exp $ .PATH: ${.CURDIR}/../../net KMOD= if_tun -SRCS= if_tun.c opt_atalk.h opt_inet.h opt_inet6.h opt_ipx.h opt_mac.h \ - vnode_if.h +SRCS= if_tun.c opt_atalk.h opt_inet.h opt_inet6.h opt_ipx.h opt_mac.h opt_atalk.h: echo "#define NETATALK 1" > ${.TARGET} ==== //depot/projects/smpng/sys/modules/io/Makefile#2 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/sys/modules/io/Makefile,v 1.1 2004/08/01 11:40:53 markm Exp $ +# $FreeBSD: src/sys/modules/io/Makefile,v 1.2 2004/12/29 08:44:03 imp Exp $ .PATH: ${.CURDIR}/../../dev/io >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Dec 30 19:13:38 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 87FDA16A4D0; Thu, 30 Dec 2004 19:13:38 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47C0E16A4CE for ; Thu, 30 Dec 2004 19:13:38 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DBA143D46 for ; Thu, 30 Dec 2004 19:13:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBUJDcbX034724 for ; Thu, 30 Dec 2004 19:13:38 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBUJDbuc034721 for perforce@freebsd.org; Thu, 30 Dec 2004 19:13:37 GMT (envelope-from jhb@freebsd.org) Date: Thu, 30 Dec 2004 19:13:37 GMT Message-Id: <200412301913.iBUJDbuc034721@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 67914 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:13:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=67914 Change 67914 by jhb@jhb_slimer on 2004/12/30 19:13:06 Remove stale and no longer used kernel configs. Affected files ... .. //depot/projects/smpng/sys/alpha/conf/ALPHA#9 delete .. //depot/projects/smpng/sys/alpha/conf/ALPHA-up#8 delete .. //depot/projects/smpng/sys/i386/conf/X86#9 delete .. //depot/projects/smpng/sys/i386/conf/X86-up#9 delete .. //depot/projects/smpng/sys/sparc64/conf/SPARC64#12 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Dec 30 19:22:50 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60C4716A4D0; Thu, 30 Dec 2004 19:22:50 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A87C16A4CE for ; Thu, 30 Dec 2004 19:22:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26DAB43D39 for ; Thu, 30 Dec 2004 19:22:50 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBUJMoWs035097 for ; Thu, 30 Dec 2004 19:22:50 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBUJMnBp035094 for perforce@freebsd.org; Thu, 30 Dec 2004 19:22:49 GMT (envelope-from jhb@freebsd.org) Date: Thu, 30 Dec 2004 19:22:49 GMT Message-Id: <200412301922.iBUJMnBp035094@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 67916 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:22:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=67916 Change 67916 by jhb@jhb_slimer on 2004/12/30 19:22:08 IPIs no longer suck, so turn this back on. Affected files ... .. //depot/projects/smpng/sys/kern/sched_4bsd.c#44 edit .. //depot/projects/smpng/sys/notes#27 edit Differences ... ==== //depot/projects/smpng/sys/kern/sched_4bsd.c#44 (text+ko) ==== @@ -229,7 +229,7 @@ /* Enable forwarding of wakeups to all other cpus */ SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); -static int forward_wakeup_enabled = 0; +static int forward_wakeup_enabled = 1; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, enabled, CTLFLAG_RW, &forward_wakeup_enabled, 0, "Forwarding of wakeup to idle CPUs"); ==== //depot/projects/smpng/sys/notes#27 (text+ko) ==== @@ -35,8 +35,6 @@ - Untested - Change amd64 to use [ls]fence instructions for memory barriers. - Untested (and no hardware, maybe peter can test) -- Turn off the ipiwakeups in 4BSD since the currently implementation can - lead to IPI deadlocks - Add a kproc API that does what kthread does right now - Add a real kthread API that creates just another thread inside of a kproc - Figure out what needs to be done to make a new kthread.. should each From owner-p4-projects@FreeBSD.ORG Thu Dec 30 19:40:13 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 10CB316A4D1; Thu, 30 Dec 2004 19:40:13 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C22D716A4CF for ; Thu, 30 Dec 2004 19:40:12 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86B6643D39 for ; Thu, 30 Dec 2004 19:40:12 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBUJeC1n035777 for ; Thu, 30 Dec 2004 19:40:12 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBUJeCE1035774 for perforce@freebsd.org; Thu, 30 Dec 2004 19:40:12 GMT (envelope-from jhb@freebsd.org) Date: Thu, 30 Dec 2004 19:40:12 GMT Message-Id: <200412301940.iBUJeCE1035774@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 67919 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:40:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=67919 Change 67919 by jhb@jhb_slimer on 2004/12/30 19:39:48 IFC @67918. Affected files ... .. //depot/projects/smpng/sys/i386/i386/exception.s#21 integrate .. //depot/projects/smpng/sys/i386/i386/sys_machdep.c#37 integrate .. //depot/projects/smpng/sys/i386/i386/vm_machdep.c#58 integrate .. //depot/projects/smpng/sys/kern/tty.c#56 integrate Differences ... ==== //depot/projects/smpng/sys/i386/i386/exception.s#21 (text+ko) ==== @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/i386/exception.s,v 1.111 2004/05/26 07:43:41 bde Exp $ + * $FreeBSD: src/sys/i386/i386/exception.s,v 1.112 2004/12/30 19:14:48 jhb Exp $ */ #include "opt_apic.h" ==== //depot/projects/smpng/sys/i386/i386/sys_machdep.c#37 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/sys_machdep.c,v 1.93 2004/11/27 06:51:36 das Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/sys_machdep.c,v 1.94 2004/12/30 19:26:23 jhb Exp $"); #include "opt_kstack_pages.h" #include "opt_mac.h" @@ -432,7 +432,7 @@ /* * Treat this as a special case, so userland needn't * know magic number NLDT. - */ + */ uap->start = NLDT; uap->num = MAX_LD - NLDT; } @@ -552,7 +552,7 @@ /* Allocate a free slot */ pldt = mdp->md_ldt; if (pldt == NULL) { - error = i386_ldt_grow(td, NLDT+1); + error = i386_ldt_grow(td, NLDT + 1); if (error) { kmem_free(kernel_map, (vm_offset_t)descs, descs_size); ==== //depot/projects/smpng/sys/i386/i386/vm_machdep.c#58 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.248 2004/12/27 06:15:03 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.249 2004/12/30 19:26:23 jhb Exp $"); #include "opt_isa.h" #include "opt_npx.h" @@ -246,9 +246,9 @@ */ pcb2->pcb_ext = 0; - /* Copy the LDT, if necessary. */ + /* Copy the LDT, if necessary. */ mtx_lock_spin(&sched_lock); - if (mdp2->md_ldt != NULL) { + if (mdp2->md_ldt != NULL) { if (flags & RFMEM) { mdp2->md_ldt->ldt_refcnt++; } else { @@ -257,7 +257,7 @@ if (mdp2->md_ldt == NULL) panic("could not copy LDT"); } - } + } mtx_unlock_spin(&sched_lock); /* @@ -323,11 +323,11 @@ if (td == PCPU_GET(fpcurthread)) npxdrop(); #endif - if (pcb->pcb_flags & PCB_DBREGS) { + if (pcb->pcb_flags & PCB_DBREGS) { /* disable all hardware breakpoints */ - reset_dbregs(); - pcb->pcb_flags &= ~PCB_DBREGS; - } + reset_dbregs(); + pcb->pcb_flags &= ~PCB_DBREGS; + } } void ==== //depot/projects/smpng/sys/kern/tty.c#56 (text+ko) ==== @@ -71,7 +71,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/tty.c,v 1.243 2004/12/20 21:38:13 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/tty.c,v 1.244 2004/12/30 19:24:49 jhb Exp $"); #include "opt_compat.h" #include "opt_tty.h" From owner-p4-projects@FreeBSD.ORG Thu Dec 30 20:59:53 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D0EA16A4D0; Thu, 30 Dec 2004 20:59:53 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1143D16A4CE for ; Thu, 30 Dec 2004 20:59:53 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A511E43D31 for ; Thu, 30 Dec 2004 20:59:52 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBUKxq7J045299 for ; Thu, 30 Dec 2004 20:59:52 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBUKxqHh045296 for perforce@freebsd.org; Thu, 30 Dec 2004 20:59:52 GMT (envelope-from jhb@freebsd.org) Date: Thu, 30 Dec 2004 20:59:52 GMT Message-Id: <200412302059.iBUKxqHh045296@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 67928 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 20:59:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=67928 Change 67928 by jhb@jhb_slimer on 2004/12/30 20:59:50 IFC @67927. Loop back priority inversion fixes. Affected files ... .. //depot/projects/smpng/sys/compat/ndis/subr_hal.c#9 integrate .. //depot/projects/smpng/sys/dev/md/md.c#61 integrate .. //depot/projects/smpng/sys/geom/geom_kern.c#19 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#15 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#12 integrate .. //depot/projects/smpng/sys/kern/kern_intr.c#64 integrate .. //depot/projects/smpng/sys/kern/kern_resource.c#53 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#88 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#45 integrate .. //depot/projects/smpng/sys/kern/sched_ule.c#49 integrate .. //depot/projects/smpng/sys/kern/subr_trap.c#75 integrate .. //depot/projects/smpng/sys/kern/subr_turnstile.c#18 integrate .. //depot/projects/smpng/sys/sys/proc.h#137 integrate .. //depot/projects/smpng/sys/sys/sched.h#18 integrate .. //depot/projects/smpng/sys/sys/turnstile.h#5 integrate Differences ... ==== //depot/projects/smpng/sys/compat/ndis/subr_hal.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.13 2004/08/01 20:04:30 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.14 2004/12/30 20:29:58 jhb Exp $"); #include #include @@ -308,7 +308,6 @@ mtx_lock_spin(&sched_lock); oldirql = curthread->td_base_pri; sched_prio(curthread, PI_REALTIME); - curthread->td_base_pri = PI_REALTIME; mtx_unlock_spin(&sched_lock); return(oldirql); @@ -324,7 +323,6 @@ panic("IRQL_NOT_GREATER_THAN"); mtx_lock_spin(&sched_lock); - curthread->td_base_pri = oldirql; sched_prio(curthread, oldirql); mtx_unlock_spin(&sched_lock); ==== //depot/projects/smpng/sys/dev/md/md.c#61 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/dev/md/md.c,v 1.146 2004/12/27 17:20:06 pjd Exp $ + * $FreeBSD: src/sys/dev/md/md.c,v 1.147 2004/12/30 20:29:58 jhb Exp $ * */ @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -618,7 +619,9 @@ int error, hasgiant; sc = arg; - curthread->td_base_pri = PRIBIO; + mtx_lock_spin(&sched_lock); + sched_prio(curthread, PRIBIO); + mtx_unlock_spin(&sched_lock); switch (sc->type) { case MD_VNODE: ==== //depot/projects/smpng/sys/geom/geom_kern.c#19 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/geom_kern.c,v 1.35 2004/09/13 14:58:27 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_kern.c,v 1.36 2004/12/30 20:29:58 jhb Exp $"); #include #include @@ -47,8 +47,9 @@ #include #include #include +#include +#include #include -#include #include #include @@ -87,7 +88,9 @@ struct thread *tp = FIRST_THREAD_IN_PROC(p); mtx_assert(&Giant, MA_NOTOWNED); - tp->td_base_pri = PRIBIO; + mtx_lock_spin(&sched_lock); + sched_prio(tp, PRIBIO); + mtx_unlock_spin(&sched_lock); for(;;) { g_io_schedule_up(tp); } @@ -108,7 +111,9 @@ struct thread *tp = FIRST_THREAD_IN_PROC(p); mtx_assert(&Giant, MA_NOTOWNED); - tp->td_base_pri = PRIBIO; + mtx_lock_spin(&sched_lock); + sched_prio(tp, PRIBIO); + mtx_unlock_spin(&sched_lock); for(;;) { g_io_schedule_down(tp); } @@ -129,7 +134,9 @@ struct thread *tp = FIRST_THREAD_IN_PROC(p); mtx_assert(&Giant, MA_NOTOWNED); - tp->td_base_pri = PRIBIO; + mtx_lock_spin(&sched_lock); + sched_prio(tp, PRIBIO); + mtx_unlock_spin(&sched_lock); for(;;) { g_run_events(); tsleep(&g_wait_event, PRIBIO, "-", hz/10); ==== //depot/projects/smpng/sys/geom/mirror/g_mirror.c#15 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/mirror/g_mirror.c,v 1.54 2004/12/23 21:15:15 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/mirror/g_mirror.c,v 1.55 2004/12/30 20:29:58 jhb Exp $"); #include #include @@ -42,6 +42,7 @@ #include #include #include +#include #include @@ -1478,7 +1479,9 @@ u_int nreqs; sc = arg; - curthread->td_base_pri = PRIBIO; + mtx_lock_spin(&sched_lock); + sched_prio(curthread, PRIBIO); + mtx_unlock_spin(&sched_lock); nreqs = 0; for (;;) { ==== //depot/projects/smpng/sys/geom/raid3/g_raid3.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/raid3/g_raid3.c,v 1.33 2004/12/28 21:52:45 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/raid3/g_raid3.c,v 1.34 2004/12/30 20:29:58 jhb Exp $"); #include #include @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -1729,7 +1730,9 @@ u_int nreqs; sc = arg; - curthread->td_base_pri = PRIBIO; + mtx_lock_spin(&sched_lock); + sched_prio(curthread, PRIBIO); + mtx_unlock_spin(&sched_lock); nreqs = 0; for (;;) { ==== //depot/projects/smpng/sys/kern/kern_intr.c#64 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.120 2004/11/17 14:39:41 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.121 2004/12/30 20:29:58 jhb Exp $"); #include "opt_ddb.h" @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -143,14 +144,12 @@ ih = TAILQ_FIRST(&ithd->it_handlers); if (ih == NULL) { mtx_lock_spin(&sched_lock); - td->td_priority = PRI_MAX_ITHD; - td->td_base_pri = PRI_MAX_ITHD; + sched_prio(td, PRI_MAX_ITHD); mtx_unlock_spin(&sched_lock); return; } mtx_lock_spin(&sched_lock); - td->td_priority = ih->ih_pri; - td->td_base_pri = ih->ih_pri; + sched_prio(td, ih->ih_pri); mtx_unlock_spin(&sched_lock); missed = 0; TAILQ_FOREACH(ih, &ithd->it_handlers, ih_next) { ==== //depot/projects/smpng/sys/kern/kern_resource.c#53 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_resource.c,v 1.146 2004/10/05 18:51:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_resource.c,v 1.147 2004/12/30 20:29:58 jhb Exp $"); #include "opt_compat.h" @@ -423,7 +423,6 @@ } sched_class(kg, rtp->type); if (curthread->td_ksegrp == kg) { - curthread->td_base_pri = kg->kg_user_pri; sched_prio(curthread, kg->kg_user_pri); /* XXX dubious */ } return (0); ==== //depot/projects/smpng/sys/kern/kern_synch.c#88 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.266 2004/12/26 00:14:21 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.267 2004/12/30 20:29:58 jhb Exp $"); #include "opt_ktrace.h" @@ -212,8 +212,6 @@ /* * Adjust this thread's priority. - * - * XXX: do we need to save priority in td_base_pri? */ mtx_lock_spin(&sched_lock); sched_prio(td, priority & PRIMASK); ==== //depot/projects/smpng/sys/kern/sched_4bsd.c#45 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.70 2004/12/26 00:16:24 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.71 2004/12/30 20:52:44 jhb Exp $"); #define kse td_sched @@ -50,6 +50,7 @@ #include #include #include +#include #include /* @@ -159,10 +160,12 @@ static void roundrobin(void *arg); static void schedcpu(void); static void schedcpu_thread(void); +static void sched_priority(struct thread *td, u_char prio); static void sched_setup(void *dummy); static void maybe_resched(struct thread *td); static void updatepri(struct ksegrp *kg); static void resetpriority(struct ksegrp *kg); +static void resetpriority_thread(struct thread *td, struct ksegrp *kg); #ifdef SMP static int forward_wakeup(int cpunum); #endif @@ -516,9 +519,7 @@ kg->kg_estcpu = decay_cpu(loadfac, kg->kg_estcpu); resetpriority(kg); FOREACH_THREAD_IN_GROUP(kg, td) { - if (td->td_priority >= PUSER) { - sched_prio(td, kg->kg_user_pri); - } + resetpriority_thread(td, kg); } } /* end of ksegrp loop */ mtx_unlock_spin(&sched_lock); @@ -561,7 +562,6 @@ newcpu = decay_cpu(loadfac, newcpu); kg->kg_estcpu = newcpu; } - resetpriority(kg); } /* @@ -573,7 +573,6 @@ resetpriority(struct ksegrp *kg) { register unsigned int newpriority; - struct thread *td; if (kg->kg_pri_class == PRI_TIMESHARE) { newpriority = PUSER + kg->kg_estcpu / INVERSE_ESTCPU_WEIGHT + @@ -582,9 +581,25 @@ PRI_MAX_TIMESHARE); kg->kg_user_pri = newpriority; } - FOREACH_THREAD_IN_GROUP(kg, td) { - maybe_resched(td); /* XXXKSE silly */ - } +} + +/* + * Update the thread's priority when the associated ksegroup's user + * priority changes. + */ +static void +resetpriority_thread(struct thread *td, struct ksegrp *kg) +{ + + /* Only change threads with a time sharing user priority. */ + if (td->td_priority < PRI_MIN_TIMESHARE || + td->td_priority > PRI_MAX_TIMESHARE) + return; + + /* XXX the whole needresched thing is broken, but not silly. */ + maybe_resched(td); + + sched_prio(td, kg->kg_user_pri); } /* ARGSUSED */ @@ -674,8 +689,7 @@ kg->kg_estcpu = ESTCPULIM(kg->kg_estcpu + 1); if ((kg->kg_estcpu % INVERSE_ESTCPU_WEIGHT) == 0) { resetpriority(kg); - if (td->td_priority >= PUSER) - td->td_priority = kg->kg_user_pri; + resetpriority_thread(td, kg); } } @@ -735,12 +749,16 @@ sched_nice(struct proc *p, int nice) { struct ksegrp *kg; + struct thread *td; PROC_LOCK_ASSERT(p, MA_OWNED); mtx_assert(&sched_lock, MA_OWNED); p->p_nice = nice; FOREACH_KSEGRP_IN_PROC(p, kg) { resetpriority(kg); + FOREACH_THREAD_IN_GROUP(kg, td) { + resetpriority_thread(td, kg); + } } } @@ -757,14 +775,16 @@ * changing the assignment of a kse to the thread, * and moving a KSE in the system run queue. */ -void -sched_prio(struct thread *td, u_char prio) +static void +sched_priority(struct thread *td, u_char prio) { CTR6(KTR_SCHED, "sched_prio: %p(%s) prio %d newprio %d by %p(%s)", td, td->td_proc->p_comm, td->td_priority, prio, curthread, curthread->td_proc->p_comm); mtx_assert(&sched_lock, MA_OWNED); + if (td->td_priority == prio) + return; if (TD_ON_RUNQ(td)) { adjustrunqueue(td, prio); } else { @@ -772,13 +792,76 @@ } } +/* + * Update a thread's priority when it is lent another thread's + * priority. + */ +void +sched_lend_prio(struct thread *td, u_char prio) +{ + + td->td_flags |= TDF_BORROWING; + sched_priority(td, prio); +} + +/* + * Restore a thread's priority when priority propagation is + * over. The prio argument is the minimum priority the thread + * needs to have to satisfy other possible priority lending + * requests. If the thread's regulary priority is less + * important than prio the thread will keep a priority boost + * of prio. + */ +void +sched_unlend_prio(struct thread *td, u_char prio) +{ + u_char base_pri; + + if (td->td_base_pri >= PRI_MIN_TIMESHARE && + td->td_base_pri <= PRI_MAX_TIMESHARE) + base_pri = td->td_ksegrp->kg_user_pri; + else + base_pri = td->td_base_pri; + if (prio >= base_pri) { + td->td_flags &= ~TDF_BORROWING; + sched_prio(td, base_pri); + } else + sched_lend_prio(td, prio); +} + void +sched_prio(struct thread *td, u_char prio) +{ + u_char oldprio; + + /* First, update the base priority. */ + td->td_base_pri = prio; + + /* + * If the thread is borrowing another thread's priority, don't ever + * lower the priority. + */ + if (td->td_flags & TDF_BORROWING && td->td_priority < prio) + return; + + /* Change the real priority. */ + oldprio = td->td_priority; + sched_priority(td, prio); + + /* + * If the thread is on a turnstile, then let the turnstile update + * its state. + */ + if (TD_ON_LOCK(td) && oldprio != prio) + turnstile_adjust(td, oldprio); +} + +void sched_sleep(struct thread *td) { mtx_assert(&sched_lock, MA_OWNED); td->td_ksegrp->kg_slptime = 0; - td->td_base_pri = td->td_priority; } static void remrunqueue(struct thread *td); @@ -889,8 +972,10 @@ mtx_assert(&sched_lock, MA_OWNED); kg = td->td_ksegrp; - if (kg->kg_slptime > 1) + if (kg->kg_slptime > 1) { updatepri(kg); + resetpriority(kg); + } kg->kg_slptime = 0; setrunqueue(td, SRQ_BORING); } @@ -1157,10 +1242,13 @@ * it here and returning to user mode, so don't waste time setting * it perfectly here. */ + KASSERT((td->td_flags & TDF_BORROWING) == 0, + ("thread with borrowed priority returning to userland")); kg = td->td_ksegrp; if (td->td_priority != kg->kg_user_pri) { mtx_lock_spin(&sched_lock); td->td_priority = kg->kg_user_pri; + td->td_base_pri = kg->kg_user_pri; mtx_unlock_spin(&sched_lock); } } ==== //depot/projects/smpng/sys/kern/sched_ule.c#49 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.143 2004/12/26 23:21:48 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.144 2004/12/30 20:52:44 jhb Exp $"); #include @@ -46,6 +46,7 @@ #include #include #include +#include #include #ifdef KTRACE #include @@ -133,8 +134,7 @@ #define KEF_XFERABLE 0x0004 /* Thread was added as transferable. */ #define KEF_HOLD 0x0008 /* Thread is temporarily bound. */ #define KEF_REMOVED 0x0010 /* Thread was removed while ASSIGNED */ -#define KEF_PRIOELEV 0x0020 /* Thread has had its prio elevated. */ -#define KEF_INTERNAL 0x0040 +#define KEF_INTERNAL 0x0020 struct kg_sched { struct thread *skg_last_assigned; /* (j) Last thread assigned to */ @@ -234,7 +234,7 @@ #define SCHED_INTERACTIVE(kg) \ (sched_interact_score(kg) < SCHED_INTERACT_THRESH) #define SCHED_CURR(kg, ke) \ - ((ke->ke_flags & KEF_PRIOELEV) || SCHED_INTERACTIVE(kg)) + ((ke->ke_thread->td_flags & TDF_BORROWING) || SCHED_INTERACTIVE(kg)) /* * Cpu percentage computation macros and defines. @@ -315,6 +315,7 @@ static struct kse *sched_choose(void); /* XXX Should be thread * */ static void sched_slice(struct kse *ke); static void sched_priority(struct ksegrp *kg); +static void sched_thread_priority(struct thread *td, u_char prio); static int sched_interact_score(struct ksegrp *kg); static void sched_interact_update(struct ksegrp *kg); static void sched_interact_fork(struct ksegrp *kg); @@ -1066,7 +1067,7 @@ kg = ke->ke_ksegrp; kseq = KSEQ_CPU(ke->ke_cpu); - if (ke->ke_flags & KEF_PRIOELEV) { + if (ke->ke_thread->td_flags & TDF_BORROWING) { ke->ke_slice = SCHED_SLICE_MIN; return; } @@ -1230,7 +1231,7 @@ } void -sched_prio(struct thread *td, u_char prio) +sched_thread_priority(struct thread *td, u_char prio) { struct kse *ke; @@ -1239,6 +1240,8 @@ curthread->td_proc->p_comm); ke = td->td_kse; mtx_assert(&sched_lock, MA_OWNED); + if (td->td_priority == prio) + return; if (TD_ON_RUNQ(td)) { /* * If the priority has been elevated due to priority @@ -1253,8 +1256,6 @@ ke->ke_runq = KSEQ_CPU(ke->ke_cpu)->ksq_curr; runq_add(ke->ke_runq, ke, 0); } - if (prio < td->td_priority) - ke->ke_flags |= KEF_PRIOELEV; /* * Hold this kse on this cpu so that sched_prio() doesn't * cause excessive migration. We only want migration to @@ -1267,7 +1268,71 @@ td->td_priority = prio; } +/* + * Update a thread's priority when it is lent another thread's + * priority. + */ +void +sched_lend_prio(struct thread *td, u_char prio) +{ + + td->td_flags |= TDF_BORROWING; + sched_thread_priority(td, prio); +} + +/* + * Restore a thread's priority when priority propagation is + * over. The prio argument is the minimum priority the thread + * needs to have to satisfy other possible priority lending + * requests. If the thread's regular priority is less + * important than prio, the thread will keep a priority boost + * of prio. + */ void +sched_unlend_prio(struct thread *td, u_char prio) +{ + u_char base_pri; + + if (td->td_base_pri >= PRI_MIN_TIMESHARE && + td->td_base_pri <= PRI_MAX_TIMESHARE) + base_pri = td->td_ksegrp->kg_user_pri; + else + base_pri = td->td_base_pri; + if (prio >= base_pri) { + td->td_flags &= ~ TDF_BORROWING; + sched_thread_priority(td, base_pri); + } else + sched_lend_prio(td, prio); +} + +void +sched_prio(struct thread *td, u_char prio) +{ + u_char oldprio; + + /* First, update the base priority. */ + td->td_base_pri = prio; + + /* + * If the therad is borrowing another thread's priority, don't + * ever lower the priority. + */ + if (td->td_flags & TDF_BORROWING && td->td_priority < prio) + return; + + /* Change the real priority. */ + oldprio = td->td_priority; + sched_thread_priority(td, prio); + + /* + * If the thread is on a turnstile, then let the turnstile update + * its state. + */ + if (TD_ON_LOCK(td) && oldprio != prio) + turnstile_adjust(td, oldprio); +} + +void sched_switch(struct thread *td, struct thread *newtd, int flags) { struct kseq *ksq; @@ -1374,7 +1439,6 @@ mtx_assert(&sched_lock, MA_OWNED); td->td_slptime = ticks; - td->td_base_pri = td->td_priority; } void @@ -1644,21 +1708,14 @@ sched_userret(struct thread *td) { struct ksegrp *kg; - struct kse *ke; - kg = td->td_ksegrp; - ke = td->td_kse; - - if (td->td_priority != kg->kg_user_pri || - ke->ke_flags & KEF_PRIOELEV) { + KASSERT((td->td_flags & TDF_BORROWING) == 0, + ("thread with borrowed priority returning to userland")); + kg = td->td_ksegrp; + if (td->td_priority != kg->kg_user_pri) { mtx_lock_spin(&sched_lock); td->td_priority = kg->kg_user_pri; - if (ke->ke_flags & KEF_PRIOELEV) { - ke->ke_flags &= ~KEF_PRIOELEV; - sched_slice(ke); - if (ke->ke_slice == 0) - mi_switch(SW_INVOL, NULL); - } + td->td_base_pri = kg->kg_user_pri; mtx_unlock_spin(&sched_lock); } } ==== //depot/projects/smpng/sys/kern/subr_trap.c#75 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_trap.c,v 1.277 2004/12/26 07:30:35 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_trap.c,v 1.278 2004/12/30 20:30:58 jhb Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -128,6 +128,7 @@ ticks = td->td_sticks - oticks; addupc_task(td, TRAPF_PC(frame), (u_int)ticks * psratio); } + /* * Let the scheduler adjust our priority etc. */ ==== //depot/projects/smpng/sys/kern/subr_turnstile.c#18 (text+ko) ==== @@ -59,7 +59,7 @@ #include "opt_turnstile_profiling.h" #include -__FBSDID("$FreeBSD: src/sys/kern/subr_turnstile.c,v 1.150 2004/10/12 18:36:20 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_turnstile.c,v 1.151 2004/12/30 20:52:44 jhb Exp $"); #include #include @@ -145,7 +145,9 @@ #ifdef TURNSTILE_PROFILING static void init_turnstile_profiling(void *arg); #endif -static void propagate_priority(struct thread *); +static void propagate_priority(struct thread *td); +static int turnstile_adjust_thread(struct turnstile *ts, + struct thread *td); static void turnstile_setowner(struct turnstile *ts, struct thread *owner); /* @@ -158,7 +160,6 @@ { struct turnstile_chain *tc; struct turnstile *ts; - struct thread *td1; int pri; mtx_assert(&sched_lock, MA_OWNED); @@ -187,8 +188,8 @@ * isn't SRUN or SLOCK. */ KASSERT(!TD_IS_SLEEPING(td), - ("sleeping thread (pid %d) owns a non-sleepable lock", - td->td_proc->p_pid)); + ("sleeping thread (tid %d) owns a non-sleepable lock", + td->td_tid)); /* * If this thread already has higher priority than the @@ -198,10 +199,16 @@ return; /* - * If lock holder is actually running, just bump priority. + * Bump this thread's priority. + */ + sched_lend_prio(td, pri); + + /* + * If lock holder is actually running or on the run queue + * then we are done. */ - if (TD_IS_RUNNING(td)) { - td->td_priority = pri; + if (TD_IS_RUNNING(td) || TD_ON_RUNQ(td)) { + MPASS(td->td_blocked == NULL); return; } @@ -214,27 +221,11 @@ #endif /* - * If on run queue move to new run queue, and quit. - * XXXKSE this gets a lot more complicated under threads - * but try anyhow. - */ - if (TD_ON_RUNQ(td)) { - MPASS(td->td_blocked == NULL); - sched_prio(td, pri); - return; - } - - /* - * Bump this thread's priority. - */ - td->td_priority = pri; - - /* * If we aren't blocked on a lock, we should be. */ KASSERT(TD_ON_LOCK(td), ( - "process %d(%s):%d holds %s but isn't blocked on a lock\n", - td->td_proc->p_pid, td->td_proc->p_comm, td->td_state, + "thread %d(%s):%d holds %s but isn't blocked on a lock\n", + td->td_tid, td->td_proc->p_comm, td->td_state, ts->ts_lockobj->lo_name)); /* @@ -245,61 +236,81 @@ tc = TC_LOOKUP(ts->ts_lockobj); mtx_lock_spin(&tc->tc_lock); - /* - * This thread may not be blocked on this turnstile anymore - * but instead might already be woken up on another CPU - * that is waiting on sched_lock in turnstile_unpend() to - * finish waking this thread up. We can detect this case - * by checking to see if this thread has been given a - * turnstile by either turnstile_signal() or - * turnstile_broadcast(). In this case, treat the thread as - * if it was already running. - */ - if (td->td_turnstile != NULL) { + /* Resort td on the list if needed. */ + if (!turnstile_adjust_thread(ts, td)) { mtx_unlock_spin(&tc->tc_lock); return; } + mtx_unlock_spin(&tc->tc_lock); + } +} + +/* + * Adjust the thread's position on a turnstile after its priority has been + * changed. + */ +static int +turnstile_adjust_thread(struct turnstile *ts, struct thread *td) +{ + struct turnstile_chain *tc; + struct thread *td1, *td2; + + mtx_assert(&sched_lock, MA_OWNED); + MPASS(TD_ON_LOCK(td)); - /* - * Check if the thread needs to be moved up on - * the blocked chain. It doesn't need to be moved - * if it is already at the head of the list or if - * the item in front of it still has a higher priority. - */ - if (td == TAILQ_FIRST(&ts->ts_blocked)) { - mtx_unlock_spin(&tc->tc_lock); - continue; - } + /* + * This thread may not be blocked on this turnstile anymore + * but instead might already be woken up on another CPU + * that is waiting on sched_lock in turnstile_unpend() to + * finish waking this thread up. We can detect this case + * by checking to see if this thread has been given a + * turnstile by either turnstile_signal() or + * turnstile_broadcast(). In this case, treat the thread as + * if it was already running. + */ + if (td->td_turnstile != NULL) + return (0); - td1 = TAILQ_PREV(td, threadqueue, td_lockq); - if (td1->td_priority <= pri) { - mtx_unlock_spin(&tc->tc_lock); - continue; - } + /* + * Check if the thread needs to be moved on the blocked chain. + * It needs to be moved if either its priority is lower than + * the previous thread or higher than the next thread. + */ + tc = TC_LOOKUP(ts->ts_lockobj); + mtx_assert(&tc->tc_lock, MA_OWNED); + td1 = TAILQ_PREV(td, threadqueue, td_lockq); + td2 = TAILQ_NEXT(td, td_lockq); + if ((td1 != NULL && td->td_priority < td1->td_priority) || + (td2 != NULL && td->td_priority > td2->td_priority)) { /* * Remove thread from blocked chain and determine where - * it should be moved up to. Since we know that td1 has - * a lower priority than td, we know that at least one - * thread in the chain has a lower priority and that - * td1 will thus not be NULL after the loop. + * it should be moved to. */ mtx_lock_spin(&td_contested_lock); TAILQ_REMOVE(&ts->ts_blocked, td, td_lockq); TAILQ_FOREACH(td1, &ts->ts_blocked, td_lockq) { MPASS(td1->td_proc->p_magic == P_MAGIC); - if (td1->td_priority > pri) + if (td1->td_priority > td->td_priority) break; } - MPASS(td1 != NULL); - TAILQ_INSERT_BEFORE(td1, td, td_lockq); + if (td1 == NULL) + TAILQ_INSERT_TAIL(&ts->ts_blocked, td, td_lockq); + else + TAILQ_INSERT_BEFORE(td1, td, td_lockq); mtx_unlock_spin(&td_contested_lock); - CTR4(KTR_LOCK, - "propagate_priority: td %p moved before %p on [%p] %s", - td, td1, ts->ts_lockobj, ts->ts_lockobj->lo_name); - mtx_unlock_spin(&tc->tc_lock); + if (td1 == NULL) + CTR3(KTR_LOCK, + "turnstile_adjust_thread: td %d put at tail on [%p] %s", + td->td_tid, ts->ts_lockobj, ts->ts_lockobj->lo_name); + else + CTR4(KTR_LOCK, + "turnstile_adjust_thread: td %d moved before %d on [%p] %s", + td->td_tid, td1->td_tid, ts->ts_lockobj, + ts->ts_lockobj->lo_name); } + return (1); } /* @@ -355,6 +366,46 @@ SYSINIT(turnstile0, SI_SUB_LOCK, SI_ORDER_ANY, init_turnstile0, NULL); /* + * Update a thread on the turnstile list after it's priority has been changed. + * The old priority is passed in as an argument. + */ +void +turnstile_adjust(struct thread *td, u_char oldpri) +{ + struct turnstile_chain *tc; + struct turnstile *ts; + + mtx_assert(&sched_lock, MA_OWNED); + MPASS(TD_ON_LOCK(td)); + + /* + * Pick up the lock that td is blocked on. + */ + ts = td->td_blocked; + MPASS(ts != NULL); + tc = TC_LOOKUP(ts->ts_lockobj); + mtx_lock_spin(&tc->tc_lock); + + /* Resort the turnstile on the list. */ + if (!turnstile_adjust_thread(ts, td)) { + mtx_unlock_spin(&tc->tc_lock); + return; + } + + /* + * If our priority was lowered and we are at the head of the + * turnstile, then propagate our new priority up the chain. + * Note that we currently don't try to revoke lent priorities + * when our priority goes up. + */ + if (td == TAILQ_FIRST(&ts->ts_blocked) && td->td_priority < oldpri) { + mtx_unlock_spin(&tc->tc_lock); + propagate_priority(td); + } else + mtx_unlock_spin(&tc->tc_lock); +} + +/* * Set the owner of the lock this turnstile is attached to. */ static void @@ -470,7 +521,7 @@ */ mtx_lock_spin(&sched_lock); if (td->td_priority < owner->td_priority) - owner->td_priority = td->td_priority; + sched_lend_prio(owner, td->td_priority); mtx_unlock_spin(&sched_lock); } @@ -578,14 +629,14 @@ propagate_priority(td); if (LOCK_LOG_TEST(lock, 0)) - CTR4(KTR_LOCK, "%s: td %p blocked on [%p] %s", __func__, td, - lock, lock->lo_name); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Dec 31 12:53:28 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9AC9E16A4D0; Fri, 31 Dec 2004 12:53:28 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5538216A4CE for ; Fri, 31 Dec 2004 12:53:28 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D43443D49 for ; Fri, 31 Dec 2004 12:53:28 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVCrRGh004663 for ; Fri, 31 Dec 2004 12:53:27 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVCrR8h004660 for perforce@freebsd.org; Fri, 31 Dec 2004 12:53:27 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 12:53:27 GMT Message-Id: <200412311253.iBVCrR8h004660@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67960 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 12:53:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=67960 Change 67960 by davidxu@davidxu_tiger on 2004/12/31 12:53:10 Merge files. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_accept.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_aio_suspend.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr.c#1 add .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_destroy.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_get_np.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getdetachstate.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getguardsize.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getinheritsched.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getschedparam.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getschedpolicy.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getscope.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getstack.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getstackaddr.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_getstacksize.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_init.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setcreatesuspend_np.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setdetachstate.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setguardsize.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setinheritsched.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setschedparam.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setschedpolicy.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setscope.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setstack.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setstackaddr.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr_setstacksize.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_close.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_condattr.c#1 add .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_condattr_destroy.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_condattr_init.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_connect.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_creat.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_execve.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_fcntl.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_fsync.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mattr_init.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutexattr.c#1 add .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutexattr_destroy.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_nanosleep.c#4 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_pause.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_poll.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_pselect.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_raise.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_read.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_readv.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_select.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigaction.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigaltstack.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigpending.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigprocmask.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigsuspend.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigwait.c#3 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sleep.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_syscalls.c#1 add .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_system.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_tcdrain.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_vfork.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_wait.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_waitpid.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_write.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_writev.c#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Dec 31 12:55:32 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 084FF16A4D0; Fri, 31 Dec 2004 12:55:32 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A613F16A4CE for ; Fri, 31 Dec 2004 12:55:31 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E15443D3F for ; Fri, 31 Dec 2004 12:55:31 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVCtVeR004757 for ; Fri, 31 Dec 2004 12:55:31 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVCtVRu004754 for perforce@freebsd.org; Fri, 31 Dec 2004 12:55:31 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 12:55:31 GMT Message-Id: <200412311255.iBVCtVRu004754@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67962 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 12:55:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=67962 Change 67962 by davidxu@davidxu_tiger on 2004/12/31 12:55:00 already in another files. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mattr_kind_np.c#2 delete .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_msync.c#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:44:47 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D6C516A4D0; Fri, 31 Dec 2004 14:44:47 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F30616A4CE for ; Fri, 31 Dec 2004 14:44:47 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2FD643D41 for ; Fri, 31 Dec 2004 14:44:46 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEiko2008759 for ; Fri, 31 Dec 2004 14:44:46 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEikWa008756 for perforce@freebsd.org; Fri, 31 Dec 2004 14:44:46 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:44:46 GMT Message-Id: <200412311444.iBVEikWa008756@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67971 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:44:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=67971 Change 67971 by davidxu@davidxu_tiger on 2004/12/31 14:43:55 slight cleanup, remove no longer used fields. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_private.h#9 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_private.h#9 (text+ko) ==== @@ -41,21 +41,22 @@ * Include files. */ #include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include #include #include +#include #include #include -#include "lock.h" #include "pthread_md.h" /* @@ -69,10 +70,13 @@ #define SCLASS_PRESET(x...) #endif +/* Signal to do cancellation */ +#define SIGCANCEL 32 + /* * Kernel fatal error handler macro. */ -#define PANIC(string) _thr_exit(__FILE__,__LINE__,string) +#define PANIC(string) _thr_exit(__FILE__,__LINE__,string) /* Output debug messages like this: */ #define stdout_debug(args...) _thread_printf(STDOUT_FILENO, ##args) @@ -80,23 +84,13 @@ #ifdef _PTHREADS_INVARIANTS #define THR_ASSERT(cond, msg) do { \ - if (!(cond)) \ + if (__predict_false(!(cond))) \ PANIC(msg); \ } while (0) #else #define THR_ASSERT(cond, msg) #endif -/* - * State change macro without scheduling queue change: - */ -#define THR_SET_STATE(thrd, newstate) do { \ - (thrd)->state = newstate; \ - (thrd)->fname = __FILE__; \ - (thrd)->lineno = __LINE__; \ -} while (0) - - #define TIMESPEC_ADD(dst, src, val) \ do { \ (dst)->tv_sec = (src)->tv_sec + (val)->tv_sec; \ @@ -180,8 +174,10 @@ * Lock for accesses to this structure. */ struct umtx c_lock; + volatile long c_seqno; + volatile long c_waiters; + volatile long c_wakeups; long c_flags; - int c_count; }; struct pthread_cond_attr { @@ -194,7 +190,7 @@ pthread_cond_t b_cond; int b_count; int b_waiters; - int b_generation; + int b_cycle; }; struct pthread_barrierattr { @@ -202,7 +198,7 @@ }; struct pthread_spinlock { - struct umtx s_lock; + struct umtx s_lock; }; /* @@ -219,8 +215,24 @@ struct pthread_cleanup *next; void (*routine)(); void *routine_arg; + int onstack; }; +#define THR_CLEANUP_PUSH(td, func, arg) { \ + struct pthread_cleanup __cup; \ + \ + __cup.routine = func; \ + __cup.routine_arg = arg; \ + __cup.onstack = 1; \ + __cup.next = (td)->cleanup; \ + (td)->cleanup = &__cup; + +#define THR_CLEANUP_POP(td, exec) \ + (td)->cleanup = __cup.next; \ + if ((exec) != 0) \ + __cup.routine(__cup.routine_arg); \ +} + struct pthread_atfork { TAILQ_ENTRY(pthread_atfork) qe; void (*prepare)(void); @@ -235,7 +247,6 @@ int prio; int suspend; #define THR_STACK_USER 0x100 /* 0xFF reserved for */ -#define THR_SIGNAL_THREAD 0x200 /* This is a signal thread */ int flags; void *arg_attr; void (*cleanup_attr)(); @@ -260,7 +271,7 @@ * than the stacks of other threads, since many applications are likely to run * almost entirely on this stack. */ -#define THR_STACK_INITIAL 0x100000 +#define THR_STACK_INITIAL 0x200000 /* * Define the different priority ranges. All applications have thread @@ -308,41 +319,18 @@ */ enum pthread_state { PS_RUNNING, - PS_MUTEX_WAIT, - PS_JOIN, - PS_SUSPENDED, - PS_DEAD, - PS_DEADLOCK, - PS_STATE_MAX + PS_DEAD }; union pthread_wait_data { pthread_mutex_t mutex; - pthread_cond_t cond; }; /* * Define a continuation routine that can be used to perform a * transfer of control: */ -typedef void (*thread_continuation_t)(void *); - -/* - * This stores a thread's state prior to running a signal handler. - * It is used when a signal is delivered to a thread blocked in - * userland. If the signal handler returns normally, the thread's - * state is restored from here. - */ -struct pthread_sigframe { - int psf_flags; - int psf_cancelflags; - int psf_interrupted; - int psf_timeout; - enum pthread_state psf_state; - union pthread_wait_data psf_wait_data; - struct timespec psf_wakeup_time; - thread_continuation_t psf_continuation; -}; +typedef void (*thread_continuation_t) (void *); struct join_status { struct pthread *thread; @@ -386,18 +374,18 @@ /* Kernel thread id. */ long tid; + /* Internal condition variable cycle number. */ + long cycle; + /* How many low level locks the thread held. */ int locklevel; - /* How many signals were received. */ - int sigseqno; + /* + * Set to non-zero when this thread has entered a critical + * region. We allow for recursive entries into critical regions. + */ + int critical_count; - /* Thread lock held and switching state. */ - int lock_switch; - - /* Thread is waiting. */ - int idle; - /* Queue entry for list of all threads. */ TAILQ_ENTRY(pthread) tle; /* link for all threads in process */ @@ -418,21 +406,18 @@ void *arg; struct pthread_attr attr; - /* backout routine must be invoke before handling signal. */ - thread_continuation_t sigbackout; - /* - * Cancelability flags - the lower 2 bits are used by cancel - * definitions in pthread.h + * Cancelability flags */ -#define THR_AT_CANCEL_POINT 0x0004 +#define THR_CANCEL_DISABLE 0x0001 +#define THR_CANCEL_EXITING 0x0002 +#define THR_CANCEL_AT_POINT 0x0004 #define THR_CANCELLING 0x0008 #define THR_CANCEL_NEEDED 0x0010 +#define THR_CANCEL_ASYNCHRONOUS 0x0020 int cancelflags; - thread_continuation_t continuation; - - /* Thread's temporary signal masks. */ + /* Thread temporary signal mask. */ sigset_t sigmask; /* Used for tracking delivery of signal handlers. */ @@ -440,19 +425,13 @@ siginfo_t siginfo[_SIG_MAXSIG]; volatile int check_pending; + /* backout routine must be invoke before handling signal. */ + thread_continuation_t sigbackout; + /* Thread state: */ enum pthread_state state; /* - * Time to wake up thread. This is used for sleeping threads and - * for any operation which may time out (such as select). - */ - struct timespec wakeup_time; - - /* TRUE if operation has timed out. */ - int timeout; - - /* * Error variable used instead of errno. The function __error() * returns a pointer to this. */ @@ -466,54 +445,29 @@ struct join_status join_status; /* - * The current thread can belong to: - * - * o A queue of threads waiting for a mutex - * o A queue of threads waiting for a condition variable - * - * It is possible for a thread to belong to more than one of the - * above queues if it is handling a signal. A thread may only - * enter a mutex or condition variable queue when it is not - * being called from a signal handler. If a thread is a member - * of one of these queues when a signal handler is invoked, it - * must be removed from the queue before invoking the handler - * and then added back to the queue after return from the handler. - * - * Use pqe for the scheduling queue link (both ready and waiting), - * sqe for synchronization (mutex, condition variable, and join) - * queue links, and qe for all other links. + * The current thread can belong to a priority mutex queue. + * This is the synchronization queue link. */ - TAILQ_ENTRY(pthread) sqe; /* synchronization queue link */ + TAILQ_ENTRY(pthread) sqe; /* Wait data. */ union pthread_wait_data data; - /* - * Set to TRUE if a blocking operation was - * interrupted by a signal: - */ - int interrupted; - - /* - * Set to non-zero when this thread has entered a critical - * region. We allow for recursive entries into critical regions. - */ - int critical_count; - int sflags; #define THR_FLAGS_IN_SYNCQ 0x0001 /* Miscellaneous flags; only set with scheduling lock held. */ int flags; #define THR_FLAGS_PRIVATE 0x0001 -#define THR_FLAGS_EXITING 0x0008 /* thread is exiting */ -#define THR_FLAGS_SUSPENDED 0x0010 /* thread is suspended */ +#define THR_FLAGS_NEED_SUSPEND 0x0002 /* thread should be suspended */ +#define THR_FLAGS_SUSPENDED 0x0004 /* thread is suspended */ /* Thread list flags; only set with thread list lock held. */ + int tlflags; #define TLFLAGS_GC_SAFE 0x0001 /* thread safe for cleaning */ #define TLFLAGS_IN_TDLIST 0x0002 /* thread in all thread list */ #define TLFLAGS_IN_GCLIST 0x0004 /* thread in gc list */ - int tlflags; +#define TLFLAGS_DETACHED 0x0008 /* thread is detached */ /* * Base priority is the user setable and retrievable priority @@ -565,14 +519,14 @@ /* Cleanup handlers Link List */ struct pthread_cleanup *cleanup; +}; - /* Ptr to source file name*/ - char *fname; +#define UMTX_LOCK(m, tid) \ + do { \ + while (umtx_lock(m, tid)) \ + ; \ + } while (0) - /* Source line number. */ - int lineno; -}; - /* * Critical regions can also be detected by looking at the threads * current lock level. Ensure these macros increment and decrement @@ -581,9 +535,9 @@ */ #define THR_IN_CRITICAL(thrd) \ (((thrd)->locklevel > 0) || \ - ((thrd)->critical_count > 0)) + ((thrd)->critical_count > 0)) -#define THR_YIELD_CHECK(thrd) \ +#define THR_CRITICAL_CHECK(thrd) \ do { \ if (!THR_IN_CRITICAL(thrd)) { \ if ((thrd)->check_pending != 0) \ @@ -594,26 +548,28 @@ #define THR_LOCK_ACQUIRE(thrd, lck) \ do { \ (thrd)->locklevel++; \ - UMTX_ACQUIRE((lck), (thrd)->tid); \ + UMTX_LOCK((lck), (thrd)->tid); \ } while (0) #define THR_LOCK_RELEASE(thrd, lck) \ do { \ if ((thrd)->locklevel > 0) { \ - UMTX_RELEASE((lck), (thrd)->tid); \ + umtx_unlock((lck), (thrd)->tid); \ (thrd)->locklevel--; \ - if ((thrd)->locklevel == 0) \ - THR_YIELD_CHECK(thrd); \ + THR_CRITICAL_CHECK(thrd); \ } else { \ - PANIC("locklevel <= 0"); \ + _thr_assert_lock_level(); \ } \ } while (0) -#define THR_LOCK(thr) THR_LOCK_ACQUIRE(thr, &(thr)->lock) -#define THR_UNLOCK(thr) THR_LOCK_RELEASE(thr, &(thr)->lock) +#define THR_LOCK(curthrd) THR_LOCK_ACQUIRE(curthrd, &(curthrd)->lock) +#define THR_UNLOCK(curthrd) THR_LOCK_RELEASE(curthrd, &(curthrd)->lock) #define THR_THREAD_LOCK(curthrd, thr) THR_LOCK_ACQUIRE(curthrd, &(thr)->lock) #define THR_THREAD_UNLOCK(curthrd, thr) THR_LOCK_RELEASE(curthrd, &(thr)->lock) +#define THREAD_LIST_LOCK(curthrd) THR_LOCK_ACQUIRE((curthrd), &_thread_list_lock) +#define THREAD_LIST_UNLOCK(curthrd) THR_LOCK_RELEASE((curthrd), &_thread_list_lock) + /* * Macros to insert/remove threads to the all thread list and * the gc list. @@ -649,32 +605,15 @@ #define GC_NEEDED() (atomic_load_acq_int(&_gc_count) >= 5) -/* Take the scheduling lock with the intent to call the scheduler. */ -#define THR_LOCK_SWITCH(curthr) do { \ - curthread->lock_switch++; \ - UMTX_ACQUIRE(&(curthr->lock), (curthr)->tid); \ -} while (0) -#define THR_UNLOCK_SWITCH(curthr) do { \ - UMTX_RELEASE(&(curthr->lock), (curthr)->tid); \ - curthread->lock_switch--; \ - THR_YIELD_CHECK(curthr); \ -} while (0) - #define THR_CRITICAL_ENTER(thr) (thr)->critical_count++ #define THR_CRITICAL_LEAVE(thr) do { \ (thr)->critical_count--; \ - if ((thr)->critical_count == 0) { \ - THR_YIELD_CHECK(thr); \ + THR_CRITICAL_CHECK(thr); \ } \ } while (0) #define THR_IN_SYNCQ(thrd) (((thrd)->sflags & THR_FLAGS_IN_SYNCQ) != 0) -#define THR_IS_SUSPENDED(thrd) \ - (((thrd)->state == PS_SUSPENDED) || \ - (((thrd)->flags & THR_FLAGS_SUSPENDED) != 0)) -#define THR_IS_EXITING(thrd) (((thrd)->flags & THR_FLAGS_EXITING) != 0) - extern int __isthreaded; /* @@ -741,14 +680,13 @@ * Function prototype definitions. */ __BEGIN_DECLS -int _cond_reinit(pthread_cond_t *); void _thr_kern_init(); void _thr_single_thread(struct pthread *); int _thr_setthreaded(int); int _mutex_cv_lock(pthread_mutex_t *); int _mutex_cv_unlock(pthread_mutex_t *); void _mutex_notify_priochange(struct pthread *, struct pthread *, int); -int _mutex_reinit(struct pthread_mutex *); +int _mutex_reinit(pthread_mutex_t *); void _mutex_unlock_private(struct pthread *); void _libpthread_init(struct pthread *); void *_pthread_getspecific(pthread_key_t); @@ -771,34 +709,25 @@ void _pthread_cleanup_push(void (*routine) (void *), void *routine_arg); void _pthread_cleanup_pop(int execute); struct pthread *_thr_alloc(struct pthread *); -void _thr_exit(char *, int, char *); +void _thr_exit(char *, int, char *) __dead2; void _thr_exit_cleanup(void); -void _thr_mutex_reinit(pthread_mutex_t *); int _thr_ref_add(struct pthread *, struct pthread *, int); void _thr_ref_delete(struct pthread *, struct pthread *); +int _thr_find_thread(struct pthread *, struct pthread *, int); void _thr_rtld_init(void); void _thr_rtld_fini(void); -void _thr_setrunnable(struct pthread *curthread, struct pthread *thread); -long _thr_setrunnable_unlocked(struct pthread *thread); -long _thr_sig_add(struct pthread *, int, siginfo_t *); int _thr_stack_alloc(struct pthread_attr *); void _thr_stack_free(struct pthread_attr *); -void _thr_exit_cleanup(void); void _thr_free(struct pthread *, struct pthread *); void _thr_gc(struct pthread *); void _thread_cleanupspecific(void); void _thread_dump_info(void); void _thread_printf(int, const char *, ...); -void _thr_sched_switch(struct pthread *); -void _thr_sched_switch_unlocked(struct pthread *); -void _thr_set_timeout(const struct timespec *); void _thr_sig_handler(int, siginfo_t *, ucontext_t *); void _thr_sig_check_pending(struct pthread *); void _thr_sig_rundown(struct pthread *); -void _thr_sig_send(struct pthread *pthread, int sig); -void _thr_sigframe_restore(struct pthread *thread, struct pthread_sigframe *psf); void _thr_spinlock_init(void); -void _thr_cancel_enter(struct pthread *); +int _thr_cancel_enter(struct pthread *); void _thr_cancel_leave(struct pthread *, int); void _thr_critical_enter(struct pthread *); void _thr_critical_leave(struct pthread *); @@ -807,9 +736,10 @@ void _thr_hash_add(struct pthread *); void _thr_hash_remove(struct pthread *); struct pthread *_thr_hash_find(struct pthread *); -void _thr_finish_cancellation(void *arg); void _thr_link(struct pthread *curthread, struct pthread *thread); void _thr_unlink(struct pthread *curthread, struct pthread *thread); +void _thr_suspend_check(struct pthread *curthread); +void _thr_assert_lock_level() __dead2; /* * Aliases for _pthread functions. Should be called instead of From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:46:50 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6097E16A4D0; Fri, 31 Dec 2004 14:46:50 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22DB516A4CE for ; Fri, 31 Dec 2004 14:46:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC26643D4C for ; Fri, 31 Dec 2004 14:46:49 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEknnB008843 for ; Fri, 31 Dec 2004 14:46:49 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEkn9O008840 for perforce@freebsd.org; Fri, 31 Dec 2004 14:46:49 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:46:49 GMT Message-Id: <200412311446.iBVEkn9O008840@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67972 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:46:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=67972 Change 67972 by davidxu@davidxu_tiger on 2004/12/31 14:45:48 Rewrite conditional variable code, full cancellation support, this improves performance about 30%. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_cond.c#5 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_cond.c#5 (text+ko) ==== @@ -1,36 +1,31 @@ /* - * Copyright (c) 1995 John Birrell . + * Copyright (c) 2005, David Xu * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice unmodified, this list of conditions, and the following + * disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by John Birrell. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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/libpthread/thread/thr_cond.c,v 1.51 2003/12/09 02:20:56 davidxu Exp $ + * $FreeBSD$ */ + #include #include #include @@ -42,12 +37,9 @@ /* * Prototypes */ -static inline void check_continuation(struct pthread *, - struct pthread_cond *, pthread_mutex_t *); -static int init_static(struct pthread *thread, - pthread_cond_t *cond); +static int init_static(struct pthread *thread, pthread_cond_t *cond); static int cond_wait_common(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime); + const struct timespec *abstime, int cancel); static int cond_signal_common(pthread_cond_t *cond, int broadcast); /* @@ -63,7 +55,6 @@ __weak_reference(_pthread_cond_signal, pthread_cond_signal); __weak_reference(_pthread_cond_broadcast, pthread_cond_broadcast); - int _pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *cond_attr) { @@ -81,7 +72,9 @@ * Initialise the condition variable structure: */ umtx_init(&pcond->c_lock); - pcond->c_count = 0; + pcond->c_seqno = 0; + pcond->c_waiters = 0; + pcond->c_wakeups = 0; pcond->c_flags = 0; *cond = pcond; } @@ -96,7 +89,7 @@ int ret; THR_LOCK_ACQUIRE(thread, &_cond_static_lock); - if (*cond == NULL) + if (*cond == NULL) ret = pthread_cond_init(cond, NULL); else ret = 0; @@ -116,15 +109,12 @@ rval = EINVAL; else { /* Lock the condition variable structure: */ - rval = UMTX_LOCK(&(*cond)->c_lock, curthread->tid); - if (rval) - return (rval); - while ((*cond)->c_count) { - rval = umtx_wake(&(*cond)->c_count, (*cond)->c_count); - if (rval <= 0) - break; - (*cond)->c_count -= rval; + THR_LOCK_ACQUIRE(curthread, &(*cond)->c_lock); + if ((*cond)->c_waiters + (*cond)->c_wakeups != 0) { + THR_LOCK_RELEASE(curthread, &(*cond)->c_lock); + return (EBUSY); } + /* * NULL the caller's pointer now that the condition * variable has been destroyed: @@ -133,7 +123,7 @@ *cond = NULL; /* Unlock the condition variable structure: */ - umtx_unlock(&cv->c_lock, curthread->tid); + THR_LOCK_RELEASE(curthread, &cv->c_lock); /* Free the cond lock structure: */ @@ -148,56 +138,109 @@ return (rval); } +struct cond_cancel_info +{ + pthread_mutex_t *mutex; + pthread_cond_t *cond; + long seqno; +}; + +static void +cond_cancel_handler(void *arg) +{ + struct pthread *curthread = _get_curthread(); + struct cond_cancel_info *cci = (struct cond_cancel_info *)arg; + pthread_cond_t cv; + + cv = *(cci->cond); + THR_LOCK_ACQUIRE(curthread, &cv->c_lock); + if (cv->c_seqno != cci->seqno && cv->c_wakeups != 0) { + if (cv->c_waiters > 0) { + cv->c_seqno++; + umtx_wake((struct umtx *)&cv->c_seqno, 1); + } else + cv->c_wakeups--; + } else { + cv->c_waiters--; + } + THR_LOCK_RELEASE(curthread, &cv->c_lock); + + _mutex_cv_lock(cci->mutex); +} + static int cond_wait_common(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime) + const struct timespec *abstime, int cancel) { struct pthread *curthread = _get_curthread(); - int rval = 0; + struct cond_cancel_info cci; + pthread_cond_t cv; + long seq, oldseq; + int oldcancel; + int ret = 0; /* * If the condition variable is statically initialized, * perform the dynamic initialization: */ if (__predict_false(*cond == NULL && - (rval = init_static(curthread, cond)) != 0)) - return (rval); + (ret = init_static(curthread, cond)) != 0)) + return (ret); + + cv = *cond; + THR_LOCK_ACQUIRE(curthread, &cv->c_lock); + ret = _mutex_cv_unlock(mutex); + if (ret) { + THR_LOCK_RELEASE(curthread, &cv->c_lock); + return (ret); + } + oldseq = seq = cv->c_seqno; + cci.mutex = mutex; + cci.cond = cond; + cci.seqno = oldseq; - if ((rval = UMTX_LOCK(&(*cond)->c_lock, curthread->tid)) == 0) { - rval = _mutex_cv_unlock(mutex); - if (__predict_false(rval)) { - umtx_unlock(&(*cond)->c_lock, curthread->tid); - return (rval); + cv->c_waiters++; + do { + if (cancel) { + THR_CLEANUP_PUSH(curthread, cond_cancel_handler, &cci); + THR_LOCK_RELEASE(curthread, &cv->c_lock); + oldcancel = _thr_cancel_enter(curthread); + ret = umtx_timedwait((struct umtx *)&cv->c_seqno, + seq, abstime); + _thr_cancel_leave(curthread, oldcancel); + THR_CLEANUP_POP(curthread, 0); + } else { + ret = umtx_timedwait((struct umtx *)&cv->c_seqno, + seq, abstime); + } + THR_LOCK_ACQUIRE(curthread, &cv->c_lock); + seq = cv->c_seqno; + if (abstime != NULL && ret != 0) { + if (ret == EAGAIN || ret == EINTR) + ret = ETIMEDOUT; + break; } - - /* I don't think you may have INIT_MAX threads. */ - if ((*cond)->c_count != INT_MAX) - (*cond)->c_count++; - - rval = umtx_timedwait(&(*cond)->c_lock, curthread->tid, - &(*cond)->c_count, abstime); - if (rval == EINTR) - rval = 0; - else if (rval == EAGAIN) /* POSIX needs ETIMEDOUT */ - rval = ETIMEDOUT; - /* - * Note! we don't touch condition variable after resuming! - * this makes it possible that waker can destroy the condition - * variable after calling pthread_cond_broadcast(), please - * see Single UNIX Specification Version 3 of - * pthread_cond_destroy(). + * loop if we have never been told to wake up + * or we lost a race. */ - check_continuation(curthread, NULL, mutex); - _mutex_cv_lock(mutex); + } while (seq == oldseq || cv->c_wakeups == 0); + + if (seq != oldseq && cv->c_wakeups != 0) { + cv->c_wakeups--; + ret = 0; + } else { + cv->c_waiters--; } - return (rval); + THR_LOCK_RELEASE(curthread, &cv->c_lock); + _mutex_cv_lock(mutex); + return (ret); } int _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { - return cond_wait_common(cond, mutex, NULL); + return cond_wait_common(cond, mutex, NULL, 0); } __strong_reference(_pthread_cond_wait, _thr_cond_wait); @@ -205,12 +248,9 @@ int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { - struct pthread *curthread = _get_curthread(); int ret; - _thr_cancel_enter(curthread); - ret = cond_wait_common(cond, mutex, NULL); - _thr_cancel_leave(curthread, 1); + ret = cond_wait_common(cond, mutex, NULL, 1); return (ret); } @@ -218,30 +258,31 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec * abstime) { - if (abstime == NULL) + if (abstime == NULL || abstime->tv_sec < 0 || abstime->tv_nsec < 0 || + abstime->tv_nsec >= 1000000000) return (EINVAL); - return cond_wait_common(cond, mutex, abstime); + + return cond_wait_common(cond, mutex, abstime, 0); } +__strong_reference(_pthread_cond_timedwait, _thr_cond_timedwait); + int __pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime) { - struct pthread *curthread = _get_curthread(); - int ret; + if (abstime == NULL || abstime->tv_sec < 0 || abstime->tv_nsec < 0 || + abstime->tv_nsec >= 1000000000) + return (EINVAL); - if (abstime == NULL) - return (EINVAL); - _thr_cancel_enter(curthread); - ret = _pthread_cond_timedwait(cond, mutex, abstime); - _thr_cancel_leave(curthread, 1); - return (ret); + return cond_wait_common(cond, mutex, abstime, 1); } static int cond_signal_common(pthread_cond_t *cond, int broadcast) { struct pthread *curthread = _get_curthread(); + pthread_cond_t cv; int rval = 0; /* @@ -252,30 +293,23 @@ (rval = init_static(curthread, cond)) != 0)) return (rval); - /* Lock the condition variable structure */ - rval = UMTX_LOCK(&(*cond)->c_lock, curthread->tid); - if (__predict_false(rval)) - return (rval); - - while ((*cond)->c_count) { - /* umtx_wake returns number of threads resumed */ - rval = umtx_wake(&(*cond)->c_count, - broadcast ? (*cond)->c_count : 1); - if (rval > 0) { - /* some threads were resumed. */ - (*cond)->c_count -= rval; - rval = 0; - } else if (rval == 0) { - (*cond)->c_count = 0; - break; + cv = *cond; + /* Lock the condition variable structure. */ + THR_LOCK_ACQUIRE(curthread, &cv->c_lock); + if (cv->c_waiters) { + if (!broadcast) { + cv->c_wakeups++; + cv->c_waiters--; + cv->c_seqno++; + umtx_wake((struct umtx *)&cv->c_seqno, 1); } else { - rval = errno; - break; + cv->c_wakeups += cv->c_waiters; + cv->c_waiters = 0; + cv->c_seqno++; + umtx_wake((struct umtx *)&cv->c_seqno, INT_MAX); } - if (!broadcast) - break; } - umtx_unlock(&(*cond)->c_lock, curthread->tid); + THR_LOCK_RELEASE(curthread, &cv->c_lock); return (rval); } @@ -294,9 +328,3 @@ } __strong_reference(_pthread_cond_broadcast, _thr_cond_broadcast); - -static inline void -check_continuation(struct pthread *curthread, struct pthread_cond *cond, - pthread_mutex_t *mutex) -{ -} From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:51:57 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1F75816A4D0; Fri, 31 Dec 2004 14:51:57 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB87816A4CE for ; Fri, 31 Dec 2004 14:51:56 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B024F43D46 for ; Fri, 31 Dec 2004 14:51:56 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEpuUk008981 for ; Fri, 31 Dec 2004 14:51:56 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEpuAp008978 for perforce@freebsd.org; Fri, 31 Dec 2004 14:51:56 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:51:56 GMT Message-Id: <200412311451.iBVEpuAp008978@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67973 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:51:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=67973 Change 67973 by davidxu@davidxu_tiger on 2004/12/31 14:51:33 remove unused code. use SIGCANCEL defined in thr_private.h to do asynchronous cancellation. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sig.c#4 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sig.c#4 (text+ko) ==== @@ -43,13 +43,6 @@ #include #include "thr_private.h" -/* Prototypes: */ -static inline void build_siginfo(siginfo_t *info, int signo); -static inline void thr_sigframe_restore(struct pthread *thread, - struct pthread_sigframe *psf); -static inline void thr_sigframe_save(struct pthread *thread, - struct pthread_sigframe *psf); - /* #define DEBUG_SIGNAL */ #ifdef DEBUG_SIGNAL #define DBG_MSG stdout_debug @@ -59,11 +52,11 @@ typedef void (*ohandler)(int sig, int code, struct sigcontext *scp, char *addr, __sighandler_t *catcher); +static void thr_cancel_handler(struct pthread *); void _thr_sig_handler(int sig, siginfo_t *info, ucontext_t *ucp) { - struct pthread_sigframe psf; __siginfohandler_t *sigfunc; struct pthread *curthread; struct sigaction act; @@ -76,7 +69,7 @@ curthread = _get_curthread(); if (curthread == NULL) PANIC("No current thread.\n"); - if (curthread->flags & THR_FLAGS_EXITING) { + if (curthread->state == PS_DEAD) { errno = err_save; return; } @@ -85,40 +78,27 @@ * If thread is in critical region or if thread is on * the way of state transition, then latch signal into buffer. */ - if (THR_IN_CRITICAL(curthread) || curthread->state != PS_RUNNING || - curthread->lock_switch != 0 || curthread->idle != 0) { + if (THR_IN_CRITICAL(curthread)) { DBG_MSG(">>> _thr_sig_handler(%d) in critical\n", sig); curthread->siginfo[sig-1] = *info; curthread->check_pending = 1; - curthread->sigseqno++; SIGADDSET(curthread->sigpend, sig); - /* - * If the thread is on the way to idle itself, but - * we have signal ready, we should prevent it - * to sleep, kernel will latch the wakeup request, - * so thr_suspend will return from kernel immediately. - */ - if (curthread->idle) - thr_wake(curthread->tid); errno = err_save; return; } - /* Check if the signal requires a dump of thread information: */ - if (sig == SIGINFO) { - /* Dump thread information to file: */ - _thread_dump_info(); - } - /* Check the threads previous state: */ curthread->critical_count++; if (curthread->sigbackout != NULL) curthread->sigbackout((void *)curthread); curthread->critical_count--; - thr_sigframe_save(curthread, &psf); + + if (sig == SIGCANCEL) + thr_cancel_handler(curthread); THR_ASSERT(!(curthread->sigbackout), "sigbackout was not cleared."); + /* Reset signal handler if needed */ THR_LOCK_ACQUIRE(curthread, &_thread_signal_lock); sigfunc = _thread_sigact[sig - 1].sa_sigaction; sa_flags = _thread_sigact[sig - 1].sa_flags; @@ -142,25 +122,17 @@ sig, info->si_code, (struct sigcontext *)ucp, info->si_addr, (__sighandler_t *)sigfunc); } - } else if ((__sighandler_t *)sigfunc == SIG_DFL) { - thr_kill(curthread->tid, sig); + } else if (sig != SIGCANCEL && (__sighandler_t *)sigfunc == SIG_DFL) { + thr_kill(curthread->tid, sig); } - thr_sigframe_restore(curthread, &psf); + SIGDELSET(ucp->uc_sigmask, SIGCANCEL); DBG_MSG("<<< _thr_sig_handler(%d)\n", sig); errno = err_save; } -static inline void -build_siginfo(siginfo_t *info, int signo) -{ - bzero(info, sizeof(*info)); - info->si_signo = signo; - info->si_pid = _thr_pid; -} - /* * This is called by a thread when it has pending signals to deliver. * It should only be called from the context of the thread. @@ -169,7 +141,7 @@ _thr_sig_rundown(struct pthread *curthread) { int i, err_save; - sigset_t sigmask; + sigset_t sigmask, oldmask; err_save = errno; @@ -178,7 +150,7 @@ SIGFILLSET(sigmask); /* repost signal to kernel */ if (!SIGISEMPTY(curthread->sigpend)) { - __sys_sigprocmask(SIG_SETMASK, &sigmask, &curthread->sigmask); + __sys_sigprocmask(SIG_SETMASK, &sigmask, &oldmask); for (i = 1; i <= _SIG_MAXSIG; ++i) { if (SIGISMEMBER(curthread->sigpend, i)) { SIGDELSET(curthread->sigpend, i); @@ -188,35 +160,21 @@ thr_kill(curthread->tid, i); } } - __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); + __sys_sigprocmask(SIG_SETMASK, &oldmask, NULL); } DBG_MSG("<<< thr_sig_rundown (%p)\n", curthread); errno = err_save; } /* - * This checks pending signals for the current thread. It should be - * called whenever a thread changes its signal mask. Note that this - * is called from a thread (using its stack). - * - * XXX - We might want to just check to see if there are pending - * signals for the thread here, but enter the UTS scheduler - * to actually install the signal handler(s). + * This checks pending signals for the current thread. */ void _thr_sig_check_pending(struct pthread *curthread) { int errsave; - /* - * If the thread is in critical region, delay processing signals. - * If the thread state is not PS_RUNNING, it might be switching - * into UTS and but a THR_LOCK_RELEASE saw check_pending, and it - * goes here, in the case we delay processing signals, lets UTS - * process complicated things, normally UTS will call _thr_sig_add - * to resume the thread, so we needn't repeat doing it here. - */ - if (THR_IN_CRITICAL(curthread) || curthread->lock_switch) + if (THR_IN_CRITICAL(curthread)) return; errsave = errno; @@ -225,137 +183,51 @@ errno = errsave; } -/* - * Perform thread specific actions in response to a signal. - * This function is only called if there is a handler installed - * for the signal, and if the target thread has the signal - * unmasked. - * - * This must be called with the thread's scheduling lock held. - */ -long -_thr_sig_add(struct pthread *pthread, int sig, siginfo_t *info) +static void +thr_cancel_handler(struct pthread *curthread) { - struct pthread *curthread = _get_curthread(); - long tid = -1; - int suppress_handler = 0; - __sighandler_t *sigfunc; - - DBG_MSG(">>> _thr_sig_add %p (%d)\n", pthread, sig); - - sigfunc = _thread_sigact[sig - 1].sa_handler; - - if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK || - pthread->state == PS_STATE_MAX) - return (-1); /* return false */ - - if (curthread != pthread) { - PANIC("Please use _thr_send_sig for bound thread"); - return (-1); + if ((curthread->cancelflags & + (THR_CANCEL_AT_POINT | THR_CANCEL_ASYNCHRONOUS))) { + pthread_testcancel(); } + _thr_suspend_check(curthread); +} - if (SIGISMEMBER(pthread->sigmask, sig) || THR_IN_CRITICAL(pthread)) { - /* signal is masked, just add signal to thread. */ - SIGADDSET(pthread->sigpend, sig); - if (info == NULL) - build_siginfo(&pthread->siginfo[sig-1], sig); - else if (info != &pthread->siginfo[sig-1]) - memcpy(&pthread->siginfo[sig-1], info, - sizeof(*info)); - if (!SIGISMEMBER(pthread->sigmask, sig)) - pthread->check_pending = 1; - } else { - /* - * Process according to thread state: - */ - switch (pthread->state) { - case PS_DEAD: - case PS_DEADLOCK: - case PS_STATE_MAX: - return (-1); /* XXX return false */ - case PS_SUSPENDED: - /* - * You can't call a signal handler for threads in these - * states. - */ - suppress_handler = 1; - break; - case PS_RUNNING: - /* Possible not in RUNQ and has curframe ? */ - /* pthread->active_priority |= THR_SIGNAL_PRIORITY; */ - break; - /* - * States which cannot be interrupted but still require the - * signal handler to run: - */ - case PS_MUTEX_WAIT: - break; - case PS_JOIN: - break; - } - - SIGADDSET(pthread->sigpend, sig); - if (info == NULL) - build_siginfo(&pthread->siginfo[sig-1], sig); - else if (info != &pthread->siginfo[sig-1]) - memcpy(&pthread->siginfo[sig-1], info, sizeof(*info)); - pthread->check_pending = 1; - if (suppress_handler == 0) { - if (pthread->state != PS_RUNNING) - tid = _thr_setrunnable_unlocked(pthread); - } - } - return (tid); -} - -/* - * Send a signal to a specific thread (ala pthread_kill): - */ void -_thr_sig_send(struct pthread *pthread, int sig) +_thr_suspend_check(struct pthread *curthread) { - thr_kill(pthread->tid, sig); -} +#if 0 + sigset_t set; + long cycle; -static inline void -thr_sigframe_restore(struct pthread *curthread, struct pthread_sigframe *psf) -{ + /* Async suspend. */ THR_LOCK(curthread); - curthread->cancelflags = (psf->psf_cancelflags | - (curthread->cancelflags & - (THR_CANCEL_NEEDED | THR_CANCELLING))); - curthread->flags = psf->psf_flags; - curthread->interrupted = psf->psf_interrupted; - curthread->timeout = psf->psf_timeout; - curthread->data = psf->psf_wait_data; - curthread->wakeup_time = psf->psf_wakeup_time; - curthread->continuation = psf->psf_continuation; + if ((curthread->flags & (THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED)) + == THR_FLAGS_NEED_SUSPEND) { + curthread->flags |= THR_FLAGS_SUSPENDED; + SIGEMPTYSET(set); + SIGADDSET(set, SIGCANCEL); + __sys_sigprocmask(SIG_UNBLOCK, &set, NULL); + while (curthread->flags & THR_FLAGS_NEED_SUSPEND) { + cycle = curthread->cycle; + THR_UNLOCK(curthread); + umtx_wait((struct umtx *)&curthread->cycle, cycle); + THR_LOCK(curthread); + } + curthread->flags &= ~THR_FLAGS_SUSPENDED; + } THR_UNLOCK(curthread); +#endif } -static inline void -thr_sigframe_save(struct pthread *curthread, struct pthread_sigframe *psf) -{ - THR_LOCK(curthread); - psf->psf_cancelflags = curthread->cancelflags; - /* This has to initialize all members of the sigframe. */ - psf->psf_flags = (curthread->flags & (THR_FLAGS_PRIVATE | THR_FLAGS_EXITING)); - psf->psf_interrupted = curthread->interrupted; - psf->psf_timeout = curthread->timeout; - psf->psf_wait_data = curthread->data; - psf->psf_wakeup_time = curthread->wakeup_time; - psf->psf_continuation = curthread->continuation; - THR_UNLOCK(curthread); -} - void _thr_signal_init(void) { struct sigaction act; __siginfohandler_t *sigfunc; + int i; - int i; /* Enter a loop to get the existing signal status: */ for (i = 1; i <= _SIG_MAXSIG; i++) { /* Get the signal handler details: */ @@ -377,16 +249,12 @@ __sys_sigaction(i, &act, NULL); } } - /* - * Install the signal handler for SIGINFO. It isn't - * really needed, but it is nice to have for debugging - * purposes. - */ - _thread_sigact[SIGINFO - 1].sa_flags = SA_SIGINFO | SA_RESTART; + /* Install cancel handler. */ + _thread_sigact[SIGCANCEL - 1].sa_flags = SA_SIGINFO | SA_RESTART; SIGEMPTYSET(act.sa_mask); act.sa_flags = SA_SIGINFO | SA_RESTART; act.sa_sigaction = (__siginfohandler_t *)&_thr_sig_handler; - __sys_sigaction(SIGINFO, &act, NULL); + __sys_sigaction(SIGCANCEL, &act, NULL); } void @@ -411,4 +279,3 @@ } } } - From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:52:59 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 05FE516A515; Fri, 31 Dec 2004 14:52:59 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B576316A4E3 for ; Fri, 31 Dec 2004 14:52:58 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8734443D1D for ; Fri, 31 Dec 2004 14:52:58 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEqwKQ009029 for ; Fri, 31 Dec 2004 14:52:58 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEqw1E009026 for perforce@freebsd.org; Fri, 31 Dec 2004 14:52:58 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:52:58 GMT Message-Id: <200412311452.iBVEqw1E009026@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67974 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:52:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=67974 Change 67974 by davidxu@davidxu_tiger on 2004/12/31 14:52:50 simplify cancellation code. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_cancel.c#4 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_cancel.c#4 (text+ko) ==== @@ -14,27 +14,16 @@ static inline int checkcancel(struct pthread *curthread) { - if ((curthread->cancelflags & THR_CANCELLING) != 0) { - /* - * It is possible for this thread to be swapped out - * while performing cancellation; do not allow it - * to be cancelled again. - */ - if ((curthread->flags & THR_FLAGS_EXITING) != 0) { - /* - * this may happen once, but after this, it - * shouldn't happen again. - */ - curthread->cancelflags &= ~THR_CANCELLING; - return (0); - } - if ((curthread->cancelflags & PTHREAD_CANCEL_DISABLE) == 0) { - curthread->cancelflags &= ~THR_CANCELLING; - return (1); - } + /* + * Don't do cancellation again if it was already in progress. + */ + if ((curthread->cancelflags & + (THR_CANCEL_EXITING | THR_CANCELLING | THR_CANCEL_DISABLE | + THR_CANCEL_NEEDED)) == THR_CANCEL_NEEDED) { + curthread->cancelflags |= THR_CANCELLING; + return (1); } - else - return (0); + return (0); } static inline void @@ -43,8 +32,6 @@ if (checkcancel(curthread) != 0) { /* Unlock before exiting: */ THR_UNLOCK(curthread); - - _thr_exit_cleanup(); pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } @@ -54,93 +41,35 @@ _pthread_cancel(pthread_t pthread) { struct pthread *curthread = _get_curthread(); - struct pthread *joinee = NULL; long tid = -1; int ret; - if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0)) == 0) { + THREAD_LIST_LOCK(curthread); + if ((ret = _thr_find_thread(curthread, pthread, 0)) == 0) { /* * Take the thread's lock while we change the cancel flags. */ THR_THREAD_LOCK(curthread, pthread); - if (pthread->flags & THR_FLAGS_EXITING) { + THREAD_LIST_UNLOCK(curthread); + if (pthread->cancelflags & + (THR_CANCELLING | THR_CANCEL_EXITING)) { THR_THREAD_UNLOCK(curthread, pthread); - _thr_ref_delete(curthread, pthread); - return (ESRCH); + return (0); } - if (((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) != 0) || - (((pthread->cancelflags & THR_AT_CANCEL_POINT) == 0) && - ((pthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0))) - /* Just mark it for cancellation: */ - pthread->cancelflags |= THR_CANCELLING; - else { - /* - * Check if we need to kick it back into the - * run queue: - */ - switch (pthread->state) { - case PS_RUNNING: - /* No need to resume: */ - pthread->cancelflags |= THR_CANCELLING; - tid = pthread->tid; - break; - - case PS_JOIN: - /* Disconnect the thread from the joinee: */ - joinee = pthread->join_status.thread; - pthread->join_status.thread = NULL; - pthread->cancelflags |= THR_CANCELLING; - tid = _thr_setrunnable_unlocked(pthread); - break; - - case PS_SUSPENDED: - case PS_MUTEX_WAIT: - /* - * Threads in these states may be in queues. - * In order to preserve queue integrity, the - * cancelled thread must remove itself from the - * queue. Mark the thread as interrupted and - * needing cancellation, and set the state to - * running. When the thread resumes, it will - * remove itself from the queue and call the - * cancellation completion routine. - */ - pthread->interrupted = 1; - pthread->cancelflags |= THR_CANCEL_NEEDED; - tid = _thr_setrunnable_unlocked(pthread); - pthread->continuation = - _thr_finish_cancellation; - break; - - case PS_DEAD: - case PS_DEADLOCK: - case PS_STATE_MAX: - /* Ignore - only here to silence -Wall: */ - break; - } - -#if 0 - thr_interrupt(pthread->tid, 1); -#endif + pthread->cancelflags |= THR_CANCEL_NEEDED; + if ((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) == 0 && + ((pthread->cancelflags & THR_CANCEL_AT_POINT) != 0 || + (pthread->cancelflags & THR_CANCEL_ASYNCHRONOUS) != 0)) { + tid = pthread->tid; + thr_kill(tid, SIGCANCEL); } - /* * Release the thread's lock and remove the * reference: */ THR_THREAD_UNLOCK(curthread, pthread); - _thr_ref_delete(curthread, pthread); - if (tid != -1) - thr_wake(tid); - - if ((joinee != NULL) && - (_thr_ref_add(curthread, joinee, /* include dead */1) == 0)) { - /* Remove the joiner from the joinee. */ - THR_THREAD_LOCK(curthread, joinee); - joinee->joiner = NULL; - THR_THREAD_UNLOCK(curthread, joinee); - _thr_ref_delete(curthread, joinee); - } + } else { + THREAD_LIST_UNLOCK(curthread); } return (ret); } @@ -149,24 +78,27 @@ _pthread_setcancelstate(int state, int *oldstate) { struct pthread *curthread = _get_curthread(); + int need_exit = 0; int ostate; int ret; - int need_exit = 0; /* Take the thread's lock while fiddling with the state: */ THR_LOCK(curthread); - ostate = curthread->cancelflags & PTHREAD_CANCEL_DISABLE; + if (curthread->cancelflags & THR_CANCEL_DISABLE) + ostate = PTHREAD_CANCEL_DISABLE; + else + ostate = PTHREAD_CANCEL_ENABLE; switch (state) { case PTHREAD_CANCEL_ENABLE: - curthread->cancelflags &= ~PTHREAD_CANCEL_DISABLE; - if ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) != 0) + curthread->cancelflags &= ~THR_CANCEL_DISABLE; + if ((curthread->cancelflags & THR_CANCEL_ASYNCHRONOUS) != 0) need_exit = checkcancel(curthread); ret = 0; break; case PTHREAD_CANCEL_DISABLE: - curthread->cancelflags |= PTHREAD_CANCEL_DISABLE; + curthread->cancelflags |= THR_CANCEL_DISABLE; ret = 0; break; default: @@ -175,7 +107,6 @@ THR_UNLOCK(curthread); if (need_exit != 0) { - _thr_exit_cleanup(); pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } @@ -189,22 +120,25 @@ _pthread_setcanceltype(int type, int *oldtype) { struct pthread *curthread = _get_curthread(); + int need_exit = 0; int otype; int ret; - int need_exit = 0; /* Take the thread's lock while fiddling with the state: */ THR_LOCK(curthread); - otype = curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS; + if (curthread->cancelflags & THR_CANCEL_ASYNCHRONOUS) + otype = PTHREAD_CANCEL_ASYNCHRONOUS; + else + otype = PTHREAD_CANCEL_DEFERRED; switch (type) { case PTHREAD_CANCEL_ASYNCHRONOUS: - curthread->cancelflags |= PTHREAD_CANCEL_ASYNCHRONOUS; + curthread->cancelflags |= THR_CANCEL_ASYNCHRONOUS; need_exit = checkcancel(curthread); ret = 0; break; case PTHREAD_CANCEL_DEFERRED: - curthread->cancelflags &= ~PTHREAD_CANCEL_ASYNCHRONOUS; + curthread->cancelflags &= ~THR_CANCEL_ASYNCHRONOUS; ret = 0; break; default: @@ -213,7 +147,6 @@ THR_UNLOCK(curthread); if (need_exit != 0) { - _thr_exit_cleanup(); pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } @@ -233,41 +166,28 @@ THR_UNLOCK(curthread); } -void +int _thr_cancel_enter(struct pthread *curthread) { + int old; + /* Look for a cancellation before we block: */ THR_LOCK(curthread); - testcancel(curthread); - curthread->cancelflags |= THR_AT_CANCEL_POINT; - THR_UNLOCK(curthread); -} - -void -_thr_cancel_leave(struct pthread *curthread, int check) -{ - THR_LOCK(curthread); - curthread->cancelflags &= ~THR_AT_CANCEL_POINT; - /* Look for a cancellation after we unblock: */ - if (check) + old = curthread->cancelflags; + if (!(curthread->cancelflags & THR_CANCEL_AT_POINT)) { testcancel(curthread); + curthread->cancelflags |= THR_CANCEL_AT_POINT; + } THR_UNLOCK(curthread); + return (old); } void -_thr_finish_cancellation(void *arg) +_thr_cancel_leave(struct pthread *curthread, int previous) { - struct pthread *curthread = _get_curthread(); - - curthread->continuation = NULL; - curthread->interrupted = 0; - + if (!(previous & THR_CANCEL_AT_POINT)) + return; THR_LOCK(curthread); - if ((curthread->cancelflags & THR_CANCEL_NEEDED) != 0) { - curthread->cancelflags &= ~THR_CANCEL_NEEDED; - THR_UNLOCK(curthread); - _thr_exit_cleanup(); - pthread_exit(PTHREAD_CANCELED); - } + curthread->cancelflags &= ~THR_CANCEL_AT_POINT; THR_UNLOCK(curthread); } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:55:02 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B68A216A4D0; Fri, 31 Dec 2004 14:55:01 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 912E616A4CE for ; Fri, 31 Dec 2004 14:55:01 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 645D143D39 for ; Fri, 31 Dec 2004 14:55:01 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEt1XL009092 for ; Fri, 31 Dec 2004 14:55:01 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEt1pX009089 for perforce@freebsd.org; Fri, 31 Dec 2004 14:55:01 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:55:01 GMT Message-Id: <200412311455.iBVEt1pX009089@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67975 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:55:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=67975 Change 67975 by davidxu@davidxu_tiger on 2004/12/31 14:54:05 add _thr_find_thread(). Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_find_thread.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_find_thread.c#3 (text+ko) ==== @@ -45,43 +45,55 @@ _thr_ref_add(struct pthread *curthread, struct pthread *thread, int include_dead) { - struct pthread *pthread; + int ret; if (thread == NULL) /* Invalid thread: */ return (EINVAL); - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); - pthread = _thr_hash_find(thread); - if (pthread) { - if ((include_dead == 0) && - ((pthread->state == PS_DEAD) || - ((pthread->state == PS_DEADLOCK) || - ((pthread->flags & THR_FLAGS_EXITING) != 0)))) - pthread = NULL; - else { - pthread->refcount++; - if (curthread != NULL) - curthread->critical_count++; - } + THREAD_LIST_LOCK(curthread); + if ((ret = _thr_find_thread(curthread, thread, include_dead)) == 0) { + thread->refcount++; + if (curthread != NULL) + curthread->critical_count++; } - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); /* Return zero if the thread exists: */ - return ((pthread != NULL) ? 0 : ESRCH); + return (ret); } void _thr_ref_delete(struct pthread *curthread, struct pthread *thread) { if (thread != NULL) { - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); thread->refcount--; if (curthread != NULL) curthread->critical_count--; if ((thread->refcount == 0) && (thread->tlflags & TLFLAGS_GC_SAFE) != 0) THR_GCLIST_ADD(thread); - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); + } +} + +int +_thr_find_thread(struct pthread *curthread, struct pthread *thread, + int include_dead) +{ + struct pthread *pthread; + + if (thread == NULL) + /* Invalid thread: */ + return (EINVAL); + + pthread = _thr_hash_find(thread); + if (pthread) { + if (include_dead == 0 && pthread->state == PS_DEAD) + pthread = NULL; } + + /* Return zero if the thread exists: */ + return ((pthread != NULL) ? 0 : ESRCH); } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:55:02 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D6AA16A4D7; Fri, 31 Dec 2004 14:55:02 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF66F16A4DB for ; Fri, 31 Dec 2004 14:55:01 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B34BC43D39 for ; Fri, 31 Dec 2004 14:55:01 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEt13v009098 for ; Fri, 31 Dec 2004 14:55:01 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEt1ml009095 for perforce@freebsd.org; Fri, 31 Dec 2004 14:55:01 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:55:01 GMT Message-Id: <200412311455.iBVEt1ml009095@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67976 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:55:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=67976 Change 67976 by davidxu@davidxu_tiger on 2004/12/31 14:54:57 don't free cleanup object on stack. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_clean.c#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_clean.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_clean.c,v 1.8 2003/04/18 05:04:15 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_clean.c,v 1.9 2004/12/18 18:07:37 deischen Exp $ */ #include #include @@ -50,6 +50,7 @@ malloc(sizeof(struct pthread_cleanup))) != NULL) { new->routine = routine; new->routine_arg = routine_arg; + new->onstack = 0; new->next = curthread->cleanup; curthread->cleanup = new; @@ -67,6 +68,7 @@ if (execute) { old->routine(old->routine_arg); } - free(old); + if (old->onstack == 0) + free(old); } } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:56:04 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DCA8316A4D0; Fri, 31 Dec 2004 14:56:03 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EF0216A4CE for ; Fri, 31 Dec 2004 14:56:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70A0C43D1F for ; Fri, 31 Dec 2004 14:56:03 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEu3kj009184 for ; Fri, 31 Dec 2004 14:56:03 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEu3sq009181 for perforce@freebsd.org; Fri, 31 Dec 2004 14:56:03 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:56:03 GMT Message-Id: <200412311456.iBVEu3sq009181@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67977 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:56:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=67977 Change 67977 by davidxu@davidxu_tiger on 2004/12/31 14:55:50 some fields no longer exist. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_create.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_create.c#3 (text+ko) ==== @@ -113,10 +113,8 @@ _thr_free(curthread, new_thread); } else { new_thread->tid = 0; + new_thread->cycle = 0; new_thread->isdead = 0; - new_thread->sigseqno = 0; - new_thread->lock_switch = 0; - new_thread->idle = 0; new_thread->rtld_bits = 0; /* * Write a magic value to the thread structure @@ -183,9 +181,6 @@ new_thread->flags = 0; new_thread->tlflags = 0; new_thread->sigbackout = NULL; - new_thread->continuation = NULL; - new_thread->wakeup_time.tv_sec = -1; - new_thread->timeout = 0; new_thread->error = 0; SIGEMPTYSET(new_thread->sigpend); new_thread->check_pending = 0; @@ -193,15 +188,11 @@ new_thread->locklevel = 0; new_thread->rdlock_count = 0; new_thread->data.mutex = 0; - new_thread->interrupted = 0; new_thread->priority_mutex_count = 0; new_thread->rtld_bits = 0; - if (new_thread->attr.suspend == THR_CREATE_SUSPENDED) { - new_thread->state = PS_SUSPENDED; + if (new_thread->attr.suspend == THR_CREATE_SUSPENDED) new_thread->flags = THR_FLAGS_SUSPENDED; - } - else - new_thread->state = PS_RUNNING; + new_thread->state = PS_RUNNING; /* * Schedule the new thread. */ @@ -258,10 +249,10 @@ free_stack(struct pthread *curthread, struct pthread_attr *pattr) { if ((pattr->flags & THR_STACK_USER) == 0) { - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); /* Stack routines don't use malloc/free. */ _thr_stack_free(pattr); - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); } } @@ -273,8 +264,8 @@ /* Thread was created with all signals blocked, unblock them. */ __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); - if (curthread->flags & THR_FLAGS_SUSPENDED) - _thr_sched_switch(curthread); + if (curthread->flags & THR_FLAGS_NEED_SUSPEND) + _thr_suspend_check(curthread); /* Run the current thread's start routine with argument: */ pthread_exit(curthread->start_routine(curthread->arg)); From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:57:07 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7FC3216A4D0; Fri, 31 Dec 2004 14:57:07 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43F1B16A4CE for ; Fri, 31 Dec 2004 14:57:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EFC243D39 for ; Fri, 31 Dec 2004 14:57:07 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEv6X9009229 for ; Fri, 31 Dec 2004 14:57:06 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEv6rc009226 for perforce@freebsd.org; Fri, 31 Dec 2004 14:57:06 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:57:06 GMT Message-Id: <200412311457.iBVEv6rc009226@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67979 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:57:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=67979 Change 67979 by davidxu@davidxu_tiger on 2004/12/31 14:56:42 rework join related code. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_detach.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_detach.c#3 (text+ko) ==== @@ -44,58 +44,46 @@ { struct pthread *curthread = _get_curthread(); struct pthread *joiner; - long tid = -1; - int rval = 0; + int rval; - /* Check for invalid calling parameters: */ - if (pthread == NULL || pthread->magic != THR_MAGIC) - /* Return an invalid argument error: */ - rval = EINVAL; + if (pthread == NULL) + return (EINVAL); - else if ((rval = _thr_ref_add(curthread, pthread, - /*include dead*/1)) != 0) { - /* Return an error: */ + THREAD_LIST_LOCK(curthread); + if ((rval = _thr_find_thread(curthread, pthread, + /*include dead*/1)) != 0) { + THREAD_LIST_UNLOCK(curthread); + return (rval); } - /* Check if the thread is already detached: */ - else if ((pthread->attr.flags & PTHREAD_DETACHED) != 0) { - /* Return an error: */ - _thr_ref_delete(curthread, pthread); - rval = EINVAL; - } else { - /* Lock the detached thread: */ - THR_THREAD_LOCK(curthread, pthread); + /* Check if the thread is already detached. */ + if ((pthread->tlflags & TLFLAGS_DETACHED) != 0) { + THREAD_LIST_UNLOCK(curthread); + return (EINVAL); + } - /* Flag the thread as detached: */ - pthread->attr.flags |= PTHREAD_DETACHED; + /* Flag the thread as detached. */ + pthread->tlflags |= TLFLAGS_DETACHED; - /* Retrieve any joining thread and remove it: */ - joiner = pthread->joiner; - THR_THREAD_UNLOCK(curthread, pthread); + /* Retrieve any joining thread and remove it. */ + joiner = pthread->joiner; - /* See if there is a thread waiting in pthread_join(): */ - if ((joiner != NULL) && - (_thr_ref_add(curthread, joiner, 0) == 0)) { - /* Lock the joiner before fiddling with it. */ - THR_THREAD_LOCK(curthread, joiner); - if (joiner->join_status.thread == pthread) { - /* - * Set the return value for the woken thread: - */ - joiner->join_status.error = ESRCH; - joiner->join_status.ret = NULL; - joiner->join_status.thread = NULL; - - tid = _thr_setrunnable_unlocked(joiner); - } - THR_THREAD_UNLOCK(curthread, joiner); - _thr_ref_delete(curthread, joiner); + /* See if there is a thread waiting in pthread_join(). */ + if (joiner != NULL) { + THR_THREAD_LOCK(curthread, joiner); + if (joiner->join_status.thread == pthread) { + /* + * Set the return value for the woken thread: + */ + joiner->join_status.error = ESRCH; + joiner->join_status.ret = NULL; + joiner->join_status.thread = NULL; + joiner->cycle++; + umtx_wake((struct umtx *)&joiner->cycle, 1); } - _thr_ref_delete(curthread, pthread); - if (tid != -1) - thr_wake(tid); + THR_THREAD_UNLOCK(curthread, joiner); } + THREAD_LIST_UNLOCK(curthread); - /* Return the completion status: */ - return (rval); + return (0); } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:58:09 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3B37C16A4D0; Fri, 31 Dec 2004 14:58:09 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 118BB16A4CE for ; Fri, 31 Dec 2004 14:58:09 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DAEB543D2D for ; Fri, 31 Dec 2004 14:58:08 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEw8l3009294 for ; Fri, 31 Dec 2004 14:58:08 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEw8kh009290 for perforce@freebsd.org; Fri, 31 Dec 2004 14:58:08 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:58:08 GMT Message-Id: <200412311458.iBVEw8kh009290@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67980 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:58:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=67980 Change 67980 by davidxu@davidxu_tiger on 2004/12/31 14:57:08 rework join related code. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_join.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_join.c#3 (text+ko) ==== @@ -37,121 +37,131 @@ __weak_reference(_pthread_join, pthread_join); +static void backout_join(void *arg) +{ + struct pthread *curthread = _get_curthread(); + struct pthread *pthread = (struct pthread *)arg; + + THREAD_LIST_LOCK(curthread); + if (_thr_find_thread(curthread, pthread, /*include dead*/1) == 0) { + if (pthread->joiner == curthread) + pthread->joiner = NULL; + } + THREAD_LIST_UNLOCK(curthread); +} + int _pthread_join(pthread_t pthread, void **thread_return) { struct pthread *curthread = _get_curthread(); void *tmp; + int oldcancel; int ret = 0; - _thr_cancel_enter(curthread); - - /* Check if the caller has specified an invalid thread: */ - if (pthread == NULL || pthread->magic != THR_MAGIC) { - /* Invalid thread: */ - _thr_cancel_leave(curthread, 1); + if (pthread == NULL) { return (EINVAL); } - /* Check if the caller has specified itself: */ if (pthread == curthread) { - /* Avoid a deadlock condition: */ - _thr_cancel_leave(curthread, 1); return (EDEADLK); } - /* - * Find the thread in the list of active threads or in the - * list of dead threads: - */ - if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/1)) != 0) { - /* Return an error: */ - _thr_cancel_leave(curthread, 1); + THREAD_LIST_LOCK(curthread); + if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/1)) != 0) { + THREAD_LIST_UNLOCK(curthread); return (ESRCH); } + /* Check if this thread has been detached. */ + if ((pthread->tlflags & TLFLAGS_DETACHED) != 0) { + THREAD_LIST_UNLOCK(curthread); + return (ESRCH); + } + THR_THREAD_LOCK(curthread, pthread); - /* Check if this thread has been detached: */ - if ((pthread->attr.flags & PTHREAD_DETACHED) != 0) { + /* Lock the target thread while checking its state. */ + if (pthread->state == PS_DEAD) { + /* Return the thread's return value. */ + tmp = pthread->ret; + THR_THREAD_UNLOCK(curthread, pthread); - /* Remove the reference and return an error: */ - _thr_ref_delete(curthread, pthread); - ret = ESRCH; - } else { - /* Lock the target thread while checking its state. */ - if (pthread->state == PS_DEAD) { - /* Return the thread's return value: */ - tmp = pthread->ret; + + /* Detach the thread. */ + pthread->tlflags |= TLFLAGS_DETACHED; + + /* + * Remove the thread from the list of active + * threads and add it to the GC list. + */ + THR_LIST_REMOVE(pthread); + THR_GCLIST_ADD(pthread); + + /* Unlock the thread list. */ + THREAD_LIST_UNLOCK(curthread); - /* Detach the thread. */ - pthread->attr.flags |= PTHREAD_DETACHED; + if (thread_return != NULL) + *thread_return = tmp; + return (0); + } + THR_THREAD_UNLOCK(curthread, pthread); - /* Unlock the thread. */ - THR_THREAD_UNLOCK(curthread, pthread); + if (pthread->joiner != NULL) { + THREAD_LIST_UNLOCK(curthread); - /* - * Remove the thread from the list of active - * threads and add it to the GC list. - */ - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); - THR_LIST_REMOVE(pthread); - THR_GCLIST_ADD(pthread); - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + /* Multiple joiners are not supported. */ + return (ENOTSUP); + } - /* Remove the reference. */ - _thr_ref_delete(curthread, pthread); - if (thread_return != NULL) - *thread_return = tmp; - } - else if (pthread->joiner != NULL) { - /* Unlock the thread and remove the reference. */ - THR_THREAD_UNLOCK(curthread, pthread); - _thr_ref_delete(curthread, pthread); + /* Set the running thread to be the joiner: */ + pthread->joiner = curthread; - /* Multiple joiners are not supported. */ - ret = ENOTSUP; - } - else { - /* Set the running thread to be the joiner: */ - pthread->joiner = curthread; + /* Keep track of which thread we're joining to: */ + curthread->join_status.error = 0; + curthread->join_status.thread = pthread; - /* Keep track of which thread we're joining to: */ - curthread->join_status.thread = pthread; + THREAD_LIST_UNLOCK(curthread); - /* Unlock the thread and remove the reference. */ - THR_THREAD_UNLOCK(curthread, pthread); - _thr_ref_delete(curthread, pthread); + THR_CLEANUP_PUSH(curthread, backout_join, pthread); - THR_LOCK_SWITCH(curthread); - while (curthread->join_status.thread == pthread) { - THR_SET_STATE(curthread, PS_JOIN); - /* Schedule the next thread: */ - _thr_sched_switch_unlocked(curthread); - THR_LOCK_SWITCH(curthread); - } - THR_UNLOCK_SWITCH(curthread); + long cycle; + THR_LOCK(curthread); + while (curthread->join_status.thread == pthread) { + cycle = curthread->cycle; + THR_UNLOCK(curthread); + oldcancel = _thr_cancel_enter(curthread); + umtx_wait((struct umtx *)&curthread->cycle, cycle); + _thr_cancel_leave(curthread, oldcancel); + THR_LOCK(curthread); + } + THR_UNLOCK(curthread); + THR_CLEANUP_POP(curthread, 0); - if ((curthread->cancelflags & THR_CANCELLING) && - !(curthread->cancelflags & PTHREAD_CANCEL_DISABLE)) { - if (_thr_ref_add(curthread, pthread, 1) == 0) { - THR_THREAD_LOCK(curthread, pthread); - pthread->joiner = NULL; - THR_THREAD_UNLOCK(curthread, pthread); - _thr_ref_delete(curthread, pthread); - } - pthread_exit(PTHREAD_CANCELED); + if (curthread->join_status.error == 0) { + THREAD_LIST_LOCK(curthread); + if (_thr_find_thread(curthread, pthread, /*include dead*/1) == 0) { + if (pthread->joiner == curthread) { + pthread->tlflags |= TLFLAGS_DETACHED; + /* + * Remove the thread from the list of active + * threads and add it to the GC list. + */ + THR_LIST_REMOVE(pthread); + THR_GCLIST_ADD(pthread); } - - /* - * The thread return value and error are set by the - * thread we're joining to when it exits or detaches: - */ - ret = curthread->join_status.error; - if ((ret == 0) && (thread_return != NULL)) - *thread_return = curthread->join_status.ret; + THREAD_LIST_UNLOCK(curthread); + } else { + THREAD_LIST_UNLOCK(curthread); + /* Return an error: */ + return (ESRCH); } } - _thr_cancel_leave(curthread, 1); + /* + * The thread return value and error are set by the + * thread we're joining to when it exits or detaches: + */ + ret = curthread->join_status.error; + if ((ret == 0) && (thread_return != NULL)) + *thread_return = curthread->join_status.ret; /* Return the completion status: */ return (ret); From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:58:10 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 30B5B16A4DB; Fri, 31 Dec 2004 14:58:10 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6460A16A4CF for ; Fri, 31 Dec 2004 14:58:09 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 344D743D2D for ; Fri, 31 Dec 2004 14:58:09 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEw9sM009300 for ; Fri, 31 Dec 2004 14:58:09 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEw8l8009297 for perforce@freebsd.org; Fri, 31 Dec 2004 14:58:08 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:58:08 GMT Message-Id: <200412311458.iBVEw8l8009297@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67981 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:58:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=67981 Change 67981 by davidxu@davidxu_tiger on 2004/12/31 14:57:36 rework join related code. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_exit.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_exit.c#3 (text+ko) ==== @@ -86,9 +86,10 @@ _pthread_exit(void *status) { struct pthread *curthread = _get_curthread(); + struct pthread *joiner; /* Check if this thread is already in the process of exiting: */ - if ((curthread->flags & THR_FLAGS_EXITING) != 0) { + if ((curthread->flags & THR_CANCEL_EXITING) != 0) { char msg[128]; snprintf(msg, sizeof(msg), "Thread %p has called " "pthread_exit() from a destructor. POSIX 1003.1 " @@ -101,9 +102,11 @@ * from joining to this thread. */ THR_LOCK(curthread); - curthread->flags |= THR_FLAGS_EXITING; + curthread->cancelflags |= THR_CANCEL_EXITING; THR_UNLOCK(curthread); + _thr_exit_cleanup(); + /* Save the return value: */ curthread->ret = status; while (curthread->cleanup != NULL) { @@ -117,23 +120,34 @@ /* Run the thread-specific data destructors: */ _thread_cleanupspecific(); } + if (!_thr_isthreaded()) exit(0); - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); - /* Use thread_list_lock */ + + THREAD_LIST_LOCK(curthread); + if ((joiner = curthread->joiner) != NULL) { + THR_THREAD_LOCK(curthread, joiner); + if (joiner->join_status.thread == curthread) { + joiner->join_status.thread = NULL; + joiner->join_status.ret = curthread->ret; + joiner->cycle++; + umtx_wake((struct umtx *)&joiner->cycle, 1); + } + THR_THREAD_UNLOCK(curthread, joiner); + } _thread_active_threads--; if (_thread_active_threads == 0) { - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); exit(0); /* Never reach! */ } - THR_LOCK_RELEASE(curthread, &_thread_list_lock); - - THR_LOCK_SWITCH(curthread); - THR_SET_STATE(curthread, PS_DEAD); - _thr_sched_switch_unlocked(curthread); + curthread->tlflags |= TLFLAGS_GC_SAFE; + THR_GCLIST_ADD(curthread); + THR_LOCK(curthread); + curthread->state = PS_DEAD; + THR_UNLOCK(curthread); + THREAD_LIST_UNLOCK(curthread); + thr_exit(&curthread->isdead); + PANIC("thr_exit() returned"); /* Never reach! */ - - /* This point should not be reached. */ - PANIC("Dead thread has resumed"); } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:59:11 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 291D016A4D0; Fri, 31 Dec 2004 14:59:11 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 052D716A4CE for ; Fri, 31 Dec 2004 14:59:11 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E810F43D1F for ; Fri, 31 Dec 2004 14:59:10 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVExASV009355 for ; Fri, 31 Dec 2004 14:59:10 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVExAX4009352 for perforce@freebsd.org; Fri, 31 Dec 2004 14:59:10 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:59:10 GMT Message-Id: <200412311459.iBVExAX4009352@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67982 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:59:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=67982 Change 67982 by davidxu@davidxu_tiger on 2004/12/31 14:58:38 follow the changes made in header file. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_init.c#5 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_init.c#5 (text+ko) ==== @@ -288,6 +288,7 @@ __sys_sigprocmask(SIG_SETMASK, &sigset, &oldset); _thr_signal_init(); _thread_inited = 1; + SIGDELSET(oldset, SIGCANCEL); __sys_sigprocmask(SIG_SETMASK, &oldset, NULL); } } @@ -355,8 +356,6 @@ thread->cleanup = NULL; thread->flags = 0; thread->sigbackout = NULL; - thread->continuation = NULL; - thread->wakeup_time.tv_sec = -1; thread->state = PS_RUNNING; thread->uniqueid = 0; @@ -406,7 +405,7 @@ /* reinitialized in thr_fork.c */ #if 0 _thr_spinlock_init(); - _thr_mutex_reinit(&_thr_atfork_mutex); + _mutex_reinit(&_thr_atfork_mutex); #endif } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:02:15 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 539E716A4D0; Fri, 31 Dec 2004 15:02:15 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D8C116A4CE for ; Fri, 31 Dec 2004 15:02:15 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D55C43D41 for ; Fri, 31 Dec 2004 15:02:15 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF2FdN009464 for ; Fri, 31 Dec 2004 15:02:15 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF2EII009461 for perforce@freebsd.org; Fri, 31 Dec 2004 15:02:14 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:02:14 GMT Message-Id: <200412311502.iBVF2EII009461@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67983 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:02:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=67983 Change 67983 by davidxu@davidxu_tiger on 2004/12/31 15:01:35 use right field. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_exit.c#4 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_exit.c#4 (text+ko) ==== @@ -89,7 +89,7 @@ struct pthread *joiner; /* Check if this thread is already in the process of exiting: */ - if ((curthread->flags & THR_CANCEL_EXITING) != 0) { + if ((curthread->cancelflags & THR_CANCEL_EXITING) != 0) { char msg[128]; snprintf(msg, sizeof(msg), "Thread %p has called " "pthread_exit() from a destructor. POSIX 1003.1 " From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:03:17 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7435B16A4D0; Fri, 31 Dec 2004 15:03:17 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2010316A4CE for ; Fri, 31 Dec 2004 15:03:17 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D091C43D31 for ; Fri, 31 Dec 2004 15:03:16 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF3Gpm009483 for ; Fri, 31 Dec 2004 15:03:16 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF3GTl009480 for perforce@freebsd.org; Fri, 31 Dec 2004 15:03:16 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:03:16 GMT Message-Id: <200412311503.iBVF3GTl009480@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67984 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:03:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=67984 Change 67984 by davidxu@davidxu_tiger on 2004/12/31 15:02:44 remove unused code. merge thread searching code into this file. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_kern.c#7 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_kern.c#7 (text+ko) ==== @@ -1,39 +1,34 @@ /* + * Copyright (c) 2005, David Xu * Copyright (C) 2003 Daniel M. Eischen - * Copyright (C) 2002 Jonathon Mini - * Copyright (c) 1995-1998 John Birrell * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice unmodified, this list of conditions, and the following + * disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by John Birrell. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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$ */ + #include -__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.115 2004/10/23 23:28:36 davidxu Exp $"); +__FBSDID("$FreeBSD$"); #include #include @@ -70,18 +65,6 @@ #define MAX_CACHED_KSES ((_thread_scope_system <= 0) ? 50 : 100) #define MAX_CACHED_KSEGS ((_thread_scope_system <= 0) ? 50 : 100) -#define THR_NEED_CANCEL(thrd) \ - (((thrd)->cancelflags & THR_CANCELLING) != 0 && \ - ((thrd)->cancelflags & PTHREAD_CANCEL_DISABLE) == 0 && \ - (((thrd)->cancelflags & THR_AT_CANCEL_POINT) != 0 || \ - ((thrd)->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) != 0)) - -#define THR_NEED_ASYNC_CANCEL(thrd) \ - (((thrd)->cancelflags & THR_CANCELLING) != 0 && \ - ((thrd)->cancelflags & PTHREAD_CANCEL_DISABLE) == 0 && \ - (((thrd)->cancelflags & THR_AT_CANCEL_POINT) == 0 && \ - ((thrd)->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) != 0)) - /* * We've got to keep track of everything that is allocated, not only * to have a speedy free list, but also so they can be deallocated @@ -101,9 +84,6 @@ /* Lock for thread tcb constructor/destructor */ static struct umtx tcb_lock; -static void thr_wait(struct pthread *td_wait, int sigseq); -static void thr_cleanup(struct pthread *curthread); -static int thr_timedout(struct pthread *thread, struct timespec *curtime); static void thr_destroy(struct pthread *curthread, struct pthread *thread); static void thread_gc(struct pthread *thread); @@ -124,8 +104,8 @@ void _thr_single_thread(struct pthread *curthread) { - curthread->cancelflags &= ~THR_CANCELLING; - /* clear aother thread locked us. */ + curthread->cancelflags &= ~THR_CANCEL_NEEDED; + /* clear other threads locked us. */ umtx_init(&curthread->lock); thr_self(&curthread->tid); /* reinitialize libc spinlocks, this includes __malloc_lock. */ @@ -190,192 +170,10 @@ _thr_critical_leave(struct pthread *thread) { thread->critical_count--; - THR_YIELD_CHECK(thread); -} - -void -_thr_sched_switch(struct pthread *curthread) -{ - THR_LOCK_SWITCH(curthread); - _thr_sched_switch_unlocked(curthread); + THR_CRITICAL_CHECK(thread); } -/* - * Must hold thread lock before calling this function. - */ void -_thr_sched_switch_unlocked(struct pthread *curthread) -{ - struct timespec ts; - sigset_t sigmask; - int i, sigseqno; - - THR_ASSERT(curthread->lock_switch == 1, "lockswitch?"); - /* - * This has to do the job of kse_switchout_thread(), only - * for a single threaded KSE/KSEG. - */ - switch (curthread->state) { - case PS_MUTEX_WAIT: - if (THR_NEED_CANCEL(curthread)) { - curthread->interrupted = 1; - curthread->continuation = _thr_finish_cancellation; - THR_SET_STATE(curthread, PS_RUNNING); - } - break; - - case PS_DEAD: - curthread->check_pending = 0; - /* exit thread. */ - thr_cleanup(curthread); - break; - - case PS_JOIN: - if (THR_NEED_CANCEL(curthread)) { - curthread->join_status.thread = NULL; - THR_SET_STATE(curthread, PS_RUNNING); - } else { - /* - * This state doesn't timeout. - */ - curthread->wakeup_time.tv_sec = -1; - curthread->wakeup_time.tv_nsec = -1; - } - break; - - case PS_SUSPENDED: - if (THR_NEED_CANCEL(curthread)) { - curthread->interrupted = 1; - THR_SET_STATE(curthread, PS_RUNNING); - } else { - /* - * These states don't timeout. - */ - curthread->wakeup_time.tv_sec = -1; - curthread->wakeup_time.tv_nsec = -1; - } - break; - - case PS_RUNNING: - if ((curthread->flags & THR_FLAGS_SUSPENDED) != 0 && - !THR_NEED_CANCEL(curthread)) { - THR_SET_STATE(curthread, PS_SUSPENDED); - /* - * These states don't timeout. - */ - curthread->wakeup_time.tv_sec = -1; - curthread->wakeup_time.tv_nsec = -1; - } - break; - - case PS_DEADLOCK: - /* - * These states don't timeout and don't need - * to be in the waiting queue. - */ - curthread->wakeup_time.tv_sec = -1; - curthread->wakeup_time.tv_nsec = -1; - break; - - default: - PANIC("Unknown state\n"); - break; - } - - while (curthread->state != PS_RUNNING) { - sigseqno = curthread->sigseqno; - if (curthread->check_pending != 0) { - /* - * Install pending signals into the frame, possible - * cause mutex or condvar backout. - */ - curthread->check_pending = 0; - SIGFILLSET(sigmask); - - /* - * Lock out kernel signal code when we are processing - * signals, and get a fresh copy of signal mask. - */ - __sys_sigprocmask(SIG_SETMASK, &sigmask, - &curthread->sigmask); - for (i = 1; i <= _SIG_MAXSIG; i++) { - if (SIGISMEMBER(curthread->sigmask, i)) - continue; - if (SIGISMEMBER(curthread->sigpend, i)) - (void)_thr_sig_add(curthread, i, - &curthread->siginfo[i-1]); - } - __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, - NULL); - /* The above code might make thread runnable */ - if (curthread->state == PS_RUNNING) - break; - } - thr_wait(curthread, sigseqno); - if (curthread->wakeup_time.tv_sec >= 0) { - clock_gettime(CLOCK_REALTIME, &ts); - if (thr_timedout(curthread, &ts)) { - /* Indicate the thread timedout: */ - curthread->timeout = 1; - /* Make the thread runnable. */ - THR_SET_STATE(curthread, PS_RUNNING); - } - } - } - - THR_UNLOCK_SWITCH(curthread); - - /* - * This thread is being resumed; check for cancellations. - */ - if (THR_NEED_ASYNC_CANCEL(curthread) && !THR_IN_CRITICAL(curthread)) - pthread_testcancel(); -} - -/* - * Clean up a thread. This must be called with the thread's LOCK - * held. - */ -static void -thr_cleanup(struct pthread *curthread) -{ - struct pthread *joiner; - long tid = -1; - - if ((joiner = curthread->joiner) != NULL) { - THR_UNLOCK_SWITCH(curthread); - /* The joiner may have removed itself and exited. */ - if (_thr_ref_add(curthread, joiner, 0) == 0) { - THR_THREAD_LOCK(curthread, joiner); - if (joiner->join_status.thread == curthread) { - joiner->join_status.thread = NULL; - joiner->join_status.ret = curthread->ret; - tid = _thr_setrunnable_unlocked(joiner); - } - THR_THREAD_UNLOCK(curthread, joiner); - _thr_ref_delete(curthread, joiner); - if (tid != -1) - thr_wake(tid); - } - THR_LOCK_SWITCH(curthread); - curthread->attr.flags |= PTHREAD_DETACHED; - } - - /* - * We can't hold the thread list lock while holding the - * scheduler lock. - */ - THR_UNLOCK_SWITCH(curthread); - DBG_MSG("Adding thread %p to GC list\n", thread); - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); - curthread->tlflags |= TLFLAGS_GC_SAFE; - THR_GCLIST_ADD(curthread); - THR_LOCK_RELEASE(curthread, &_thread_list_lock); - thr_exit(&curthread->isdead); - PANIC("thr_exit() returned"); -} - -void _thr_gc(struct pthread *curthread) { thread_gc(curthread); @@ -388,7 +186,7 @@ TAILQ_HEAD(, pthread) worklist; TAILQ_INIT(&worklist); - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); /* Check the threads waiting for GC. */ for (td = TAILQ_FIRST(&_thread_gc_list); td != NULL; td = td_next) { @@ -411,7 +209,7 @@ * in use. */ _thr_stack_free(&td->attr); - if (((td->attr.flags & PTHREAD_DETACHED) != 0) && + if (((td->tlflags & TLFLAGS_DETACHED) != 0) && (td->refcount == 0)) { /* * The thread has detached and is no longer @@ -422,7 +220,7 @@ TAILQ_INSERT_HEAD(&worklist, td, gcle); } } - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); while ((td = TAILQ_FIRST(&worklist)) != NULL) { TAILQ_REMOVE(&worklist, td, gcle); @@ -441,111 +239,6 @@ } } -static int -thr_timedout(struct pthread *curthread, struct timespec *curtime) -{ - if (curthread->wakeup_time.tv_sec < 0) - return (0); - else if (curthread->wakeup_time.tv_sec > curtime->tv_sec) - return (0); - else if ((curthread->wakeup_time.tv_sec == curtime->tv_sec) && - (curthread->wakeup_time.tv_nsec > curtime->tv_nsec)) - return (0); - else - return (1); -} - -/* - * This function waits for the smallest timeout value of any waiting - * thread, or until it receives a message from another KSE. - * - * This must be called with the scheduling lock held. - */ -static void -thr_wait(struct pthread *curthread, int sigseqno) -{ - struct timespec ts, ts_sleep; - - if ((curthread->wakeup_time.tv_sec < 0)) { - /* Limit sleep to no more than 1 minute. */ - ts_sleep.tv_sec = 60; - ts_sleep.tv_nsec = 0; - } else { - clock_gettime(CLOCK_REALTIME, &ts); - TIMESPEC_SUB(&ts_sleep, &curthread->wakeup_time, &ts); - if (ts_sleep.tv_sec > 60) { - ts_sleep.tv_sec = 60; - ts_sleep.tv_nsec = 0; - } - } - /* Don't sleep for negative times. */ - if ((ts_sleep.tv_sec >= 0) && (ts_sleep.tv_nsec >= 0)) { - /* prevent thr_sig_check_pending to run */ - curthread->critical_count++; - curthread->idle = 1; - THR_UNLOCK_SWITCH(curthread); - if (curthread->sigseqno != sigseqno) - ; /* don't sleep */ - else { - thr_suspend(&ts_sleep); - } - THR_LOCK_SWITCH(curthread); - curthread->idle = 0; - curthread->critical_count--; - } -} - -void -_thr_set_timeout(const struct timespec *timeout) -{ - struct pthread *curthread = _get_curthread(); - struct timespec ts; - - /* Reset the timeout flag for the running thread: */ - curthread->timeout = 0; - - /* Check if the thread is to wait forever: */ - if (timeout == NULL) { - /* - * Set the wakeup time to something that can be recognised as - * different to an actual time of day: - */ - curthread->wakeup_time.tv_sec = -1; - curthread->wakeup_time.tv_nsec = -1; - } - /* Check if no waiting is required: */ - else if ((timeout->tv_sec == 0) && (timeout->tv_nsec == 0)) { - /* Set the wake up time to 'immediately': */ - curthread->wakeup_time.tv_sec = 0; - curthread->wakeup_time.tv_nsec = 0; - } else { - /* Calculate the time for the current thread to wakeup: */ - clock_gettime(CLOCK_REALTIME, &ts); - TIMESPEC_ADD(&curthread->wakeup_time, &ts, timeout); - } -} - -void -_thr_setrunnable(struct pthread *curthread, struct pthread *thread) -{ - long tid; - - THR_THREAD_LOCK(curthread, thread); - tid = _thr_setrunnable_unlocked(thread); - THR_THREAD_UNLOCK(curthread, thread); - thr_wake(tid); -} - -long -_thr_setrunnable_unlocked(struct pthread *thread) -{ - if ((thread->flags & THR_FLAGS_SUSPENDED) != 0) - THR_SET_STATE(thread, PS_SUSPENDED); - else - THR_SET_STATE(thread, PS_RUNNING); - return (thread->tid); -} - struct pthread * _thr_alloc(struct pthread *curthread) { @@ -631,7 +324,7 @@ void _thr_link(struct pthread *curthread, struct pthread *thread) { - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); /* * Initialize the unique id (which GDB uses to track * threads), add the thread to the list of all threads, @@ -639,8 +332,10 @@ */ thread->uniqueid = next_uniqueid++; THR_LIST_ADD(thread); + if (thread->attr.flags & PTHREAD_DETACHED) + thread->tlflags |= TLFLAGS_DETACHED; _thread_active_threads++; - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); } /* @@ -649,10 +344,10 @@ void _thr_unlink(struct pthread *curthread, struct pthread *thread) { - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); THR_LIST_REMOVE(thread); _thread_active_threads--; - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); } void @@ -683,3 +378,71 @@ } return (NULL); } + +/* + * Find a thread in the linked list of active threads and add a reference + * to it. Threads with positive reference counts will not be deallocated + * until all references are released. + */ +int +_thr_ref_add(struct pthread *curthread, struct pthread *thread, + int include_dead) +{ + int ret; + + if (thread == NULL) + /* Invalid thread: */ + return (EINVAL); + + THREAD_LIST_LOCK(curthread); + if ((ret = _thr_find_thread(curthread, thread, include_dead)) == 0) { + thread->refcount++; + if (curthread != NULL) + curthread->critical_count++; + } + THREAD_LIST_UNLOCK(curthread); + + /* Return zero if the thread exists: */ + return (ret); +} + +void +_thr_ref_delete(struct pthread *curthread, struct pthread *thread) +{ + if (thread != NULL) { + THREAD_LIST_LOCK(curthread); + thread->refcount--; + if (curthread != NULL) + curthread->critical_count--; + if ((thread->refcount == 0) && + (thread->tlflags & TLFLAGS_GC_SAFE) != 0) + THR_GCLIST_ADD(thread); + THREAD_LIST_UNLOCK(curthread); + } +} + +int +_thr_find_thread(struct pthread *curthread, struct pthread *thread, + int include_dead) +{ + struct pthread *pthread; + + if (thread == NULL) + /* Invalid thread: */ + return (EINVAL); + + pthread = _thr_hash_find(thread); + if (pthread) { + if (include_dead == 0 && pthread->state == PS_DEAD) + pthread = NULL; + } + + /* Return zero if the thread exists: */ + return ((pthread != NULL) ? 0 : ESRCH); +} + +void +_thr_assert_lock_level() +{ + PANIC("lockleve <=0"); +} From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:05:20 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 39AC616A4FA; Fri, 31 Dec 2004 15:05:20 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1524A16A4D5 for ; Fri, 31 Dec 2004 15:05:20 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE34443D49 for ; Fri, 31 Dec 2004 15:05:19 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF5JRD009535 for ; Fri, 31 Dec 2004 15:05:19 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF5JAp009532 for perforce@freebsd.org; Fri, 31 Dec 2004 15:05:19 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:05:19 GMT Message-Id: <200412311505.iBVF5JAp009532@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67985 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:05:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=67985 Change 67985 by davidxu@davidxu_tiger on 2004/12/31 15:04:21 rework thread wakeup code, for priority mutex only. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#7 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#7 (text+ko) ==== @@ -216,8 +216,8 @@ } } -void -_thr_mutex_reinit(pthread_mutex_t *mutex) +int +_mutex_reinit(pthread_mutex_t *mutex) { umtx_init(&(*mutex)->m_lock); TAILQ_INIT(&(*mutex)->m_queue); @@ -227,6 +227,7 @@ (*mutex)->m_refcount = 0; (*mutex)->m_prio = 0; (*mutex)->m_saved_prio = 0; + return (0); } int @@ -490,6 +491,7 @@ mutex_lock_common(struct pthread *curthread, pthread_mutex_t *m, const struct timespec * abstime) { + long cycle; int ret = 0; THR_ASSERT((m != NULL) && (*m != NULL), @@ -515,10 +517,16 @@ #endif } else if (umtx_owner(&(*m)->m_lock) == curthread->tid && (*m)->m_type != PTHREAD_MUTEX_NORMAL) { + /* + * We don't do deadlock sleep in mutex_self_lock + * if type is normal, instead let umtx_lock sleep + * in kernel. + */ ret = mutex_self_lock(curthread, *m); } else { if (abstime == NULL) { - ret = UMTX_LOCK(&(*m)->m_lock, curthread->tid); + UMTX_LOCK(&(*m)->m_lock, curthread->tid); + ret = 0; } else { ret = umtx_timedlock(&(*m)->m_lock, curthread->tid, abstime); @@ -548,11 +556,6 @@ abstime->tv_nsec >= 1000000000)) return (EINVAL); - /* Reset the interrupted flag: */ - curthread->interrupted = 0; - curthread->timeout = 0; - curthread->wakeup_time.tv_sec = -1; - /* * Enter a loop waiting to become the mutex owner. We need a * loop in case the waiting thread is interrupted by a signal @@ -613,14 +616,6 @@ /* Unlock the mutex structure: */ THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } else { - /* Set the wakeup time: */ - if (abstime) { - curthread->wakeup_time.tv_sec = - abstime->tv_sec; - curthread->wakeup_time.tv_nsec = - abstime->tv_nsec; - } - /* * Join the queue of threads waiting to lock * the mutex and save a pointer to the mutex. @@ -629,23 +624,27 @@ curthread->data.mutex = *m; curthread->sigbackout = mutex_lock_backout; - /* - * This thread is active and is in a critical - * region (holding the mutex lock); we should - * be able to safely set the state. - */ if (curthread->active_priority > (*m)->m_prio) /* Adjust priorities: */ mutex_priority_adjust(curthread, *m); - THR_LOCK_SWITCH(curthread); - THR_SET_STATE(curthread, PS_MUTEX_WAIT); + THR_LOCK(curthread); + cycle = curthread->cycle; + THR_UNLOCK(curthread); /* Unlock the mutex structure: */ THR_LOCK_RELEASE(curthread, &(*m)->m_lock); - /* Schedule the next thread: */ - _thr_sched_switch_unlocked(curthread); + if (abstime) { + ret = umtx_timedwait((struct umtx *)&curthread->cycle, + cycle, abstime); + if (ret == EAGAIN) + ret = ETIMEDOUT; + else + ret = 0; + } else { + umtx_wait((struct umtx *)&curthread->cycle, cycle); + } if (THR_IN_MUTEXQ(curthread)) { THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); @@ -707,14 +706,6 @@ /* Unlock the mutex structure: */ THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } else { - /* Set the wakeup time: */ - if (abstime) { - curthread->wakeup_time.tv_sec = - abstime->tv_sec; - curthread->wakeup_time.tv_nsec = - abstime->tv_nsec; - } - /* * Join the queue of threads waiting to lock * the mutex and save a pointer to the mutex. @@ -726,20 +717,23 @@ /* Clear any previous error: */ curthread->error = 0; - /* - * This thread is active and is in a critical - * region (holding the mutex lock); we should - * be able to safely set the state. - */ + THR_LOCK(curthread); + cycle = curthread->cycle; + THR_UNLOCK(curthread); - THR_LOCK_SWITCH(curthread); - THR_SET_STATE(curthread, PS_MUTEX_WAIT); - /* Unlock the mutex structure: */ THR_LOCK_RELEASE(curthread, &(*m)->m_lock); - /* Schedule the next thread: */ - _thr_sched_switch_unlocked(curthread); + if (abstime) { + ret = umtx_timedwait((struct umtx *)&curthread->cycle, + cycle, abstime); + if (ret == EAGAIN) + ret = ETIMEDOUT; + else + ret = 0; + } else { + umtx_wait((struct umtx *)&curthread->cycle, cycle); + } curthread->data.mutex = NULL; if (THR_IN_MUTEXQ(curthread)) { @@ -774,28 +768,8 @@ break; } - } while (((*m)->m_owner != curthread) && (ret == 0) && - (curthread->interrupted == 0) && (curthread->timeout == 0)); - - if (ret == 0 && (*m)->m_owner != curthread && curthread->timeout) - ret = ETIMEDOUT; - - /* - * Check to see if this thread was interrupted and - * is still in the mutex queue of waiting threads: - */ - if (curthread->interrupted != 0) { - /* Remove this thread from the mutex queue. */ - THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); - if (THR_IN_SYNCQ(curthread)) - mutex_queue_remove(*m, curthread); - THR_LOCK_RELEASE(curthread, &(*m)->m_lock); + } while (((*m)->m_owner != curthread) && (ret == 0)); - /* Check for asynchronous cancellation. */ - if (curthread->continuation != NULL) - curthread->continuation((void *) curthread); - } - /* Return the completion status: */ return (ret); } @@ -971,15 +945,15 @@ * What SS2 define as a 'normal' mutex. Intentionally * deadlock on attempts to get a lock you already own. */ - - THR_LOCK_SWITCH(curthread); - THR_SET_STATE(curthread, PS_DEADLOCK); - - /* Unlock the mutex structure: */ - THR_LOCK_RELEASE(curthread, &m->m_lock); + if (m->m_protocol != PTHREAD_PRIO_NONE) { + /* Unlock the mutex structure: */ + THR_LOCK_RELEASE(curthread, &m->m_lock); + for (;;) + thr_suspend(NULL); + } else { + PANIC("shouldn't be here!\n"); + } - /* Schedule the next thread: */ - _thr_sched_switch_unlocked(curthread); ret = 0; break; @@ -1181,8 +1155,6 @@ /* Unlock the mutex structure: */ THR_LOCK_RELEASE(curthread, &(*m)->m_lock); - if (tid != -1) - thr_wake(tid); } /* Return the completion status: */ @@ -1712,7 +1684,8 @@ } /* Make the thread runnable and unlock the scheduling queue: */ - tid = _thr_setrunnable_unlocked(pthread); + pthread->cycle++; + umtx_wake((struct umtx *)&pthread->cycle, 1); THR_THREAD_UNLOCK(curthread, pthread); if (mutex->m_owner == pthread) @@ -1741,13 +1714,6 @@ while ((pthread = TAILQ_FIRST(&mutex->m_queue)) != NULL) { TAILQ_REMOVE(&mutex->m_queue, pthread, sqe); pthread->sflags &= ~THR_FLAGS_IN_SYNCQ; - - /* - * Only exit the loop if the thread hasn't been - * cancelled. - */ - if (pthread->interrupted == 0) - break; } return (pthread); From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:06:22 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F054816A4D0; Fri, 31 Dec 2004 15:06:21 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAEB516A4CE for ; Fri, 31 Dec 2004 15:06:21 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C54D43D3F for ; Fri, 31 Dec 2004 15:06:21 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF6LO0009648 for ; Fri, 31 Dec 2004 15:06:21 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF6L0q009645 for perforce@freebsd.org; Fri, 31 Dec 2004 15:06:21 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:06:21 GMT Message-Id: <200412311506.iBVF6L0q009645@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67986 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:06:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=67986 Change 67986 by davidxu@davidxu_tiger on 2004/12/31 15:05:22 now suspending a thread works, required by java. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_resume_np.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_resume_np.c#3 (text+ko) ==== @@ -35,29 +35,25 @@ #include #include "thr_private.h" -static long resume_common(struct pthread *); - __weak_reference(_pthread_resume_np, pthread_resume_np); __weak_reference(_pthread_resume_all_np, pthread_resume_all_np); +static void inline resume_common(struct pthread *thread); /* Resume a thread: */ int _pthread_resume_np(pthread_t thread) { struct pthread *curthread = _get_curthread(); - long tid = -1; int ret; /* Add a reference to the thread: */ if ((ret = _thr_ref_add(curthread, thread, /*include dead*/0)) == 0) { /* Lock the threads scheduling queue: */ THR_THREAD_LOCK(curthread, thread); - tid = resume_common(thread); + resume_common(thread); THR_THREAD_UNLOCK(curthread, thread); _thr_ref_delete(curthread, thread); - if (tid !=-1) - thr_wake(tid); } return (ret); } @@ -67,38 +63,28 @@ { struct pthread *curthread = _get_curthread(); struct pthread *thread; - long tid; /* Take the thread list lock: */ - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); TAILQ_FOREACH(thread, &_thread_list, tle) { if (thread != curthread) { THR_THREAD_LOCK(curthread, thread); - tid = resume_common(thread); + resume_common(thread); THR_THREAD_UNLOCK(curthread, thread); - if (tid != -1) - thr_wake(tid); } } /* Release the thread list lock: */ - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); } -static long +static void inline resume_common(struct pthread *thread) { /* Clear the suspend flag: */ - thread->flags &= ~THR_FLAGS_SUSPENDED; - - /* - * If the thread's state is suspended, that means it is - * now runnable but not in any scheduling queue. Set the - * state to running and insert it into the run queue. - */ - if (thread->state == PS_SUSPENDED) - return (_thr_setrunnable_unlocked(thread)); - else - return (-1); + thread->flags &= ~THR_FLAGS_NEED_SUSPEND; + thread->cycle++; + umtx_wake((struct umtx *)&thread->cycle, 1); + thr_kill(thread->tid, SIGCANCEL); } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:06:23 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D3D3116A514; Fri, 31 Dec 2004 15:06:22 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 154CF16A4DF for ; Fri, 31 Dec 2004 15:06:22 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E817A43D46 for ; Fri, 31 Dec 2004 15:06:21 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF6LOE009654 for ; Fri, 31 Dec 2004 15:06:21 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF6L3A009651 for perforce@freebsd.org; Fri, 31 Dec 2004 15:06:21 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:06:21 GMT Message-Id: <200412311506.iBVF6L3A009651@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67989 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:06:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=67989 Change 67989 by davidxu@davidxu_tiger on 2004/12/31 15:05:58 now suspending a thread is supported, required by java. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_suspend_np.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_suspend_np.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ #include #include "thr_private.h" -static void suspend_common(struct pthread *thread); +static inline void suspend_common(struct pthread *thread); __weak_reference(_pthread_suspend_np, pthread_suspend_np); __weak_reference(_pthread_suspend_all_np, pthread_suspend_all_np); @@ -73,7 +73,7 @@ struct pthread *thread; /* Take the thread list lock: */ - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); TAILQ_FOREACH(thread, &_thread_list, tle) { if (thread != curthread) { @@ -84,16 +84,14 @@ } /* Release the thread list lock: */ - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); } -void +static inline void suspend_common(struct pthread *thread) { - if ((thread->state != PS_DEAD) && - (thread->state != PS_DEADLOCK) && - ((thread->flags & THR_FLAGS_EXITING) == 0)) { - thread->flags |= THR_FLAGS_SUSPENDED; - /* XXX how ? */ + if (thread->state != PS_DEAD) { + thread->flags |= THR_FLAGS_NEED_SUSPEND; + thr_kill(thread->tid, SIGCANCEL); } } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:07:24 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6DB4916A4D0; Fri, 31 Dec 2004 15:07:24 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DA9C16A4CE for ; Fri, 31 Dec 2004 15:07:24 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05B7543D2D for ; Fri, 31 Dec 2004 15:07:24 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF7N19009708 for ; Fri, 31 Dec 2004 15:07:23 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF7NQE009705 for perforce@freebsd.org; Fri, 31 Dec 2004 15:07:23 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:07:23 GMT Message-Id: <200412311507.iBVF7NQE009705@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67991 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:07:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=67991 Change 67991 by davidxu@davidxu_tiger on 2004/12/31 15:06:59 remove sched_yield() wrapper, 1:1 no longer need this. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_yield.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_yield.c#3 (text+ko) ==== @@ -34,15 +34,8 @@ #include #include "thr_private.h" -__weak_reference(_sched_yield, sched_yield); __weak_reference(_pthread_yield, pthread_yield); -int -_sched_yield(void) -{ - return (__sys_sched_yield()); -} - /* Draft 4 yield */ void _pthread_yield(void) From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:08:26 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 04B7716A4D0; Fri, 31 Dec 2004 15:08:26 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD3FF16A4CE for ; Fri, 31 Dec 2004 15:08:25 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9F6843D1F for ; Fri, 31 Dec 2004 15:08:25 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF8PZE009728 for ; Fri, 31 Dec 2004 15:08:25 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF8P0L009725 for perforce@freebsd.org; Fri, 31 Dec 2004 15:08:25 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:08:25 GMT Message-Id: <200412311508.iBVF8P0L009725@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67992 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:08:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=67992 Change 67992 by davidxu@davidxu_tiger on 2004/12/31 15:07:44 use THREAD_LIST_LOCK, THREAD_LIST_UNLOCK macro. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_stack.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_stack.c#3 (text+ko) ==== @@ -152,7 +152,7 @@ * Use the garbage collector lock for synchronization of the * spare stack lists and allocations from usrstack. */ - THR_LOCK_ACQUIRE(curthread, &_thread_list_lock); + THREAD_LIST_LOCK(curthread); /* * If the stack and guard sizes are default, try to allocate a stack * from the default-size stack cache: @@ -182,7 +182,7 @@ } if (attr->stackaddr_attr != NULL) { /* A cached stack was found. Release the lock. */ - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); } else { /* Allocate a stack from usrstack. */ @@ -203,7 +203,7 @@ last_stack -= (stacksize + guardsize); /* Release the lock before mmap'ing it. */ - THR_LOCK_RELEASE(curthread, &_thread_list_lock); + THREAD_LIST_UNLOCK(curthread); /* Map the stack and guard page together, and split guard page from allocated space: */ From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:08:27 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DF13316A4DE; Fri, 31 Dec 2004 15:08:26 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21D2916A4DA for ; Fri, 31 Dec 2004 15:08:26 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1129B43D1F for ; Fri, 31 Dec 2004 15:08:26 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF8PIf009735 for ; Fri, 31 Dec 2004 15:08:25 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF8PpI009731 for perforce@freebsd.org; Fri, 31 Dec 2004 15:08:25 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:08:25 GMT Message-Id: <200412311508.iBVF8PpI009731@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67993 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:08:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=67993 Change 67993 by davidxu@davidxu_tiger on 2004/12/31 15:08:20 use name mutex_reinit(). Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_spinlock.c#5 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_spinlock.c#5 (text+ko) ==== @@ -129,9 +129,9 @@ int i; if (initialized != 0) { - _thr_mutex_reinit(&spinlock_static_lock); + _mutex_reinit(&spinlock_static_lock); for (i = 0; i < spinlock_count; i++) - _thr_mutex_reinit(&extra[i].lock); + _mutex_reinit(&extra[i].lock); } else { if (_pthread_mutex_init(&spinlock_static_lock, NULL)) PANIC("Cannot initialize spinlock_static_lock"); From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:09:28 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7D66F16A4D0; Fri, 31 Dec 2004 15:09:28 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2FAB16A4CE for ; Fri, 31 Dec 2004 15:09:27 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C34D543D45 for ; Fri, 31 Dec 2004 15:09:27 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVF9Re4009754 for ; Fri, 31 Dec 2004 15:09:27 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVF9RZN009751 for perforce@freebsd.org; Fri, 31 Dec 2004 15:09:27 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:09:27 GMT Message-Id: <200412311509.iBVF9RZN009751@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67994 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:09:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=67994 Change 67994 by davidxu@davidxu_tiger on 2004/12/31 15:09:21 cancellation save/restore protocol is changed, followup. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sem.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sem.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * 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/libpthread/thread/thr_sem.c,v 1.15 2004/02/06 15:20:56 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_sem.c,v 1.16 2004/12/18 18:07:37 deischen Exp $ */ #include "namespace.h" @@ -140,16 +140,17 @@ _sem_wait(sem_t *sem) { struct pthread *curthread; + int oldcancel; int retval; if (sem_check_validity(sem) != 0) return (-1); + curthread = _get_curthread(); if ((*sem)->syssem != 0) { - curthread = _get_curthread(); - _thr_cancel_enter(curthread); + oldcancel = _thr_cancel_enter(curthread); retval = ksem_wait((*sem)->semid); - _thr_cancel_leave(curthread, retval != 0); + _thr_cancel_leave(curthread, oldcancel); } else { pthread_testcancel(); @@ -157,9 +158,9 @@ while ((*sem)->count <= 0) { (*sem)->nwaiters++; - pthread_cleanup_push(decrease_nwaiters, sem); + THR_CLEANUP_PUSH(curthread, decrease_nwaiters, sem); pthread_cond_wait(&(*sem)->gtzero, &(*sem)->lock); - pthread_cleanup_pop(0); + THR_CLEANUP_POP(curthread, 0); (*sem)->nwaiters--; } (*sem)->count--; @@ -177,6 +178,7 @@ { struct pthread *curthread; int retval; + int oldcancel; int timeout_invalid; if (sem_check_validity(sem) != 0) @@ -184,9 +186,9 @@ if ((*sem)->syssem != 0) { curthread = _get_curthread(); - _thr_cancel_enter(curthread); + oldcancel = _thr_cancel_enter(curthread); retval = ksem_timedwait((*sem)->semid, abs_timeout); - _thr_cancel_leave(curthread, retval != 0); + _thr_cancel_leave(curthread, oldcancel); } else { /* From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:10:30 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C02D116A4D0; Fri, 31 Dec 2004 15:10:29 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9608D16A4CE for ; Fri, 31 Dec 2004 15:10:29 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84DCA43D39 for ; Fri, 31 Dec 2004 15:10:29 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFATEm009813 for ; Fri, 31 Dec 2004 15:10:29 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFATYm009810 for perforce@freebsd.org; Fri, 31 Dec 2004 15:10:29 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:10:29 GMT Message-Id: <200412311510.iBVFATYm009810@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67995 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:10:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=67995 Change 67995 by davidxu@davidxu_tiger on 2004/12/31 15:10:19 only check PS_DEAD is enough, I hope the state field will go away. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_setschedparam.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_setschedparam.c#3 (text+ko) ==== @@ -64,9 +64,7 @@ * its priority: */ THR_THREAD_LOCK(curthread, pthread); - if ((pthread->state == PS_DEAD) || - (pthread->state == PS_DEADLOCK) || - ((pthread->flags & THR_FLAGS_EXITING) != 0)) { + if (pthread->state == PS_DEAD) { THR_THREAD_UNLOCK(curthread, pthread); _thr_ref_delete(curthread, pthread); return (ESRCH); From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:11:32 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B0F0016A4D1; Fri, 31 Dec 2004 15:11:31 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D34D16A4CE for ; Fri, 31 Dec 2004 15:11:31 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4568C43D39 for ; Fri, 31 Dec 2004 15:11:31 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFBV0B009875 for ; Fri, 31 Dec 2004 15:11:31 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFBUiP009872 for perforce@freebsd.org; Fri, 31 Dec 2004 15:11:30 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:11:30 GMT Message-Id: <200412311511.iBVFBUiP009872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67996 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:11:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=67996 Change 67996 by davidxu@davidxu_tiger on 2004/12/31 15:11:03 use thr_kill kernel api. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_kill.c#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_kill.c#2 (text+ko) ==== @@ -57,7 +57,7 @@ == 0) { if ((sig > 0) && (_thread_sigact[sig - 1].sa_handler != SIG_IGN)) - _thr_sig_send(pthread, sig); + thr_kill(pthread->tid, sig); _thr_ref_delete(curthread, pthread); } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:11:33 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0435916A4F2; Fri, 31 Dec 2004 15:11:32 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4C2616A4CF for ; Fri, 31 Dec 2004 15:11:31 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92E5143D39 for ; Fri, 31 Dec 2004 15:11:31 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFBVwI009881 for ; Fri, 31 Dec 2004 15:11:31 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFBVAk009878 for perforce@freebsd.org; Fri, 31 Dec 2004 15:11:31 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:11:31 GMT Message-Id: <200412311511.iBVFBVAk009878@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67997 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:11:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=67997 Change 67997 by davidxu@davidxu_tiger on 2004/12/31 15:11:30 call _sigprocmask. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigmask.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sigmask.c#3 (text+ko) ==== @@ -42,16 +42,14 @@ __weak_reference(_pthread_sigmask, pthread_sigmask); +extern int +_sigprocmask(int how, const sigset_t *set, sigset_t *oset); + int _pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { - struct pthread *curthread = _get_curthread(); - int ret; - - ret = __sys_sigprocmask(how, set, oset); - if (ret != 0) - ret = errno; - /* Get a fresh copy */ - __sys_sigprocmask(SIG_SETMASK, NULL, &curthread->sigmask); - return (ret); + /* use our overridden verion of _sigprocmask */ + if (_sigprocmask(how, set, oset)) + return (errno); + return (0); } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:12:34 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A833116A4D0; Fri, 31 Dec 2004 15:12:33 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6938016A4CE for ; Fri, 31 Dec 2004 15:12:33 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55AE443D1D for ; Fri, 31 Dec 2004 15:12:33 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFCX0H009906 for ; Fri, 31 Dec 2004 15:12:33 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFCXPt009903 for perforce@freebsd.org; Fri, 31 Dec 2004 15:12:33 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:12:33 GMT Message-Id: <200412311512.iBVFCXPt009903@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67998 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:12:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=67998 Change 67998 by davidxu@davidxu_tiger on 2004/12/31 15:12:07 follow changes made in header file. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_barrier.c#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_barrier.c#2 (text+ko) ==== @@ -81,10 +81,10 @@ return (ret); } - bar->b_waiters = 0; - bar->b_count = count; - bar->b_generation = 0; - *barrier = bar; + bar->b_waiters = 0; + bar->b_count = count; + bar->b_cycle = 0; + *barrier = bar; return (0); } @@ -92,7 +92,7 @@ int _pthread_barrier_wait(pthread_barrier_t *barrier) { - int ret, gen; + int ret, cycle; pthread_barrier_t bar; if (barrier == NULL || *barrier == NULL) @@ -104,18 +104,18 @@ if (++bar->b_waiters == bar->b_count) { /* Current thread is lastest thread */ - bar->b_generation++; + bar->b_cycle++; bar->b_waiters = 0; ret = _pthread_cond_broadcast(&bar->b_cond); if (ret == 0) ret = PTHREAD_BARRIER_SERIAL_THREAD; } else { - gen = bar->b_generation; + cycle = bar->b_cycle; do { ret = _pthread_cond_wait( &bar->b_cond, &bar->b_lock); - /* test generation to avoid bogus wakeup */ - } while (ret == 0 && gen == bar->b_generation); + /* test cycle to avoid bogus wakeup */ + } while (ret == 0 && cycle == bar->b_cycle); } _pthread_mutex_unlock(&bar->b_lock); return (ret); From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:13:35 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FFBC16A4D0; Fri, 31 Dec 2004 15:13:35 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E35216A4CE for ; Fri, 31 Dec 2004 15:13:35 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CD7643D31 for ; Fri, 31 Dec 2004 15:13:35 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFDYai009945 for ; Fri, 31 Dec 2004 15:13:34 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFDY2K009942 for perforce@freebsd.org; Fri, 31 Dec 2004 15:13:34 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:13:34 GMT Message-Id: <200412311513.iBVFDY2K009942@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67999 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:13:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=67999 Change 67999 by davidxu@davidxu_tiger on 2004/12/31 15:13:10 clear more fields in child process. use mutex_reinit(). Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_fork.c#5 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_fork.c#5 (text+ko) ==== @@ -57,7 +57,6 @@ sigset_t sigset, oldset; struct pthread *curthread; struct pthread_atfork *af; - struct pthread_mutex *m; pid_t ret; int errsave; @@ -88,7 +87,10 @@ /* Child process */ errsave = errno; - _thr_mutex_reinit(&_thr_atfork_mutex); + curthread->critical_count = 0; + curthread->locklevel = 0; + + _mutex_reinit(&_thr_atfork_mutex); /* Reinitialize lib kernel. */ _thr_single_thread(curthread); From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:14:37 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5793B16A4D0; Fri, 31 Dec 2004 15:14:37 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1920E16A4CE for ; Fri, 31 Dec 2004 15:14:37 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFB6043D49 for ; Fri, 31 Dec 2004 15:14:36 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFEaQM010023 for ; Fri, 31 Dec 2004 15:14:36 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFEagZ010020 for perforce@freebsd.org; Fri, 31 Dec 2004 15:14:36 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:14:36 GMT Message-Id: <200412311514.iBVFEagZ010020@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 68000 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:14:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=68000 Change 68000 by davidxu@davidxu_tiger on 2004/12/31 15:14:23 Some source files are merged. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/Makefile.inc#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/Makefile.inc#3 (text+ko) ==== @@ -4,111 +4,53 @@ .PATH: ${.CURDIR}/thread SRCS+= \ - thr_accept.c \ - thr_aio_suspend.c \ thr_atfork.c \ - thr_attr_destroy.c \ - thr_attr_init.c \ - thr_attr_get_np.c \ - thr_attr_getdetachstate.c \ - thr_attr_getguardsize.c \ - thr_attr_getinheritsched.c \ - thr_attr_getschedparam.c \ - thr_attr_getschedpolicy.c \ - thr_attr_getscope.c \ - thr_attr_getstack.c \ - thr_attr_getstackaddr.c \ - thr_attr_getstacksize.c \ - thr_attr_setcreatesuspend_np.c \ - thr_attr_setdetachstate.c \ - thr_attr_setguardsize.c \ - thr_attr_setinheritsched.c \ - thr_attr_setschedparam.c \ - thr_attr_setschedpolicy.c \ - thr_attr_setscope.c \ - thr_attr_setstack.c \ - thr_attr_setstackaddr.c \ - thr_attr_setstacksize.c \ + thr_attr.c \ thr_autoinit.c \ thr_barrier.c \ thr_barrierattr.c \ thr_cancel.c \ thr_clean.c \ - thr_close.c \ thr_concurrency.c \ thr_cond.c \ - thr_condattr_destroy.c \ - thr_condattr_init.c \ - thr_connect.c \ - thr_creat.c \ + thr_condattr.c \ thr_create.c \ thr_detach.c \ thr_equal.c \ - thr_execve.c \ thr_exit.c \ - thr_fcntl.c \ - thr_find_thread.c \ thr_fork.c \ - thr_fsync.c \ thr_getprio.c \ thr_getschedparam.c \ - thr_info.c \ thr_init.c \ thr_join.c \ thr_kern.c \ thr_kill.c \ thr_main_np.c \ - thr_mattr_init.c \ - thr_mattr_kind_np.c \ - thr_msync.c \ thr_multi_np.c \ thr_mutex.c \ + thr_mutexattr.c \ thr_mutex_prioceiling.c \ thr_mutex_protocol.c \ - thr_mutexattr_destroy.c \ - thr_nanosleep.c \ thr_once.c \ - thr_open.c \ - thr_pause.c \ - thr_poll.c \ thr_printf.c \ - thr_pselect.c \ thr_pspinlock.c \ - thr_raise.c \ - thr_read.c \ - thr_readv.c \ thr_resume_np.c \ thr_rtld.c \ thr_rwlock.c \ thr_rwlockattr.c \ - thr_select.c \ thr_self.c \ thr_sem.c \ thr_seterrno.c \ thr_setprio.c \ thr_setschedparam.c \ thr_sig.c \ - thr_sigaction.c \ - thr_sigaltstack.c \ thr_sigmask.c \ - thr_sigpending.c \ - thr_sigprocmask.c \ - thr_sigsuspend.c \ - thr_sigwait.c \ thr_single_np.c \ - thr_sleep.c \ thr_spec.c \ thr_spinlock.c \ thr_stack.c \ + thr_syscalls.c \ thr_suspend_np.c \ thr_switch_np.c \ - thr_system.c \ thr_symbols.c \ - thr_tcdrain.c \ - thr_vfork.c \ - thr_wait.c \ - thr_wait4.c \ - thr_waitpid.c \ - thr_write.c \ - thr_writev.c \ thr_yield.c From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:19:44 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D378F16A4D0; Fri, 31 Dec 2004 15:19:43 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94C1B16A4CE for ; Fri, 31 Dec 2004 15:19:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7054D43D1D for ; Fri, 31 Dec 2004 15:19:43 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFJhaC010151 for ; Fri, 31 Dec 2004 15:19:43 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFJhm1010148 for perforce@freebsd.org; Fri, 31 Dec 2004 15:19:43 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:19:43 GMT Message-Id: <200412311519.iBVFJhm1010148@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 68001 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:19:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=68001 Change 68001 by davidxu@davidxu_tiger on 2004/12/31 15:19:42 delete. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/sys/lock.h#6 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:20:46 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A1F2516A4D0; Fri, 31 Dec 2004 15:20:45 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6097516A4CE for ; Fri, 31 Dec 2004 15:20:45 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 324C743D1D for ; Fri, 31 Dec 2004 15:20:45 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFKjBl010252 for ; Fri, 31 Dec 2004 15:20:45 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFKi2x010249 for perforce@freebsd.org; Fri, 31 Dec 2004 15:20:44 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:20:44 GMT Message-Id: <200412311520.iBVFKi2x010249@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 68002 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:20:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=68002 Change 68002 by davidxu@davidxu_tiger on 2004/12/31 15:19:59 delete. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/sys/lock.c#3 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:21:47 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 49FB616A4D0; Fri, 31 Dec 2004 15:21:47 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2506916A4CE for ; Fri, 31 Dec 2004 15:21:47 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E52D343D4C for ; Fri, 31 Dec 2004 15:21:46 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFLkh1010322 for ; Fri, 31 Dec 2004 15:21:46 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFLkVq010319 for perforce@freebsd.org; Fri, 31 Dec 2004 15:21:46 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:21:46 GMT Message-Id: <200412311521.iBVFLkVq010319@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 68003 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:21:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=68003 Change 68003 by davidxu@davidxu_tiger on 2004/12/31 15:20:48 lock.[hc] are no longer needed. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/sys/Makefile.inc#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/sys/Makefile.inc#2 (text+ko) ==== @@ -2,4 +2,4 @@ .PATH: ${.CURDIR}/sys -SRCS+= lock.c thr_error.c +SRCS+= thr_error.c From owner-p4-projects@FreeBSD.ORG Fri Dec 31 15:25:53 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28B9016A4D0; Fri, 31 Dec 2004 15:25:53 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD76416A4CE for ; Fri, 31 Dec 2004 15:25:52 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EAF343D48 for ; Fri, 31 Dec 2004 15:25:52 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVFPqGM010487 for ; Fri, 31 Dec 2004 15:25:52 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVFPq41010484 for perforce@freebsd.org; Fri, 31 Dec 2004 15:25:52 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 15:25:52 GMT Message-Id: <200412311525.iBVFPq41010484@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 68005 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 15:25:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=68005 Change 68005 by davidxu@davidxu_tiger on 2004/12/31 15:25:26 Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_atfork.c#4 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_autoinit.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_barrierattr.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_concurrency.c#3 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_condattr.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_equal.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_getprio.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_getschedparam.c#3 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_main_np.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_multi_np.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex_prioceiling.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex_protocol.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutexattr.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_once.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_open.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_printf.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_pspinlock.c#6 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_rtld.c#3 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_rwlock.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_rwlockattr.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_self.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_seterrno.c#3 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_setprio.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_single_np.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_spec.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_switch_np.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_symbols.c#3 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_syscalls.c#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_wait4.c#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_atfork.c#4 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_attr.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_autoinit.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_barrierattr.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_concurrency.c#3 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_condattr.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_equal.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_getprio.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_getschedparam.c#3 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_main_np.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_multi_np.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex_prioceiling.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex_protocol.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutexattr.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_once.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_open.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_printf.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_pspinlock.c#6 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_rtld.c#3 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_rwlock.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_rwlockattr.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_self.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_seterrno.c#3 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_setprio.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_single_np.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_spec.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_switch_np.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_symbols.c#3 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_syscalls.c#2 (text+ko) ==== ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_wait4.c#2 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Fri Dec 31 18:32:40 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C31A916A4D1; Fri, 31 Dec 2004 18:32:39 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D23B16A4CE for ; Fri, 31 Dec 2004 18:32:39 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 644B343D39 for ; Fri, 31 Dec 2004 18:32:39 +0000 (GMT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVIWdbH026658 for ; Fri, 31 Dec 2004 18:32:39 GMT (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVIWd65026655 for perforce@freebsd.org; Fri, 31 Dec 2004 18:32:39 GMT (envelope-from areisse@nailabs.com) Date: Fri, 31 Dec 2004 18:32:39 GMT Message-Id: <200412311832.iBVIWd65026655@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 68011 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 18:32:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=68011 Change 68011 by areisse@areisse_tislabs on 2004/12/31 18:32:14 sebsd policy: apache.fc had wrong types and paths. Affected files ... .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/file_contexts/program/apache.fc#5 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/file_contexts/program/apache.fc#5 (text+ko) ==== @@ -3,14 +3,14 @@ /usr/local/www/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_t /usr/local/www/icons(/.*)? system_u:object_r:httpd_sys_content_t #/var/cache/httpd(/.*)? system_u:object_r:httpd_cache_t -/usr/local/etc/apache system_u:object_r:httpd_config_t +/usr/local/etc/apache(/.*)? system_u:object_r:httpd_config_t /usr/local/libexec/apache(/.*)? system_u:object_r:httpd_modules_t /usr/local/sbin/httpd system_u:object_r:httpd_exec_t #/usr/sbin/suexec system_u:object_r:httpd_suexec_exec_t #/usr/lib/cgi-bin/(nph-)?cgiwrap(d)? system_u:object_r:httpd_suexec_exec_t #/usr/lib/apache(2)?/suexec(2)? system_u:object_r:httpd_suexec_exec_t -/var/log/httpd-.* system_u:object_r:httpd_log_files_t -#/var/log/apache(2)?(/.*)? system_u:object_r:httpd_log_files_t -#/var/log/cgiwrap\.log.* system_u:object_r:httpd_log_files_t +/var/log/httpd-.* system_u:object_r:httpd_log_t +#/var/log/apache(2)?(/.*)? system_u:object_r:httpd_log_t +#/var/log/cgiwrap\.log.* system_u:object_r:httpd_log_t #/var/cache/ssl.*\.sem system_u:object_r:httpd_cache_t /var/run/apache(2)?.pid.* system_u:object_r:httpd_var_run_t From owner-p4-projects@FreeBSD.ORG Fri Dec 31 18:47:59 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 75E1A16A4D0; Fri, 31 Dec 2004 18:47:59 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E2F516A4CE for ; Fri, 31 Dec 2004 18:47:59 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2F0643D39 for ; Fri, 31 Dec 2004 18:47:58 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVIlwZZ027156 for ; Fri, 31 Dec 2004 18:47:58 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVIlw0R027153 for perforce@freebsd.org; Fri, 31 Dec 2004 18:47:58 GMT (envelope-from jhb@freebsd.org) Date: Fri, 31 Dec 2004 18:47:58 GMT Message-Id: <200412311847.iBVIlw0R027153@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 68013 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 18:48:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=68013 Change 68013 by jhb@jhb_slimer on 2004/12/31 18:47:24 IFC @68012. Affected files ... .. //depot/projects/smpng/sys/conf/files#131 integrate .. //depot/projects/smpng/sys/conf/kmod.mk#39 integrate .. //depot/projects/smpng/sys/dev/bktr/CHANGELOG.TXT#3 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#70 integrate .. //depot/projects/smpng/sys/kern/kern_sysctl.c#44 integrate .. //depot/projects/smpng/sys/kern/sched_ule.c#50 integrate .. //depot/projects/smpng/sys/modules/usb/Makefile#8 integrate .. //depot/projects/smpng/sys/netipx/ipx_input.c#11 integrate .. //depot/projects/smpng/sys/netipx/ipx_pcb.c#14 integrate .. //depot/projects/smpng/sys/netipx/ipx_usrreq.c#18 integrate .. //depot/projects/smpng/sys/netipx/ipx_var.h#6 integrate .. //depot/projects/smpng/sys/netipx/spx_usrreq.c#17 integrate .. //depot/projects/smpng/sys/sys/copyright.h#6 integrate .. //depot/projects/smpng/sys/tools/usbdevs2h.awk#2 integrate Differences ... ==== //depot/projects/smpng/sys/conf/files#131 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.976 2004/12/28 00:07:56 rik Exp $ +# $FreeBSD: src/sys/conf/files,v 1.977 2004/12/30 23:19:40 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -52,9 +52,14 @@ clean "pccarddevs.h" usbdevs.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ - compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ + compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ + no-obj no-implicit-rule before-depend \ + clean "usbdevs.h" +usbdevs_data.h optional usb \ + dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ + compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -d" \ no-obj no-implicit-rule before-depend \ - clean "usbdevs.h usbdevs_data.h" + clean "usbdevs_data.h" kern/device_if.m standard kern/bus_if.m standard kern/clock_if.m optional genclock ==== //depot/projects/smpng/sys/conf/kmod.mk#39 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $FreeBSD: src/sys/conf/kmod.mk,v 1.176 2004/12/08 07:23:12 ru Exp $ +# $FreeBSD: src/sys/conf/kmod.mk,v 1.177 2004/12/30 23:22:08 imp Exp $ # # The include file handles building and installing loadable # kernel modules. @@ -340,13 +340,9 @@ ${AWK} -f @/tools/vnode_if.awk @/kern/vnode_if.src -q .endif -.for _i in mii pccard usb +.for _i in mii pccard .if ${SRCS:M${_i}devs.h} != "" CLEANFILES+= ${_i}devs.h -_i= ${_i:Musb} -.if !empty(_i) -CLEANFILES+= ${_i}devs_data.h -.endif .if !exists(@) ${_i}devs.h: @ .else @@ -356,6 +352,26 @@ .endif .endfor # _i +.if ${SRCS:Musbdevs.h} != "" +CLEANFILES+= usbdevs.h +.if !exists(@) +usbdevs.h: @ +.else +usbdevs.h: @/tools/usbdevs2h.awk @/dev/usb/usbdevs +.endif + ${AWK} -f @/tools/usbdevs2h.awk @/dev/usb/usbdevs -h +.endif + +.if ${SRCS:Musbdevs_data.h} != "" +CLEANFILES+= usbdevs_data.h +.if !exists(@) +usbdevs_data.h: @ +.else +usbdevs_data.h: @/tools/usbdevs2h.awk @/dev/usb/usbdevs +.endif + ${AWK} -f @/tools/usbdevs2h.awk @/dev/usb/usbdevs -d +.endif + .if ${SRCS:Macpi_quirks.h} != "" CLEANFILES+= acpi_quirks.h .if !exists(@) ==== //depot/projects/smpng/sys/dev/bktr/CHANGELOG.TXT#3 (text+ko) ==== @@ -1,6 +1,8 @@ -/* $FreeBSD: src/sys/dev/bktr/CHANGELOG.TXT,v 1.19 2002/05/16 22:43:18 eric Exp $ */ +/* $FreeBSD: src/sys/dev/bktr/CHANGELOG.TXT,v 1.20 2004/12/31 09:18:29 julian Exp $ */ /* * MAINTAINER = Roger Hardiman + * Newsflash: Roger is temorararily out of touch and unable + * to maintain this.. */ /* @@ -518,4 +520,5 @@ support for audio on Hauppauge cards without the audio mux. The MSP is used for audio selection. (the 44xxx models) - +[see http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/bktr/ +for newer change logs ] ==== //depot/projects/smpng/sys/dev/usb/usbdevs#70 (text+ko) ==== @@ -1,5 +1,5 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.220 2004/12/29 06:21:41 imp Exp $ -/* $NetBSD: usbdevs,v 1.388 2004/11/05 13:51:16 scw Exp $ */ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.221 2004/12/31 18:37:49 imp Exp $ +/* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -411,8 +411,10 @@ vendor EXTENDED 0x08e9 Extended Systems vendor MSYSTEMS 0x08ec M-Systems vendor AUTHENTEC 0x08ff AuthenTec +vendor AUDIOTECHNICA 0x0909 Audio-Technica vendor TRUMPION 0x090a Trumpion Microelectronics vendor ALATION 0x0910 Alation Systems +vendor CONCORDCAMERA 0x0919 Concord Camera vendor GOHUBS 0x0921 GoHubs vendor BIOMETRIC 0x0929 American Biometric Company vendor TOSHIBA 0x0930 Toshiba Corporation @@ -423,8 +425,11 @@ vendor BLUEWATER 0x0956 BlueWater Systems vendor AGILENT 0x0957 Agilent Technologies vendor PORTSMITH 0x095a Portsmith +vendor ACERW 0x0967 Acer vendor ADIRONDACK 0x0976 Adirondack Wire & Cable vendor BECKHOFF 0x0978 Beckhoff +vendor MINDSATWORK 0x097a Minds At Work +vendor POINTCHIPS 0x09a6 PointChips vendor INTERSIL 0x09aa Intersil vendor ALTIUS 0x09b3 Altius Solutions vendor ARRIS 0x09c1 Arris Interactive @@ -437,10 +442,11 @@ vendor ARESCOM 0x09f5 ARESCOM vendor BAY 0x09f9 Bay Associates vendor ALTERA 0x09fb Altera -vendor CSR 0x0a12 Cambridge Silicon Radio Ltd. +vendor CSR 0x0a12 Cambridge Silicon Radio vendor TREK 0x0a16 Trek Technology vendor ASAHIOPTICAL 0x0a17 Asahi Optical vendor BOCASYSTEMS 0x0a43 Boca Systems +vendor MEDIAGEAR 0x0a48 MediaGear vendor BROADCOM 0x0a5c Broadcom vendor GREENHOUSE 0x0a6b GREENHOUSE vendor GEOCAST 0x0a79 Geocast Network Systems @@ -448,33 +454,52 @@ vendor VODAFONE 0x0af0 Vodafone vendor TODOS 0x0b0c Todos Data System vendor SIIG2 0x0b39 SIIG +vendor TEKRAM 0x0b3b Tekram Technology vendor HAL 0x0b41 HAL Corporation -vendor EMS 0x0b43 EMS Production Ltd. +vendor EMS 0x0b43 EMS Production vendor NEC2 0x0b62 NEC vendor ATI2 0x0b6f ATI +vendor ZEEVO 0x0b7a Zeevo, Inc. +vendor KURUSUGAWA 0x0b7e Kurusugawa Electronics, Inc. vendor ASIX 0x0b95 ASIX Electronics +vendor USR 0x0baf U.S. Robotics vendor REALTEK 0x0bda RealTek +vendor ADDONICS2 0x0bf6 Addonics Technology vendor AGATE 0x0c08 Agate Technologies vendor DMI 0x0c0b DMI +vendor CHICONY2 0x0c45 Chicony Electronics +vendor SEALEVEL 0x0c52 Sealevel System vendor LUWEN 0x0c76 Luwen +vendor ZCOM 0x0cde Z-Com +vendor TANGTOP 0x0d3d Tangtop vendor SMC3 0x0d5c Standard Microsystems vendor PNY 0x0d7d PNY +vendor ACDC 0x0d7e American Computer & Digital Components +vendor ABC 0x0d8c ABC vendor MSI 0x0db0 Micro Star International -vendor HAWKING 0x0e66 Hawking Technologies +vendor HAWKING 0x0e66 Hawking +vendor OTI 0x0ea0 Ours Technology +vendor PILOTECH 0x0eaf Pilotech +vendor EGALAX 0x0eef eGalax vendor MICROTUNE 0x0f4d Microtune, Inc. vendor QUALCOMM2 0x1004 Qualcomm vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola +vendor CCYU 0x1065 CCYU Technology vendor PLX 0x10b5 PLX vendor ASANTE 0x10bd Asante vendor JRC 0x1145 Japan Radio Company vendor DELORME 0x1163 DeLorme Publishing -vendor ACERCM 0x1189 Acer Communications & Multimedia Inc. +vendor SERVERWORKS 0x1166 ServerWorks +vendor ACERCM 0x1189 Acer Communications & Multimedia vendor TWINMOS 0x126f TwinMOS +vendor TSUNAMI 0x1241 Tsunami +vendor CREATIVE2 0x1292 Creative Labs vendor BELKIN2 0x1293 Belkin Components -vendor AINCOMM 0x12fd Ain Communication Technology +vendor AINCOMM 0x12fd Aincomm vendor MOBILITY 0x1342 Mobility vendor SHARK 0x13d2 Shark +vendor SILICOM 0x1485 Silicom vendor SILICONPORTALS 0x1527 Silicon Portals vendor SOHOWARE 0x15e8 SOHOware vendor UMAX 0x1606 UMAX Data Systems @@ -483,9 +508,23 @@ vendor ACTIONTEC 0x1668 Actiontec Electronics vendor LINKSYS3 0x1915 Linksys vendor DLINK 0x2001 D-Link +vendor ERICSSON 0x2282 Ericsson +vendor MOTOROLA2 0x22b8 Motorola +vendor TRIPPLITE 0x2478 Tripp-Lite +vendor HIROSE 0x2631 Hirose Electric +vendor NHJ 0x2770 NHJ +vendor PLANEX 0x2c02 Planex Communications vendor VIDZMEDIA 0x3275 VidzMedia Pte Ltd +vendor AEI 0x3334 AEI +vendor PQI 0x3538 PQI vendor DAISY 0x3579 Daisy Technology +vendor NI 0x3923 National Instruments +vendor MICRONET 0x3980 Micronet Communications +vendor IODATA2 0x40bb I-O Data +vendor IRIVER 0x4102 iRiver vendor DELL 0x413c Dell +vendor AVERATEC 0x50c2 Averatec +vendor ONSPEC2 0x55aa OnSpec Electronic Inc. vendor SITECOM 0x6189 Sitecom vendor INTEL 0x8086 Intel vendor HP2 0xf003 Hewlett Packard ==== //depot/projects/smpng/sys/kern/kern_sysctl.c#44 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.162 2004/10/27 19:26:01 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.163 2004/12/31 14:52:53 pjd Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -512,9 +512,9 @@ error = suser(req->td); if (error) - return error; + return (error); sysctl_sysctl_debug_dump_node(&sysctl__children, 0); - return ENOENT; + return (ENOENT); } SYSCTL_PROC(_sysctl, 0, debug, CTLTYPE_STRING|CTLFLAG_RD, @@ -592,14 +592,14 @@ if (!namelen) { if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) - return 0; + return (0); if (oidp->oid_handler) /* We really should call the handler here...*/ - return 0; + return (0); lsp = (struct sysctl_oid_list *)oidp->oid_arg1; if (!sysctl_sysctl_next_ls(lsp, 0, 0, next+1, len, level+1, oidpp)) - return 0; + return (0); goto emptynode; } @@ -608,9 +608,9 @@ if (oidp->oid_number > *name) { if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) - return 0; + return (0); if (oidp->oid_handler) - return 0; + return (0); lsp = (struct sysctl_oid_list *)oidp->oid_arg1; if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, next+1, len, level+1, oidpp)) @@ -632,7 +632,7 @@ emptynode: *len = level; } - return 1; + return (1); } static int @@ -647,7 +647,7 @@ i = sysctl_sysctl_next_ls(lsp, name, namelen, newoid, &j, 1, &oid); if (i) - return ENOENT; + return (ENOENT); error = SYSCTL_OUT(req, newoid, j * sizeof (int)); return (error); } @@ -663,7 +663,7 @@ char *p; if (!*name) - return ENOENT; + return (ENOENT); p = name + strlen(name) - 1 ; if (*p == '.') @@ -708,7 +708,7 @@ if (i == '.') *p = '\0'; } - return ENOENT; + return (ENOENT); } static int @@ -719,7 +719,7 @@ struct sysctl_oid *op = 0; if (!req->newlen) - return ENOENT; + return (ENOENT); if (req->newlen >= MAXPATHLEN) /* XXX arbitrary, undocumented */ return (ENAMETOOLONG); @@ -972,7 +972,7 @@ sysctl_new_kernel(struct sysctl_req *req, void *p, size_t l) { if (!req->newptr) - return 0; + return (0); if (req->newlen - req->newidx < l) return (EINVAL); bcopy((char *)req->newptr + req->newidx, p, l); @@ -1091,7 +1091,7 @@ int error; if (!req->newptr) - return 0; + return (0); if (req->newlen - req->newidx < l) return (EINVAL); error = copyin((char *)req->newptr + req->newidx, p, l); @@ -1223,7 +1223,7 @@ } if (!oid->oid_handler) - return EINVAL; + return (EINVAL); if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { arg1 = (int *)arg1 + indx; ==== //depot/projects/smpng/sys/kern/sched_ule.c#50 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.144 2004/12/30 20:52:44 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.145 2004/12/30 22:17:00 jhb Exp $"); #include @@ -1299,7 +1299,7 @@ else base_pri = td->td_base_pri; if (prio >= base_pri) { - td->td_flags &= ~ TDF_BORROWING; + td->td_flags &= ~TDF_BORROWING; sched_thread_priority(td, base_pri); } else sched_lend_prio(td, prio); @@ -1314,7 +1314,7 @@ td->td_base_pri = prio; /* - * If the therad is borrowing another thread's priority, don't + * If the thread is borrowing another thread's priority, don't * ever lower the priority. */ if (td->td_flags & TDF_BORROWING && td->td_priority < prio) @@ -1331,7 +1331,7 @@ if (TD_ON_LOCK(td) && oldprio != prio) turnstile_adjust(td, oldprio); } - + void sched_switch(struct thread *td, struct thread *newtd, int flags) { ==== //depot/projects/smpng/sys/modules/usb/Makefile#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/usb/Makefile,v 1.16 2004/12/29 08:49:51 imp Exp $ +# $FreeBSD: src/sys/modules/usb/Makefile,v 1.17 2004/12/31 16:05:07 jhb Exp $ MAINTAINER= n_hibma@freebsd.org @@ -16,7 +16,7 @@ usb_port.h \ usb_quirks.c usb_quirks.h \ usb_subr.c \ - usbdevs.h \ + usbdevs.h usbdevs_data.h \ usbdi.c usbdi.h usbdivar.h \ usbdi_util.c usbdi_util.h \ usb_ethersubr.c usbdevs.h ==== //depot/projects/smpng/sys/netipx/ipx_input.c#11 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Robert N. M. Watson + * Copyright (c) 2004 Robert N. M. Watson * Copyright (c) 1995, Mike Mitchell * Copyright (c) 1984, 1985, 1986, 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netipx/ipx_input.c,v 1.37 2004/12/30 17:54:53 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netipx/ipx_input.c,v 1.38 2004/12/31 17:05:37 rwatson Exp $"); #include #include ==== //depot/projects/smpng/sys/netipx/ipx_pcb.c#14 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Robert N. M. Watson + * Copyright (c) 2004 Robert N. M. Watson * Copyright (c) 1995, Mike Mitchell * Copyright (c) 1984, 1985, 1986, 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netipx/ipx_pcb.c,v 1.32 2004/12/30 17:54:53 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netipx/ipx_pcb.c,v 1.33 2004/12/31 17:05:37 rwatson Exp $"); #include #include ==== //depot/projects/smpng/sys/netipx/ipx_usrreq.c#18 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Robert N. M. Watson + * Copyright (c) 2004 Robert N. M. Watson * Copyright (c) 1995, Mike Mitchell * Copyright (c) 1984, 1985, 1986, 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netipx/ipx_usrreq.c,v 1.43 2004/12/30 17:49:40 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netipx/ipx_usrreq.c,v 1.44 2004/12/31 17:05:37 rwatson Exp $"); #include "opt_ipx.h" ==== //depot/projects/smpng/sys/netipx/ipx_var.h#6 (text+ko) ==== @@ -33,7 +33,7 @@ * * @(#)ipx_var.h * - * $FreeBSD: src/sys/netipx/ipx_var.h,v 1.19 2004/12/30 17:49:40 rwatson Exp $ + * $FreeBSD: src/sys/netipx/ipx_var.h,v 1.20 2004/12/31 11:54:39 rwatson Exp $ */ #ifndef _NETIPX_IPX_VAR_H_ @@ -78,6 +78,7 @@ struct ifnet; struct ipx_addr; +struct ipxpcb; struct mbuf; struct thread; struct route; ==== //depot/projects/smpng/sys/netipx/spx_usrreq.c#17 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Robert N. M. Watson + * Copyright (c) 2004 Robert N. M. Watson * Copyright (c) 1995, Mike Mitchell * Copyright (c) 1984, 1985, 1986, 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netipx/spx_usrreq.c,v 1.49 2004/12/30 17:49:40 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netipx/spx_usrreq.c,v 1.50 2004/12/31 17:05:37 rwatson Exp $"); #include #include ==== //depot/projects/smpng/sys/sys/copyright.h#6 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (C) 1992-2004 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2005 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/copyright.h,v 1.17 2003/12/31 22:27:51 imp Exp $ + * $FreeBSD: src/sys/sys/copyright.h,v 1.18 2004/12/31 18:06:45 imp Exp $ */ @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2004 The FreeBSD Project.\n" + "Copyright (c) 1992-2005 The FreeBSD Project.\n" /* Berkeley */ #define COPYRIGHT_UCB \ @@ -38,7 +38,7 @@ /* a port of FreeBSD to the NEC PC98, Japan */ #define COPYRIGHT_PC98 \ - "Copyright (c) 1994-2004 FreeBSD(98) porting team.\nCopyright (c) 1992 A.Kojima F.Ukai M.Ishii (KMC).\n" + "Copyright (c) 1994-2005 FreeBSD(98) porting team.\nCopyright (c) 1992 A.Kojima F.Ukai M.Ishii (KMC).\n" #if defined(PC98) char copyright[] = COPYRIGHT_FreeBSD/**/COPYRIGHT_PC98/**/COPYRIGHT_UCB; ==== //depot/projects/smpng/sys/tools/usbdevs2h.awk#2 (text+ko) ==== @@ -1,6 +1,6 @@ #! /usr/bin/awk -f # $NetBSD: usb/devlist2h.awk,v 1.9 2001/01/18 20:28:22 jdolecek Exp $ -# $FreeBSD: src/sys/tools/usbdevs2h.awk,v 1.3 2004/04/16 05:22:11 obrien Exp $ +# $FreeBSD: src/sys/tools/usbdevs2h.awk,v 1.4 2004/12/30 23:18:34 imp Exp $ # # Copyright (c) 1995, 1996 Christopher G. Demetriou # All rights reserved. @@ -30,207 +30,244 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +function usage() +{ + print "usage: usbdevs2h.awk [-d|-h]"; + exit 1; +} + BEGIN { - nproducts = nvendors = 0 - dfile="usbdevs_data.h" - hfile="usbdevs.h" + +nproducts = nvendors = 0 +# Process the command line +for (i = 1; i < ARGC; i++) { + arg = ARGV[i]; + if (arg !~ /^-[dh]+$/ && arg !~ /devs$/) + usage(); + if (arg ~ /^-.*d/) + dfile="usbdevs_data.h" + if (arg ~ /^-.*h/) + hfile="usbdevs.h" + if (arg ~ /devs$/) + srcfile = arg; } -NR == 1 { +ARGC = 1; +line=0; + +while ((getline < srcfile) > 0) { + line++; + if (line == 1) { VERSION = $0 gsub("\\$", "", VERSION) - if (os == "NetBSD") - printf("/*\t\$NetBSD\$\t*/\n\n") > dfile - else if (os == "FreeBSD") - printf("/* \$FreeBSD\$ */\n\n") > dfile - else if (os == "OpenBSD") - printf("/*\t\$OpenBSD\$\t*/\n\n") > dfile - else - printf("/* ??? */\n\n") > dfile - printf("/*\n") > dfile - printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ - > dfile - printf(" *\n") > dfile - printf(" * generated from:\n") > dfile - printf(" *\t%s\n", VERSION) > dfile - printf(" */\n") > dfile - - if (os == "NetBSD") - printf("/*\t\$NetBSD\$\t*/\n\n") > hfile - else if (os == "FreeBSD") - printf("/* \$FreeBSD\$ */\n\n") > hfile - else if (os == "OpenBSD") - printf("/*\t\$OpenBSD\$\t*/\n\n") > hfile - else - printf("/* ??? */\n\n") > hfile - printf("/*\n") > hfile - printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ - > hfile - printf(" *\n") > hfile - printf(" * generated from:\n") > hfile - printf(" *\t%s\n", VERSION) > hfile - printf(" */\n") > hfile - - next -} -$1 == "vendor" { + if (dfile) { + if (os == "NetBSD") + printf("/*\t\$NetBSD\$\t*/\n\n") > dfile + else if (os == "FreeBSD") + printf("/* \$FreeBSD\$ */\n\n") > dfile + else if (os == "OpenBSD") + printf("/*\t\$OpenBSD\$\t*/\n\n") > dfile + else + printf("/* ??? */\n\n") > dfile + printf("/*\n") > dfile + printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ + > dfile + printf(" *\n") > dfile + printf(" * generated from:\n") > dfile + printf(" *\t%s\n", VERSION) > dfile + printf(" */\n") > dfile + } + + if (hfile) { + if (os == "NetBSD") + printf("/*\t\$NetBSD\$\t*/\n\n") > hfile + else if (os == "FreeBSD") + printf("/* \$FreeBSD\$ */\n\n") > hfile + else if (os == "OpenBSD") + printf("/*\t\$OpenBSD\$\t*/\n\n") > hfile + else + printf("/* ??? */\n\n") > hfile + printf("/*\n") > hfile + printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ + > hfile + printf(" *\n") > hfile + printf(" * generated from:\n") > hfile + printf(" *\t%s\n", VERSION) > hfile + printf(" */\n") > hfile + } + continue; + } + if ($1 == "vendor") { nvendors++ vendorindex[$2] = nvendors; # record index for this name, for later. vendors[nvendors, 1] = $2; # name vendors[nvendors, 2] = $3; # id - printf("#define\tUSB_VENDOR_%s\t%s\t", vendors[nvendors, 1], - vendors[nvendors, 2]) > hfile - + if (hfile) + printf("#define\tUSB_VENDOR_%s\t%s\t", vendors[nvendors, 1], + vendors[nvendors, 2]) > hfile i = 3; f = 4; # comments ocomment = oparen = 0 if (f <= NF) { - printf("\t/* ") > hfile + if (hfile) + printf("\t/* ") > hfile ocomment = 1; } while (f <= NF) { if ($f == "#") { - printf("(") > hfile + if (hfile) + printf("(") > hfile oparen = 1 f++ continue } if (oparen) { - printf("%s", $f) > hfile - if (f < NF) + if (hfile) + printf("%s", $f) > hfile + if (f < NF && hfile) printf(" ") > hfile f++ continue } vendors[nvendors, i] = $f - printf("%s", vendors[nvendors, i]) > hfile - if (f < NF) + if (hfile) + printf("%s", vendors[nvendors, i]) > hfile + if (f < NF && hfile) printf(" ") > hfile i++; f++; } - if (oparen) + if (oparen && hfile) printf(")") > hfile - if (ocomment) + if (ocomment && hfile) printf(" */") > hfile - printf("\n") > hfile + if (hfile) + printf("\n") > hfile - next -} -$1 == "product" { + continue; + } + if ($1 == "product") { nproducts++ products[nproducts, 1] = $2; # vendor name products[nproducts, 2] = $3; # product id products[nproducts, 3] = $4; # id - printf("#define\tUSB_PRODUCT_%s_%s\t%s\t", products[nproducts, 1], - products[nproducts, 2], products[nproducts, 3]) > hfile + if (hfile) + printf("#define\tUSB_PRODUCT_%s_%s\t%s\t", \ + products[nproducts, 1], products[nproducts, 2], \ + products[nproducts, 3]) > hfile i=4; f = 5; # comments ocomment = oparen = 0 if (f <= NF) { - printf("\t/* ") > hfile + if (hfile) + printf("\t/* ") > hfile ocomment = 1; } while (f <= NF) { if ($f == "#") { - printf("(") > hfile + if (hfile) + printf("(") > hfile oparen = 1 f++ continue } if (oparen) { - printf("%s", $f) > hfile - if (f < NF) + if (hfile) + printf("%s", $f) > hfile + if (f < NF && hfile) printf(" ") > hfile f++ continue } products[nproducts, i] = $f - printf("%s", products[nproducts, i]) > hfile - if (f < NF) + if (hfile) + printf("%s", products[nproducts, i]) > hfile + if (f < NF && hfile) printf(" ") > hfile i++; f++; } - if (oparen) + if (oparen && hfile) printf(")") > hfile - if (ocomment) + if (ocomment && hfile) printf(" */") > hfile - printf("\n") > hfile + if (hfile) + printf("\n") > hfile - next -} -{ + continue; + } if ($0 == "") blanklines++ - print $0 > hfile - if (blanklines < 2) - print $0 > dfile + if (hfile) + print $0 > hfile + if (blanklines < 2 && dfile) + print $0 > dfile } -END { # print out the match tables - printf("\n") > dfile + if (dfile) { + printf("\n") > dfile - printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile - for (i = 1; i <= nproducts; i++) { - printf("\t{\n") > dfile - printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n", - products[i, 1], products[i, 1], products[i, 2]) \ - > dfile - printf("\t ") > dfile - printf("0") > dfile - printf(",\n") > dfile + printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile + for (i = 1; i <= nproducts; i++) { + printf("\t{\n") > dfile + printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n", + products[i, 1], products[i, 1], products[i, 2]) \ + > dfile + printf("\t ") > dfile + printf("0") > dfile + printf(",\n") > dfile - vendi = vendorindex[products[i, 1]]; - printf("\t \"") > dfile - j = 3; - needspace = 0; - while (vendors[vendi, j] != "") { - if (needspace) - printf(" ") > dfile - printf("%s", vendors[vendi, j]) > dfile - needspace = 1 - j++ - } - printf("\",\n") > dfile + vendi = vendorindex[products[i, 1]]; + printf("\t \"") > dfile + j = 3; + needspace = 0; + while (vendors[vendi, j] != "") { + if (needspace) + printf(" ") > dfile + printf("%s", vendors[vendi, j]) > dfile + needspace = 1 + j++ + } + printf("\",\n") > dfile - printf("\t \"") > dfile - j = 4; - needspace = 0; - while (products[i, j] != "") { - if (needspace) - printf(" ") > dfile - printf("%s", products[i, j]) > dfile - needspace = 1 - j++ + printf("\t \"") > dfile + j = 4; + needspace = 0; + while (products[i, j] != "") { + if (needspace) + printf(" ") > dfile + printf("%s", products[i, j]) > dfile + needspace = 1 + j++ + } + printf("\",\n") > dfile + printf("\t},\n") > dfile } - printf("\",\n") > dfile - printf("\t},\n") > dfile - } - for (i = 1; i <= nvendors; i++) { - printf("\t{\n") > dfile - printf("\t USB_VENDOR_%s, 0,\n", vendors[i, 1]) \ - > dfile - printf("\t USB_KNOWNDEV_NOPROD,\n") \ - > dfile - printf("\t \"") > dfile - j = 3; - needspace = 0; - while (vendors[i, j] != "") { - if (needspace) - printf(" ") > dfile - printf("%s", vendors[i, j]) > dfile - needspace = 1 - j++ + for (i = 1; i <= nvendors; i++) { + printf("\t{\n") > dfile + printf("\t USB_VENDOR_%s, 0,\n", vendors[i, 1]) \ + > dfile + printf("\t USB_KNOWNDEV_NOPROD,\n") \ + > dfile + printf("\t \"") > dfile + j = 3; + needspace = 0; + while (vendors[i, j] != "") { + if (needspace) + printf(" ") > dfile + printf("%s", vendors[i, j]) > dfile + needspace = 1 + j++ + } + printf("\",\n") > dfile + printf("\t NULL,\n") > dfile + printf("\t},\n") > dfile } - printf("\",\n") > dfile - printf("\t NULL,\n") > dfile - printf("\t},\n") > dfile + printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile + printf("};\n") > dfile } - printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile - printf("};\n") > dfile } From owner-p4-projects@FreeBSD.ORG Fri Dec 31 19:20:43 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B86B916A4D0; Fri, 31 Dec 2004 19:20:42 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EC8E16A4CE for ; Fri, 31 Dec 2004 19:20:42 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 125E443D48 for ; Fri, 31 Dec 2004 19:20:42 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVJKgRG028723 for ; Fri, 31 Dec 2004 19:20:42 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVJKfj1028720 for perforce@freebsd.org; Fri, 31 Dec 2004 19:20:41 GMT (envelope-from sam@freebsd.org) Date: Fri, 31 Dec 2004 19:20:41 GMT Message-Id: <200412311920.iBVJKfj1028720@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 68018 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 19:20:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=68018 Change 68018 by sam@sam_ebb on 2004/12/31 19:19:47 IFC @ 68017 Affected files ... .. //depot/projects/wifi/MAINTAINERS#3 integrate .. //depot/projects/wifi/Makefile.inc1#10 integrate .. //depot/projects/wifi/games/fortune/datfiles/fortunes2#3 integrate .. //depot/projects/wifi/gnu/usr.bin/send-pr/send-pr.1#2 integrate .. //depot/projects/wifi/lib/libarchive/archive_write_set_format_pax.c#6 integrate .. //depot/projects/wifi/lib/libc/gen/signal.3#3 integrate .. //depot/projects/wifi/lib/libc/gen/syslog.3#2 integrate .. //depot/projects/wifi/lib/libc/gen/syslog.c#4 integrate .. //depot/projects/wifi/lib/libc/net/inet6_option_space.3#2 integrate .. //depot/projects/wifi/lib/libc/regex/engine.c#3 integrate .. //depot/projects/wifi/lib/libc/sys/chmod.2#2 integrate .. //depot/projects/wifi/lib/libdisk/libdisk.3#2 integrate .. //depot/projects/wifi/lib/libipx/ipx.3#2 integrate .. //depot/projects/wifi/lib/libstand/libstand.3#2 integrate .. //depot/projects/wifi/lib/libutil/login_cap.3#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#8 integrate .. //depot/projects/wifi/release/doc/ja_JP.eucJP/early-adopter/article.sgml#2 integrate .. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/common/dev.sgml#3 integrate .. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/common/intro.sgml#2 integrate .. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml#2 integrate .. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml#2 integrate .. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml#2 integrate .. //depot/projects/wifi/release/doc/ja_JP.eucJP/share/sgml/release.dsl#2 integrate .. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#7 integrate .. //depot/projects/wifi/sbin/dump/optr.c#2 integrate .. //depot/projects/wifi/sbin/geom/core/geom.c#2 integrate .. //depot/projects/wifi/sbin/sconfig/sconfig.8#3 integrate .. //depot/projects/wifi/share/man/man3/pthread_once.3#2 integrate .. //depot/projects/wifi/share/man/man3/pthread_setspecific.3#2 integrate .. //depot/projects/wifi/share/man/man3/queue.3#2 integrate .. //depot/projects/wifi/share/man/man4/ath.4#5 integrate .. //depot/projects/wifi/share/man/man4/bktr.4#2 integrate .. //depot/projects/wifi/share/man/man9/swi.9#2 integrate .. //depot/projects/wifi/share/man/man9/timeout.9#2 integrate .. //depot/projects/wifi/sys/alpha/conf/GENERIC#4 integrate .. //depot/projects/wifi/sys/amd64/conf/GENERIC#3 integrate .. //depot/projects/wifi/sys/compat/ndis/subr_hal.c#2 integrate .. //depot/projects/wifi/sys/conf/NOTES#8 integrate .. //depot/projects/wifi/sys/conf/files#12 integrate .. //depot/projects/wifi/sys/conf/kmod.mk#6 integrate .. //depot/projects/wifi/sys/dev/bktr/CHANGELOG.TXT#2 integrate .. //depot/projects/wifi/sys/dev/md/md.c#5 integrate .. //depot/projects/wifi/sys/dev/usb/ehci.c#7 integrate .. //depot/projects/wifi/sys/dev/usb/ehci_pci.c#2 integrate .. //depot/projects/wifi/sys/dev/usb/ehcivar.h#3 integrate .. //depot/projects/wifi/sys/dev/usb/ohci_pci.c#2 integrate .. //depot/projects/wifi/sys/dev/usb/ugen.c#5 integrate .. //depot/projects/wifi/sys/dev/usb/uhci_pci.c#2 integrate .. //depot/projects/wifi/sys/dev/usb/usbdevs#8 integrate .. //depot/projects/wifi/sys/geom/geom_kern.c#2 integrate .. //depot/projects/wifi/sys/geom/mirror/g_mirror.c#6 integrate .. //depot/projects/wifi/sys/geom/raid3/g_raid3.c#8 integrate .. //depot/projects/wifi/sys/i386/conf/GENERIC#4 integrate .. //depot/projects/wifi/sys/i386/i386/exception.s#2 integrate .. //depot/projects/wifi/sys/i386/i386/sys_machdep.c#3 integrate .. //depot/projects/wifi/sys/i386/i386/vm_machdep.c#7 integrate .. //depot/projects/wifi/sys/kern/kern_intr.c#6 integrate .. //depot/projects/wifi/sys/kern/kern_resource.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_synch.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_sysctl.c#3 integrate .. //depot/projects/wifi/sys/kern/kern_umtx.c#5 integrate .. //depot/projects/wifi/sys/kern/sched_4bsd.c#5 integrate .. //depot/projects/wifi/sys/kern/sched_ule.c#7 integrate .. //depot/projects/wifi/sys/kern/subr_trap.c#3 integrate .. //depot/projects/wifi/sys/kern/subr_turnstile.c#2 integrate .. //depot/projects/wifi/sys/kern/subr_witness.c#4 integrate .. //depot/projects/wifi/sys/kern/sysv_msg.c#3 integrate .. //depot/projects/wifi/sys/kern/tty.c#5 integrate .. //depot/projects/wifi/sys/kern/vfs_cluster.c#6 integrate .. //depot/projects/wifi/sys/modules/bktr/bktr/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/if_ppp/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/if_tun/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/io/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/mac_portacl/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/mem/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/netgraph/bluetooth/ubt/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/snp/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/sound/driver/uaudio/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ti/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ubsa/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ubser/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ucom/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ucycom/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/uftdi/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ugen/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/uhid/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ukbd/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ulpt/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/umct/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/umodem/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ums/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/uplcom/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/urio/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/usb/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/uscanner/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/uvisor/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/uvscom/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/vkbd/Makefile#2 integrate .. //depot/projects/wifi/sys/netgraph/ng_ether.c#2 integrate .. //depot/projects/wifi/sys/netipx/ipx_input.c#2 integrate .. //depot/projects/wifi/sys/netipx/ipx_pcb.c#2 integrate .. //depot/projects/wifi/sys/netipx/ipx_pcb.h#2 integrate .. //depot/projects/wifi/sys/netipx/ipx_usrreq.c#3 integrate .. //depot/projects/wifi/sys/netipx/ipx_var.h#2 integrate .. //depot/projects/wifi/sys/netipx/spx_usrreq.c#3 integrate .. //depot/projects/wifi/sys/pci/agp_ali.c#2 integrate .. //depot/projects/wifi/sys/pci/agp_intel.c#2 integrate .. //depot/projects/wifi/sys/pci/agp_sis.c#2 integrate .. //depot/projects/wifi/sys/pci/agp_via.c#2 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/pmap.c#4 integrate .. //depot/projects/wifi/sys/sparc64/conf/GENERIC#4 integrate .. //depot/projects/wifi/sys/sys/copyright.h#2 integrate .. //depot/projects/wifi/sys/sys/proc.h#5 integrate .. //depot/projects/wifi/sys/sys/sched.h#2 integrate .. //depot/projects/wifi/sys/sys/turnstile.h#2 integrate .. //depot/projects/wifi/sys/sys/umtx.h#4 integrate .. //depot/projects/wifi/sys/tools/usbdevs2h.awk#2 integrate .. //depot/projects/wifi/sys/vm/vm_page.c#6 integrate .. //depot/projects/wifi/usr.bin/chpass/Makefile#3 integrate .. //depot/projects/wifi/usr.bin/netstat/ipx.c#2 integrate .. //depot/projects/wifi/usr.bin/netstat/main.c#2 integrate .. //depot/projects/wifi/usr.bin/passwd/Makefile#2 integrate .. //depot/projects/wifi/usr.sbin/lpr/common_source/common.c#2 integrate .. //depot/projects/wifi/usr.sbin/lpr/common_source/ctlinfo.c#2 integrate .. //depot/projects/wifi/usr.sbin/lpr/common_source/displayq.c#2 integrate .. //depot/projects/wifi/usr.sbin/lpr/common_source/lp.h#2 integrate .. //depot/projects/wifi/usr.sbin/lpr/common_source/matchjobs.c#2 integrate .. //depot/projects/wifi/usr.sbin/lpr/common_source/rmjob.c#2 integrate .. //depot/projects/wifi/usr.sbin/syslogd/syslogd.c#5 integrate Differences ... ==== //depot/projects/wifi/MAINTAINERS#3 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.101 2004/11/30 20:04:47 eik Exp $ +$FreeBSD: src/MAINTAINERS,v 1.102 2004/12/29 03:49:58 gad Exp $ subsystem login notes ----------------------------- @@ -65,7 +65,9 @@ lpr gad Pre-commit review requested, particularly for lpd/recvjob.c and lpd/printjob.c. newsyslog(8) gad Heads-up appreciated. I'm going thru the PR's for it. -patch gad I have a WIP which will change the src a lot. +pkill gad Heads-up appreciated. +ps gad I am working on a number of changes to this. Would + like advance notice of major changes planned to it. cvs peter Heads-up appreciated, try not to break it. ncurses peter Heads-up appreciated, try not to break it. nvi peter Try not to break it. ==== //depot/projects/wifi/Makefile.inc1#10 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.471 2004/12/22 22:00:01 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.472 2004/12/29 19:39:06 obrien Exp $ # # Make command line options: # -DNO_DYNAMICROOT do not link /bin and /sbin dynamically @@ -467,57 +467,6 @@ SPECIAL_INSTALLCHECKS= # -# The following install-time check will see if the installation will -# change the type used for time_t, and if it will, the target makes -# sure that the user is expecting to make that change. -# -.if ${TARGET_ARCH} == "sparc64" -SPECIAL_INSTALLCHECKS+=sparc64_installcheck - -CUR_TIMET!= grep __time_t /usr/include/machine/_types.h | awk '{print $$2}' -SRC_TIMET!= grep __time_t ${.CURDIR}/sys/sparc64/include/_types.h | \ - awk '{print $$2}' -NEWSPARC_TIMETYPE?=${CUR_TIMET} - -sparc64_installcheck: -.if ${CUR_TIMET} != ${SRC_TIMET} - @echo -.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} - @echo "*** ERROR: This target would change the type used for time_t!" -.else - @echo "* Note: This installation changes the type used for time_t." -.endif - @echo "* " - @echo "* This host has time_t defined as ${CUR_TIMET}," - @echo "* and this installation would change that to type ${SRC_TIMET}." -.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} - @echo "* " - @echo "* If that is *NOT* what you wanted, then you need to change the" - @echo "* typedef of __time_t in ${.CURDIR}/sys/sparc64/include/_types.h" - @echo "* from '${SRC_TIMET}' to '${CUR_TIMET}'. After that you *MUST*" - @echo "* do a complete cleanworld, buildworld, buildkernel before you" - @echo "* retry the 'make' command. Also read /usr/src/UPDATING.64BTT." - @echo "* " - @echo "* If that *is* what you want, then enter the commands:" - @echo " NEWSPARC_TIMETYPE=${SRC_TIMET}" - @echo " export NEWSPARC_TIMETYPE" - @echo "* and repeat your 'make' command." - @echo - false -.endif - @echo -.elif ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} - @echo - @echo "*** ERROR: NEWSPARC_TIMETYPE is set to '${NEWSPARC_TIMETYPE}'" - @echo "*** but ${.CURDIR}/sys/sparc64/include/_types.h" - @echo "*** has __time_t defined as '${SRC_TIMET}'." - false -.else - @# in sparc64_installcheck, all TIMETYPEs == '${CUR_TIMET}' -.endif -.endif - -# # installcheck # # Checks to be sure system is ready for installworld ==== //depot/projects/wifi/games/fortune/datfiles/fortunes2#3 (text+ko) ==== @@ -1,5 +1,5 @@ This fortune brought to you by: -$FreeBSD: src/games/fortune/datfiles/fortunes2,v 1.78 2004/11/12 10:15:43 schweikh Exp $ +$FreeBSD: src/games/fortune/datfiles/fortunes2,v 1.79 2004/12/30 12:18:30 schweikh Exp $ % ======================================================================= || || @@ -51642,7 +51642,7 @@ it is necessary not to make a decision. % When it's dark enough you can see the stars. - -- Ralph Waldo Emerson, + -- Ralph Waldo Emerson % When license fees are too high, users do things by hand. @@ -51736,7 +51736,7 @@ it less and less." -- Louise Andrews Kent % -When oxygen Tech played Hydrogen U. +When Oxygen Tech played Hydrogen U. The Game had just begun, when Hydrogen scored two fast points And Oxygen still had none Then Oxygen scored a single goal @@ -51832,9 +51832,6 @@ When the bosses talk about improving productivity, they are never talking about themselves. % -When the bosses talk about improving productivity, they are never -talking about themselves. -% When the candles are out all women are fair. -- Plutarch % ==== //depot/projects/wifi/gnu/usr.bin/send-pr/send-pr.1#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" .\" --------------------------------------------------------------------------- .\" -.\" $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.1,v 1.16 2003/06/20 10:48:26 des Exp $ +.\" $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.1,v 1.17 2004/12/29 19:32:21 keramida Exp $ .nh .TH SEND-PR 1 3.113 "February 1993" .SH NAME @@ -102,6 +102,13 @@ .LP The more precise your problem description and the more complete your information, the faster your support team can solve your problems. +.LP +.B send-pr +depends on a correctly configured mail submission system to work correctly. +If, for any reason, sending mail is not working, problem reports can be +submitted over the web, through: +.IP +.I http://www.freebsd.org/send-pr.html .SH OPTIONS .TP .BI \-f " problem-report" ==== //depot/projects/wifi/lib/libarchive/archive_write_set_format_pax.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.24 2004/12/22 02:35:37 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.25 2004/12/29 23:26:18 kientzle Exp $"); #include #include @@ -720,99 +720,191 @@ /* * We need a valid name for the regular 'ustar' entry. This routine * tries to hack something more-or-less reasonable. + * + * The approach here tries to preserve leading dir names. We do so by + * breaking the full path into three sections: + * 1) "prefix" directory names, + * 2) "suffix" directory names, + * 3) filename. + * + * These three sections must satisfy the following requirements: + * * Parts 1 & 2 together form an initial portion of the dir name. + * * Part 3 forms an initial portion of the base filename. + * * The filename must be <= 90 chars to fit the ustar 'name' field while + * allowing room for the '/PaxHeader' dir element (see below) + * * Parts 2 & 3 together must be <= 90 chars to fit the ustar 'name' field + * while allowing room for the '/PaxHeader' dir element. + * * Part 1 must be <= 155 chars to fit the ustar 'prefix' field. + * * If the original name ends in a '/', the new name must also end in a '/' + * * Trailing '/.' sequences may be stripped. + * + * Note: Recall that the ustar format does not store the '/' separating + * parts 1 & 2, but does store the '/' separating parts 2 & 3. */ static char * build_ustar_entry_name(char *dest, const char *src) { - const char *basename, *break_point, *prefix; - int basename_length, dirname_length, prefix_length; + const char *prefix, *prefix_end; + const char *suffix, *suffix_end; + const char *filename, *filename_end; + char *p; + size_t s; + int need_slash = 0; /* Was there a trailing slash? */ + size_t suffix_length = 90; - prefix = src; - basename = strrchr(src, '/'); - if (basename == NULL) { - basename = src; - prefix_length = 0; - basename_length = strlen(basename); - if (basename_length > 100) - basename_length = 100; - } else { - basename_length = strlen(basename); - if (basename_length > 100) - basename_length = 100; - dirname_length = basename - src; + /* Step 0: Initial checks. */ + s = strlen(src); + if (s < 100) { + strcpy(dest, src); + return (dest); + } - break_point = - strchr(src + dirname_length + basename_length - 101, '/'); - prefix_length = break_point - prefix - 1; - while (prefix_length > 155) { - prefix = strchr(prefix, '/') + 1; /* Drop 1st dir. */ - prefix_length = break_point - prefix - 1; + /* Step 1: Locate filename and enforce the length restriction. */ + filename_end = src + s; + /* Remove trailing '/' chars and '/.' pairs. */ + for (;;) { + if (filename_end > src && filename_end[-1] == '/') { + filename_end --; + need_slash = 1; /* Remember to restore trailing '/'. */ + continue; + } + if (filename_end > src + 1 && filename_end[-1] == '.' + && filename_end[-2] == '/') { + filename_end -= 2; + continue; } + break; } + filename = filename_end - 1; + if (need_slash) + suffix_length--; + while ((filename > src) && (*filename != '/')) + filename --; + if ((*filename == '/') && (filename < filename_end - 1)) + filename ++; + if (filename_end > filename + suffix_length) + filename_end = filename + suffix_length; + /* Step 2: Locate the "prefix" section of the dirname, including + * trailing '/'. */ + prefix = src; + prefix_end = prefix + 155; + if (prefix_end > filename) + prefix_end = filename; + while (prefix_end > prefix && *prefix_end != '/') + prefix_end--; + if ((prefix_end < filename) && (*prefix_end == '/')) + prefix_end++; + + /* Step 3: Locate the "suffix" section of the dirname, + * including trailing '/'. */ + suffix = prefix_end; + suffix_end = suffix + 89 - (filename_end - filename); + if (suffix_end > filename) + suffix_end = filename; + if (suffix_end < suffix) + suffix_end = suffix; + while (suffix_end > suffix && *suffix_end != '/') + suffix_end--; + if ((suffix_end < filename) && (*suffix_end == '/')) + suffix_end++; + + /* Step 4: Build the new name. */ /* The OpenBSD strlcpy function is safer, but less portable. */ /* Rather than maintain two versions, just use the strncpy version. */ - strncpy(dest, prefix, basename - prefix + basename_length); - dest[basename - prefix + basename_length] = '\0'; + p = dest; + if (prefix_end > prefix) { + strncpy(p, prefix, prefix_end - prefix); + p += prefix_end - prefix; + } + if (suffix_end > suffix) { + strncpy(p, suffix, suffix_end - suffix); + p += suffix_end - suffix; + } + strncpy(p, filename, filename_end - filename); + p += filename_end - filename; + if (need_slash) + *p++ = '/'; + *p++ = '\0'; return (dest); } /* * The ustar header for the pax extended attributes must have a - * reasonable name: SUSv3 suggests 'dirname'/PaxHeaders/'basename' + * reasonable name: SUSv3 suggests 'dirname'/PaxHeader/'filename' * * Joerg Schiling has argued that this is unnecessary because, in practice, * if the pax extended attributes get extracted as regular files, noone is * going to bother reading those attributes to manually restore them. - * This is a tempting argument, but I'm not entirely convinced. + * Based on this, 'star' uses /tmp/PaxHeader/'basename' as the ustar header + * name. This is a tempting argument, but I'm not entirely convinced. + * I'm also uncomfortable with the fact that "/tmp" is a Unix-ism. * - * Of course, adding "PaxHeaders/" might force the name to be too big. - * Here, I start from the (possibly already-trimmed) name used in the - * main ustar header and delete some additional early path elements to - * fit in the extra "PaxHeader/" part. + * The following routine implements the SUSv3 recommendation, and is + * much simpler because we do the initial processing with + * build_ustar_entry_name() above which results in something that is + * already short enough to accomodate the extra '/PaxHeader' + * addition. We just need to separate dir and filename portions and + * handle a few pathological cases. */ static char * -build_pax_attribute_name(const char *abbreviated, /* ustar-compat name */ +build_pax_attribute_name(const char *src, /* ustar-compat name */ struct archive_string *work) { - const char *basename, *break_point, *prefix; - int prefix_length, suffix_length; + const char *filename, *filename_end; - /* - * This is much simpler because I know that "abbreviated" is - * already small enough; I just need to determine if it needs - * any further trimming to fit the "PaxHeader/" portion. - */ + if (*src == '\0') { + archive_strcpy(work, "PaxHeader/blank"); + return (work->s); + } + if (*src == '.' && src[1] == '\0') { + archive_strcpy(work, "PaxHeader/dot"); + return (work->s); + } - /* Identify the final prefix and suffix portions. */ - prefix = abbreviated; /* First guess: prefix starts at beginning */ - if (strlen(abbreviated) > 100) { - break_point = strchr(prefix + strlen(prefix) - 101, '/'); - prefix_length = break_point - prefix - 1; - suffix_length = strlen(break_point + 1); - /* - * The next loop keeps trimming until "/PaxHeader/" can - * be added to either the prefix or the suffix. - */ - while (prefix_length > 144 && suffix_length > 89) { - prefix = strchr(prefix, '/') + 1; /* Drop 1st dir. */ - prefix_length = break_point - prefix - 1; + /* Prune unwanted final path elements. */ + filename_end = src + strlen(src); + for (;;) { + if (filename_end > src && filename_end[-1] == '/') { + filename_end --; + continue; + } + if (filename_end > src + 1 && filename_end[-1] == '.' + && filename_end[-2] == '/') { + filename_end -= 2; + continue; } + break; } + while ((filename_end > src) && (filename_end[-1] == '/')) + filename_end --; - archive_string_empty(work); - basename = strrchr(prefix, '/'); - if (basename == NULL) { - archive_strcpy(work, "PaxHeader/"); - archive_strcat(work, prefix); - } else { - basename++; - archive_strncpy(work, prefix, basename - prefix); - archive_strcat(work, "PaxHeader/"); - archive_strcat(work, basename); + /* Pathological case: Entire 'src' consists of '/' characters. */ + if (filename_end == src) { + archive_strcpy(work, "/PaxHeader/rootdir"); + return (work->s); + } + + /* Find the '/' before the filename portion. */ + filename = filename_end - 1; + while ((filename > src) && (*filename != '/')) + filename --; + if (*filename == '/') + filename ++; + + /* Pathological case: filename is '.' */ + if (filename_end == filename + 2 + && filename[0] == '/' && filename[1] == '.') { + archive_strncpy(work, src, filename - src); + archive_strcat(work, "PaxHeader/dot"); + return (work->s); } + /* Build the new name. */ + archive_strncpy(work, src, filename - src); + archive_strcat(work, "PaxHeader/"); + archive_strncat(work, filename, filename_end - filename); return (work->s); } ==== //depot/projects/wifi/lib/libc/gen/signal.3#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)signal.3 8.3 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/gen/signal.3,v 1.39 2004/12/23 02:48:20 jkoshy Exp $ +.\" $FreeBSD: src/lib/libc/gen/signal.3,v 1.40 2004/12/29 19:40:56 keramida Exp $ .\" .Dd June 7, 2004 .Dt SIGNAL 3 @@ -255,7 +255,7 @@ An attempt is made to ignore or supply a handler for .Dv SIGKILL or -.Ev SIGSTOP . +.Dv SIGSTOP . .El .Sh SEE ALSO .Xr kill 1 , @@ -271,8 +271,8 @@ .Xr siginterrupt 3 , .Xr tty 4 .Sh HISTORY -This -.Fn signal +The +.Nm facility appeared in .Bx 4.0 . The option to avoid the creation of child zombies through ignoring ==== //depot/projects/wifi/lib/libc/gen/syslog.3#2 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)syslog.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/gen/syslog.3,v 1.23 2002/12/19 09:40:21 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/syslog.3,v 1.24 2004/12/30 13:09:34 krion Exp $ .\" -.Dd June 4, 1993 +.Dd December 30, 2004 .Dt SYSLOG 3 .Os .Sh NAME @@ -206,6 +206,8 @@ The mail system. .It Dv LOG_NEWS The network news system. +.It Dv LOG_NTP +The network time protocol system. .It Dv LOG_SECURITY Security subsystems, such as .Xr ipfw 4 . ==== //depot/projects/wifi/lib/libc/gen/syslog.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.33 2004/12/24 09:48:44 glebius Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.34 2004/12/30 16:05:11 glebius Exp $"); #include "namespace.h" #include @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -66,9 +67,20 @@ static const char *LogTag = NULL; /* string to tag the entry with */ static int LogFacility = LOG_USER; /* default facility code */ static int LogMask = 0xff; /* mask of priorities to be logged */ +static pthread_mutex_t syslog_mutex = PTHREAD_MUTEX_INITIALIZER; + +#define THREAD_LOCK() \ + do { \ + if (__isthreaded) _pthread_mutex_lock(&syslog_mutex); \ + } while(0) +#define THREAD_UNLOCK() \ + do { \ + if (__isthreaded) _pthread_mutex_unlock(&syslog_mutex); \ + } while(0) static void disconnectlog(void); /* disconnect from syslogd */ static void connectlog(void); /* (re)connect to syslogd */ +static void openlog_unlocked(const char *, int, int); enum { NOCONN = 0, @@ -134,7 +146,7 @@ char ch, *p; time_t now; int fd, saved_errno; - char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26]; + char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26], errstr[64]; FILE *fp, *fmt_fp; struct bufcookie tbuf_cookie; struct bufcookie fmt_cookie; @@ -147,9 +159,13 @@ pri &= LOG_PRIMASK|LOG_FACMASK; } + THREAD_LOCK(); + /* Check priority against setlogmask values. */ - if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) + if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) { + THREAD_UNLOCK(); return; + } saved_errno = errno; @@ -161,8 +177,10 @@ tbuf_cookie.base = tbuf; tbuf_cookie.left = sizeof(tbuf); fp = fwopen(&tbuf_cookie, writehook); - if (fp == NULL) + if (fp == NULL) { + THREAD_UNLOCK(); return; + } /* Build the message. */ (void)time(&now); @@ -192,6 +210,7 @@ fmt_fp = fwopen(&fmt_cookie, writehook); if (fmt_fp == NULL) { fclose(fp); + THREAD_UNLOCK(); return; } @@ -203,7 +222,8 @@ for ( ; (ch = *fmt); ++fmt) { if (ch == '%' && fmt[1] == 'm') { ++fmt; - fputs(strerror(saved_errno), fmt_fp); + strerror_r(saved_errno, errstr, sizeof(errstr)); + fputs(errstr, fmt_fp); } else if (ch == '%' && fmt[1] == '%') { ++fmt; fputc(ch, fmt_fp); @@ -247,7 +267,7 @@ /* Get connected, output the message to the local logger. */ if (!opened) - openlog(LogTag, LogStat | LOG_NDELAY, 0); + openlog_unlocked(LogTag, LogStat | LOG_NDELAY, 0); connectlog(); /* @@ -272,13 +292,17 @@ } do { usleep(1); - if (send(LogFile, tbuf, cnt, 0) >= 0) + if (send(LogFile, tbuf, cnt, 0) >= 0) { + THREAD_UNLOCK(); return; + } if (status == CONNPRIV) break; } while (errno == ENOBUFS); - } else + } else { + THREAD_UNLOCK(); return; + } /* * Output the message to the console; try not to block @@ -299,7 +323,11 @@ (void)_writev(fd, iov, 2); (void)_close(fd); } + + THREAD_UNLOCK(); } + +/* Should be called with mutex acquired */ static void disconnectlog() { @@ -315,6 +343,7 @@ status = NOCONN; /* retry connect */ } +/* Should be called with mutex acquired */ static void connectlog() { @@ -366,8 +395,8 @@ } } -void -openlog(ident, logstat, logfac) +static void +openlog_unlocked(ident, logstat, logfac) const char *ident; int logstat, logfac; { @@ -384,12 +413,25 @@ } void +openlog(ident, logstat, logfac) + const char *ident; + int logstat, logfac; +{ + THREAD_LOCK(); + openlog_unlocked(ident, logstat, logfac); + THREAD_UNLOCK(); +} + + +void closelog() { + THREAD_LOCK(); (void)_close(LogFile); LogFile = -1; LogTag = NULL; status = NOCONN; + THREAD_UNLOCK(); } /* setlogmask -- set the log mask level */ @@ -399,8 +441,10 @@ { int omask; + THREAD_LOCK(); omask = LogMask; if (pmask != 0) LogMask = pmask; + THREAD_UNLOCK(); return (omask); } ==== //depot/projects/wifi/lib/libc/net/inet6_option_space.3#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" $Id: inet6_option_space.3,v 1.4 2000/02/05 10:32:24 jinmei Exp $ -.\" $FreeBSD: src/lib/libc/net/inet6_option_space.3,v 1.12 2003/09/10 19:24:32 ru Exp $ +.\" $FreeBSD: src/lib/libc/net/inet6_option_space.3,v 1.13 2004/12/29 02:18:24 trhodes Exp $ .\" .Dd December 10, 1999 .Dt INET6_OPTION_SPACE 3 @@ -397,7 +397,7 @@ .Fa *tptrp must be set to .Dv NULL . -.Pa +.Pp This function starts searching for an option of the specified type beginning after the value of .Fa *tptrp . ==== //depot/projects/wifi/lib/libc/regex/engine.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.15 2004/11/21 03:14:32 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.16 2004/12/30 14:27:57 dds Exp $"); /* * The matching engine and friends. This file is #included by regexec.c @@ -255,6 +255,10 @@ for (;;) { endp = fast(m, start, stop, gf, gl); if (endp == NULL) { /* a miss */ + if (m->pmatch != NULL) + free((char *)m->pmatch); + if (m->lastpos != NULL) + free((char *)m->lastpos); STATETEARDOWN(m); return(REG_NOMATCH); } ==== //depot/projects/wifi/lib/libc/sys/chmod.2#2 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/sys/chmod.2,v 1.31 2004/07/02 23:52:13 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/chmod.2,v 1.32 2004/12/29 20:00:29 trhodes Exp $ .\" -.Dd June 4, 1993 +.Dd December 29, 2004 .Dt CHMOD 2 .Os .Sh NAME @@ -101,22 +101,21 @@ #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ -#define S_ISVTX 0001000 /* sticky bit */ -#ifndef _POSIX_SOURCE -#define S_ISTXT 0001000 +#ifndef __BSD_VISIBLE +#define S_ISTXT 0001000 /* sticky bit */ #endif .Ed .Pp The .Fx VM system totally ignores the sticky bit -.Pq Dv ISVTX +.Pq Dv ISTXT for executables. On UFS-based file systems (FFS, LFS) the sticky bit may only be set upon directories. .Pp If mode -.Dv ISVTX +.Dv ISTXT (the `sticky bit') is set on a directory, an unprivileged user may not delete or rename files of other users in that directory. ==== //depot/projects/wifi/lib/libdisk/libdisk.3#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/lib/libdisk/libdisk.3,v 1.32 2004/07/02 23:52:15 ru Exp $ +.\" $FreeBSD: src/lib/libdisk/libdisk.3,v 1.33 2004/12/29 02:18:24 trhodes Exp $ .\" " .Dd March 15, 1996 .Dt LIBDISK 3 @@ -169,7 +169,7 @@ .Ql whole, unknown, fat, freebsd, extended, part, unused . .Pp These are the valid -.Ql flag +.Ql flags values for a .Ql struct chunk . .Bl -tag -offset indent -width CHUNK_BSD_COMPATXX @@ -293,9 +293,9 @@ up to next track according to the BIOS geometry. .Pp .Fn Prev_Track_Aligned -checks if +rounds .Ql offset -is aligned on a track according to the BIOS geometry. +up to previous track according to the BIOS geometry. .Pp .Fn Create_Chunk_DWIM creates a partition inside the given parent of the given size, and ==== //depot/projects/wifi/lib/libipx/ipx.3#2 (text+ko) ==== @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libipx/ipx.3,v 1.14 2004/07/02 23:52:15 ru Exp $ +.\" $FreeBSD: src/lib/libipx/ipx.3,v 1.15 2004/12/29 02:18:24 trhodes Exp $ .\" .Dd June 4, 1993 .Dt IPX 3 @@ -91,7 +91,7 @@ quantity to be zero extended in the high-network-order bytes. Next, the field is inspected for hyphens, in which case the field is assumed to be a number in decimal notation -with hyphens separating the millenia. +with hyphens separating the millennia. Next, the field is assumed to be a number: It is interpreted as hexadecimal if there is a leading ==== //depot/projects/wifi/lib/libstand/libstand.3#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libstand/libstand.3,v 1.31 2004/08/06 15:29:54 roam Exp $ +.\" $FreeBSD: src/lib/libstand/libstand.3,v 1.32 2004/12/29 02:18:24 trhodes Exp $ .\" .Dd August 6, 2004 .Dt LIBSTAND 3 @@ -580,6 +580,7 @@ .Ft int .Fn devclose "struct open_file *of" .Xc +.Pp Close the device allocated for .Fa of . The device driver itself will already have been called for the close; this call ==== //depot/projects/wifi/lib/libutil/login_cap.3#2 (text+ko) ==== @@ -17,7 +17,7 @@ .\" 5. Modifications may be freely made to this file providing the above .\" conditions are met. .\" -.\" $FreeBSD: src/lib/libutil/login_cap.3,v 1.33 2004/07/03 22:30:10 ru Exp $ +.\" $FreeBSD: src/lib/libutil/login_cap.3,v 1.34 2004/12/29 02:18:24 trhodes Exp $ .\" .Dd December 27, 1996 .Os @@ -322,7 +322,7 @@ .Fn login_getstyle . .It Fn login_getpath This function returns a list of directories separated by colons -.Ql &: . +.Ql \&: . Capability tags for which this function is called consist of a list of directories separated by spaces. .It Fn login_getcaptime @@ -401,7 +401,7 @@ default to "passwd" as the authorisation list. .It If 'style' is not NULL or empty, look for it in the list of authorisation -methods found from the pprevious step. +methods found from the previous step. If 'style' is NULL or an empty string, then default to "passwd" authorisation. .It ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#8 (text+ko) ==== @@ -29,7 +29,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.269 2004/12/17 18:37:58 brueffer Exp $ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Dec 31 20:38:00 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B0F4216A4D0; Fri, 31 Dec 2004 20:37:59 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D36A16A4CE; Fri, 31 Dec 2004 20:37:59 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id B913143D31; Fri, 31 Dec 2004 20:37:58 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id iBVKbKeA008482; Fri, 31 Dec 2004 13:37:20 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 31 Dec 2004 13:37:32 -0700 (MST) Message-Id: <20041231.133732.123453187.imp@bsdimp.com> To: davidxu@freebsd.org From: "M. Warner Losh" In-Reply-To: <200412311446.iBVEkn9O008840@repoman.freebsd.org> References: <200412311446.iBVEkn9O008840@repoman.freebsd.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: perforce@freebsd.org Subject: Re: PERFORCE change 67972 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 20:38:00 -0000 In message: <200412311446.iBVEkn9O008840@repoman.freebsd.org> David Xu writes: : + * Copyright (c) 2005, David Xu There shouldn't be a comma after 2005. Warner From owner-p4-projects@FreeBSD.ORG Fri Dec 31 22:21:38 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9725216A4D0; Fri, 31 Dec 2004 22:21:37 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 646AC16A4CE for ; Fri, 31 Dec 2004 22:21:37 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0872D43D3F for ; Fri, 31 Dec 2004 22:21:37 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVMLbEs044897 for ; Fri, 31 Dec 2004 22:21:37 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVMLadb044894 for perforce@freebsd.org; Fri, 31 Dec 2004 22:21:36 GMT (envelope-from sam@freebsd.org) Date: Fri, 31 Dec 2004 22:21:36 GMT Message-Id: <200412312221.iBVMLadb044894@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 68046 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 22:21:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=68046 Change 68046 by sam@sam_ebb on 2004/12/31 22:21:12 IFC @ 68045 Affected files ... .. //depot/projects/wifi/sbin/ifconfig/af_link.c#4 integrate .. //depot/projects/wifi/sbin/ifconfig/ifconfig.c#9 integrate .. //depot/projects/wifi/sbin/ifconfig/ifconfig.h#8 integrate .. //depot/projects/wifi/sbin/ifconfig/ifmac.c#7 integrate .. //depot/projects/wifi/sbin/ifconfig/ifmedia.c#7 integrate .. //depot/projects/wifi/sbin/ifconfig/ifvlan.c#7 integrate .. //depot/projects/wifi/sys/dev/ath/if_ath.c#52 integrate .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#20 integrate .. //depot/projects/wifi/sys/dev/pci/pci.c#6 integrate .. //depot/projects/wifi/sys/kern/device_if.m#2 integrate .. //depot/projects/wifi/sys/kern/subr_bus.c#5 integrate .. //depot/projects/wifi/sys/net80211/ieee80211.c#17 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_acl.c#4 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#9 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_crypto_ccmp.c#5 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_crypto_none.c#5 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#7 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_crypto_wep.c#5 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#12 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#33 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#31 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#19 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#31 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#30 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#13 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_var.h#20 integrate .. //depot/projects/wifi/sys/sys/bus.h#3 integrate .. //depot/projects/wifi/sys/tools/usbdevs2h.awk#3 integrate .. //depot/projects/wifi/sys/vm/vm_page.c#7 integrate Differences ... ==== //depot/projects/wifi/sbin/ifconfig/af_link.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.107 2004/09/01 18:22:14 brooks Exp $"; + "$FreeBSD: src/sbin/ifconfig/af_link.c,v 1.2 2004/12/31 19:46:27 sam Exp $"; #endif /* not lint */ #include ==== //depot/projects/wifi/sbin/ifconfig/ifconfig.c#9 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.109 2004/12/11 02:33:33 sam Exp $"; + "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.110 2004/12/31 19:46:27 sam Exp $"; #endif /* not lint */ #include ==== //depot/projects/wifi/sbin/ifconfig/ifconfig.h#8 (text+ko) ==== @@ -31,7 +31,7 @@ * * so there! * - * $FreeBSD: src/sbin/ifconfig/ifconfig.h,v 1.14 2004/12/11 02:33:33 sam Exp $ + * $FreeBSD: src/sbin/ifconfig/ifconfig.h,v 1.15 2004/12/31 19:46:27 sam Exp $ */ #define __constructor __attribute__((constructor)) ==== //depot/projects/wifi/sbin/ifconfig/ifmac.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/ifconfig/ifmac.c,v 1.3 2004/12/08 19:18:07 sam Exp $ + * $FreeBSD: src/sbin/ifconfig/ifmac.c,v 1.4 2004/12/31 19:46:27 sam Exp $ */ #include ==== //depot/projects/wifi/sbin/ifconfig/ifmedia.c#7 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */ -/* $FreeBSD: src/sbin/ifconfig/ifmedia.c,v 1.17 2004/12/08 19:18:07 sam Exp $ */ +/* $FreeBSD: src/sbin/ifconfig/ifmedia.c,v 1.18 2004/12/31 19:46:27 sam Exp $ */ /* * Copyright (c) 1997 Jason R. Thorpe. ==== //depot/projects/wifi/sbin/ifconfig/ifvlan.c#7 (text+ko) ==== @@ -56,7 +56,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sbin/ifconfig/ifvlan.c,v 1.6 2004/12/08 19:18:07 sam Exp $"; + "$FreeBSD: src/sbin/ifconfig/ifvlan.c,v 1.7 2004/12/31 19:46:27 sam Exp $"; #endif static int __tag = 0; static int __have_tag = 0; ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#52 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.59 2004/12/15 02:25:20 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.65 2004/12/31 20:35:05 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#20 (text+ko) ==== @@ -33,7 +33,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.15 2004/12/08 17:34:36 sam Exp $ + * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.16 2004/12/31 20:32:40 sam Exp $ */ /* ==== //depot/projects/wifi/sys/dev/pci/pci.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.273 2004/12/08 04:35:19 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.274 2004/12/31 20:43:46 imp Exp $"); #include "opt_bus.h" @@ -498,49 +498,66 @@ struct pci_devinfo *dinfo = device_get_ivars(child); pcicfgregs *cfg = &dinfo->cfg; uint16_t status; - int result; + int result, oldstate, highest, delay; + + if (cfg->pp.pp_cap == 0) + return (EOPNOTSUPP); /* - * Dx -> Dx is a nop always. + * Optimize a no state change request away. While it would be OK to + * write to the hardware in theory, some devices have shown odd + * behavior when going from D3 -> D3. */ - if (pci_get_powerstate(child) == state) + oldstate = pci_get_powerstate(child); + if (oldstate == state) return (0); - if (cfg->pp.pp_cap != 0) { - status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2) - & ~PCIM_PSTAT_DMASK; - result = 0; - switch (state) { - case PCI_POWERSTATE_D0: - status |= PCIM_PSTAT_D0; - break; - case PCI_POWERSTATE_D1: - if (cfg->pp.pp_cap & PCIM_PCAP_D1SUPP) { - status |= PCIM_PSTAT_D1; - } else { - result = EOPNOTSUPP; - } - break; - case PCI_POWERSTATE_D2: - if (cfg->pp.pp_cap & PCIM_PCAP_D2SUPP) { - status |= PCIM_PSTAT_D2; - } else { - result = EOPNOTSUPP; - } - break; - case PCI_POWERSTATE_D3: - status |= PCIM_PSTAT_D3; - break; - default: - result = EINVAL; - } - if (result == 0) - PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_status, status, - 2); - } else { - result = ENXIO; + /* + * The PCI power management specification states that after a state + * transition between PCI power states, system software must + * guarantee a minimal delay before the function accesses the device. + * Compute the worst case delay that we need to guarantee before we + * access the device. Many devices will be responsive much more + * quickly than this delay, but there are some that don't respond + * instantly to state changes. Transitions to/from D3 state require + * 10ms, while D2 requires 200us, and D0/1 require none. The delay + * is done below with DELAY rather than a sleeper function because + * this function can be called from contexts where we cannot sleep. + */ + highest = (oldstate > state) ? oldstate : state; + if (highest == PCI_POWER_STATE_D3) + delay = 10000; + else if (highest == PCI_POWER_STATE_D2) + delay = 200; + else + delay = 0; + status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2) + & ~PCIM_PSTAT_DMASK; + result = 0; + switch (state) { + case PCI_POWERSTATE_D0: + status |= PCIM_PSTAT_D0; + break; + case PCI_POWERSTATE_D1: + if ((cfg->pp.pp_cap & PCIM_PCAP_D1SUPP) == 0) + return (EOPNOTSUPP); + status |= PCIM_PSTAT_D1; + break; + case PCI_POWERSTATE_D2: + if ((cfg->pp.pp_cap & PCIM_PCAP_D2SUPP) == 0) + return (EOPNOTSUPP); + status |= PCIM_PSTAT_D2; + break; + case PCI_POWERSTATE_D3: + status |= PCIM_PSTAT_D3; + break; + default: + return (EINVAL); } - return(result); + PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_status, status, 2); + if (delay) + DELAY(delay); + return (0); } int @@ -574,7 +591,7 @@ /* No support, device is always at D0 */ result = PCI_POWERSTATE_D0; } - return(result); + return (result); } /* ==== //depot/projects/wifi/sys/kern/device_if.m#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/kern/device_if.m,v 1.10 2004/08/12 17:26:22 imp Exp $ +# $FreeBSD: src/sys/kern/device_if.m,v 1.11 2004/12/31 20:47:51 imp Exp $ # #include @@ -57,6 +57,11 @@ { return 0; } + + static int null_quiesce(device_t dev) + { + return EOPNOTSUPP; + } }; /** @@ -283,3 +288,29 @@ METHOD int resume { device_t dev; } DEFAULT null_resume; + +/** + * @brief This is called when the driver is asked to quiesce itself. + * + * The driver should arrange for the orderly shutdown of this device. + * All further access to the device should be curtailed. Soon there + * will be a request to detach, but there won't necessarily be one. + * + * To include this method in a device driver, use a line like this + * in the driver's method list: + * + * @code + * KOBJMETHOD(device_quiesce, foo_quiesce) + * @endcode + * + * @param dev the device being quiesced + * + * @retval 0 success + * @retval non-zero an error occurred while attempting to quiesce the + * device + * + * @see DEVICE_DETACH() + */ +METHOD int quiesce { + device_t dev; +} DEFAULT null_quiesce; ==== //depot/projects/wifi/sys/kern/subr_bus.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.166 2004/12/08 02:39:56 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.167 2004/12/31 20:47:51 imp Exp $"); #include "opt_bus.h" @@ -948,6 +948,71 @@ } /** + * @brief Quiesces a set of device drivers from a device class + * + * Quiesce a device driver from a devclass. This is normally called + * automatically by DRIVER_MODULE(). + * + * If the driver is currently attached to any devices, + * devclass_quiesece_driver() will first attempt to quiesce each + * device. + * + * @param dc the devclass to edit + * @param driver the driver to unregister + */ +int +devclass_quiesce_driver(devclass_t busclass, driver_t *driver) +{ + devclass_t dc = devclass_find(driver->name); + driverlink_t dl; + device_t dev; + int i; + int error; + + PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass))); + + if (!dc) + return (0); + + /* + * Find the link structure in the bus' list of drivers. + */ + TAILQ_FOREACH(dl, &busclass->drivers, link) { + if (dl->driver == driver) + break; + } + + if (!dl) { + PDEBUG(("%s not found in %s list", driver->name, + busclass->name)); + return (ENOENT); + } + + /* + * Quiesce all devices. We iterate through all the devices in + * the devclass of the driver and quiesce any which are using + * the driver and which have a parent in the devclass which we + * are quiescing. + * + * Note that since a driver can be in multiple devclasses, we + * should not quiesce devices which are not children of + * devices in the affected devclass. + */ + for (i = 0; i < dc->maxunit; i++) { + if (dc->devices[i]) { + dev = dc->devices[i]; + if (dev->driver == driver && dev->parent && + dev->parent->devclass == busclass) { + if ((error = device_quiesce(dev)) != 0) + return (error); + } + } + } + + return (0); +} + +/** * @internal */ static driverlink_t @@ -2314,6 +2379,32 @@ } /** + * @brief Tells a driver to quiesce itself. + * + * This function is a wrapper around the DEVICE_QUIESCE() driver + * method. If the call to DEVICE_QUIESCE() succeeds. + * + * @param dev the device to quiesce + * + * @retval 0 success + * @retval ENXIO no driver was found + * @retval ENOMEM memory allocation failure + * @retval non-zero some other unix error code + */ +int +device_quiesce(device_t dev) +{ + + PDEBUG(("%s", DEVICENAME(dev))); + if (dev->state == DS_BUSY) + return (EBUSY); + if (dev->state != DS_ATTACHED) + return (0); + + return (DEVICE_QUIESCE(dev)); +} + +/** * @brief Notify a device of system shutdown * * This function calls the DEVICE_SHUTDOWN() driver method if the @@ -3564,6 +3655,16 @@ if (!error && dmd->dmd_chainevh) error = dmd->dmd_chainevh(mod,what,dmd->dmd_chainarg); break; + case MOD_QUIESCE: + PDEBUG(("Quiesce module: driver %s from bus %s", + DRIVERNAME(dmd->dmd_driver), + dmd->dmd_busname)); + error = devclass_quiesce_driver(bus_devclass, + dmd->dmd_driver); + + if (!error && dmd->dmd_chainevh) + error = dmd->dmd_chainevh(mod,what,dmd->dmd_chainarg); + break; default: error = EOPNOTSUPP; break; ==== //depot/projects/wifi/sys/net80211/ieee80211.c#17 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.14 2004/12/08 17:26:47 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.16 2004/12/31 21:48:15 sam Exp $"); /* * IEEE 802.11 generic handler @@ -158,13 +158,13 @@ if ((ic->ic_modecaps & (1<ic_curmode)) == 0) ic->ic_curmode = IEEE80211_MODE_AUTO; ic->ic_des_chan = IEEE80211_CHAN_ANYC; /* any channel is ok */ - +#if 0 /* * Enable WME by default if we're capable. */ if (ic->ic_caps & IEEE80211_C_WME) ic->ic_flags |= IEEE80211_F_WME; - +#endif (void) ieee80211_setmode(ic, ic->ic_curmode); if (ic->ic_lintval == 0) ==== //depot/projects/wifi/sys/net80211/ieee80211_acl.c#4 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_acl.c,v 1.1 2004/12/08 17:26:47 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_acl.c,v 1.2 2004/12/31 20:39:41 sam Exp $"); /* * IEEE 802.11 MAC ACL support. ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.4 2004/12/08 17:26:47 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.6 2004/12/31 20:44:15 sam Exp $"); /* * IEEE 802.11 generic crypto support. ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_ccmp.c#5 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_ccmp.c,v 1.2 2004/12/13 18:26:13 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_ccmp.c,v 1.3 2004/12/31 20:51:41 sam Exp $"); /* * IEEE 802.11i AES-CCMP crypto support. ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_none.c#5 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_none.c,v 1.1 2004/12/08 17:26:47 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_none.c,v 1.2 2004/12/31 20:58:06 sam Exp $"); /* * IEEE 802.11 NULL crypto support. ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#7 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_tkip.c,v 1.3 2004/12/13 18:12:26 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_tkip.c,v 1.6 2004/12/31 20:59:03 sam Exp $"); /* * IEEE 802.11i TKIP crypto support. ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_wep.c#5 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_wep.c,v 1.3 2004/12/12 00:28:41 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_wep.c,v 1.4 2004/12/31 20:51:41 sam Exp $"); /* * IEEE 802.11 WEP crypto support. ==== //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#12 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.3 2004/12/13 04:26:36 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.4 2004/12/31 21:01:41 sam Exp $"); /* * IEEE 802.11 support (FreeBSD-specific code) ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#33 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.22 2004/12/08 17:26:47 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.27 2004/12/31 22:05:13 sam Exp $"); #include #include ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#31 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.15 2004/12/10 16:35:37 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.16 2004/12/31 21:13:35 sam Exp $"); /* * IEEE 802.11 ioctl support (FreeBSD-specific) ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#19 (text+ko) ==== @@ -29,7 +29,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/sys/net80211/ieee80211_ioctl.h,v 1.6 2004/12/08 17:26:47 sam Exp $ + * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.7 2004/12/31 21:54:53 sam Exp $ */ #ifndef _NET80211_IEEE80211_IOCTL_H_ #define _NET80211_IEEE80211_IOCTL_H_ ==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#31 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.23 2004/12/08 17:26:47 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.29 2004/12/31 22:05:13 sam Exp $"); #include #include ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#30 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.13 2004/12/08 22:34:07 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.14 2004/12/31 21:54:53 sam Exp $"); #include "opt_inet.h" @@ -468,10 +468,11 @@ key = NULL; /* XXX 4-address format */ /* - * XXX Atheros ap's don't handle QoS-encapsulated EAPOL - * frames so suppress use. This may be an issue with - * other ap's that support WME+WPA in which case we'll - * need to make this configurable. + * XXX Some ap's don't handle QoS-encapsulated EAPOL + * frames so suppress use. This may be an issue if other + * ap's require all data frames to be QoS-encapsulated + * once negotiated in which case we'll need to make this + * configurable. */ addqos = (ni->ni_flags & IEEE80211_NODE_QOS) && eh.ether_type != htons(ETHERTYPE_PAE); @@ -580,7 +581,6 @@ m_freem(m); return NULL; } -#undef KEY_UNDEFINED /* * Add a supported rates element id to a frame. @@ -1580,7 +1580,7 @@ ni->ni_savedq.ifq_drops, IEEE80211_PS_MAX_QUEUE); #ifdef IEEE80211_DEBUG if (ieee80211_msg_dumppkts(ic)) - ieee80211_dump_pkt(ic, mtod(m, caddr_t), m->m_len, -1, -1); + ieee80211_dump_pkt(mtod(m, caddr_t), m->m_len, -1, -1); #endif m_freem(m); return; ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#13 (text+ko) ==== @@ -29,7 +29,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/sys/net80211/ieee80211_proto.h,v 1.5 2004/12/08 17:26:47 sam Exp $ + * $FreeBSD: src/sys/net80211/ieee80211_proto.h,v 1.7 2004/12/31 21:30:42 sam Exp $ */ #ifndef _NET80211_IEEE80211_PROTO_H_ #define _NET80211_IEEE80211_PROTO_H_ ==== //depot/projects/wifi/sys/net80211/ieee80211_var.h#20 (text+ko) ==== @@ -29,7 +29,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/sys/net80211/ieee80211_var.h,v 1.16 2004/12/08 17:26:47 sam Exp $ + * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.17 2004/12/31 20:56:32 sam Exp $ */ #ifndef _NET80211_IEEE80211_VAR_H_ #define _NET80211_IEEE80211_VAR_H_ ==== //depot/projects/wifi/sys/sys/bus.h#3 (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/sys/bus.h,v 1.63 2004/12/08 02:39:56 njl Exp $ + * $FreeBSD: src/sys/sys/bus.h,v 1.64 2004/12/31 20:47:51 imp Exp $ */ #ifndef _SYS_BUS_H_ @@ -357,6 +357,7 @@ int device_print_prettyname(device_t dev); int device_printf(device_t dev, const char *, ...) __printflike(2, 3); int device_probe_and_attach(device_t dev); +int device_quiesce(device_t dev); void device_quiet(device_t dev); void device_set_desc(device_t dev, const char* desc); void device_set_desc_copy(device_t dev, const char* desc); @@ -388,6 +389,7 @@ devclass_t devclass_get_parent(devclass_t dc); struct sysctl_ctx_list *devclass_get_sysctl_ctx(devclass_t dc); struct sysctl_oid *devclass_get_sysctl_tree(devclass_t dc); +int devclass_quiesce_driver(devclass_t dc, kobj_class_t driver); /* * Access functions for device resources. ==== //depot/projects/wifi/sys/tools/usbdevs2h.awk#3 (text+ko) ==== @@ -1,6 +1,6 @@ #! /usr/bin/awk -f # $NetBSD: usb/devlist2h.awk,v 1.9 2001/01/18 20:28:22 jdolecek Exp $ -# $FreeBSD: src/sys/tools/usbdevs2h.awk,v 1.4 2004/12/30 23:18:34 imp Exp $ +# $FreeBSD: src/sys/tools/usbdevs2h.awk,v 1.6 2004/12/31 21:12:17 imp Exp $ # # Copyright (c) 1995, 1996 Christopher G. Demetriou # All rights reserved. @@ -30,74 +30,34 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # + function usage() { print "usage: usbdevs2h.awk [-d|-h]"; exit 1; } -BEGIN { - -nproducts = nvendors = 0 -# Process the command line -for (i = 1; i < ARGC; i++) { - arg = ARGV[i]; - if (arg !~ /^-[dh]+$/ && arg !~ /devs$/) - usage(); - if (arg ~ /^-.*d/) - dfile="usbdevs_data.h" - if (arg ~ /^-.*h/) - hfile="usbdevs.h" - if (arg ~ /devs$/) - srcfile = arg; +function header(file) +{ + if (os == "NetBSD") + printf("/*\t\$NetBSD\$\t*/\n\n") > file + else if (os == "FreeBSD") + printf("/* \$FreeBSD\$ */\n\n") > file + else if (os == "OpenBSD") + printf("/*\t\$OpenBSD\$\t*/\n\n") > file + else + printf("/* ??? */\n\n") > file + printf("/*\n") > file + printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ + > file + printf(" *\n") > file + printf(" * generated from:\n") > file + printf(" *\t%s\n", VERSION) > file + printf(" */\n") > file } -ARGC = 1; -line=0; -while ((getline < srcfile) > 0) { - line++; - if (line == 1) { - VERSION = $0 - gsub("\\$", "", VERSION) - - if (dfile) { - if (os == "NetBSD") - printf("/*\t\$NetBSD\$\t*/\n\n") > dfile - else if (os == "FreeBSD") - printf("/* \$FreeBSD\$ */\n\n") > dfile - else if (os == "OpenBSD") - printf("/*\t\$OpenBSD\$\t*/\n\n") > dfile - else - printf("/* ??? */\n\n") > dfile - printf("/*\n") > dfile - printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ - > dfile - printf(" *\n") > dfile - printf(" * generated from:\n") > dfile - printf(" *\t%s\n", VERSION) > dfile - printf(" */\n") > dfile - } - - if (hfile) { - if (os == "NetBSD") - printf("/*\t\$NetBSD\$\t*/\n\n") > hfile - else if (os == "FreeBSD") - printf("/* \$FreeBSD\$ */\n\n") > hfile - else if (os == "OpenBSD") - printf("/*\t\$OpenBSD\$\t*/\n\n") > hfile - else - printf("/* ??? */\n\n") > hfile - printf("/*\n") > hfile - printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ - > hfile - printf(" *\n") > hfile - printf(" * generated from:\n") > hfile - printf(" *\t%s\n", VERSION) > hfile - printf(" */\n") > hfile - } - continue; - } - if ($1 == "vendor") { +function vendor(hfile) +{ nvendors++ vendorindex[$2] = nvendors; # record index for this name, for later. @@ -144,10 +104,10 @@ printf(" */") > hfile if (hfile) printf("\n") > hfile +} - continue; - } - if ($1 == "product") { +function product(hfile) +{ nproducts++ products[nproducts, 1] = $2; # vendor name @@ -196,9 +156,105 @@ printf(" */") > hfile if (hfile) printf("\n") > hfile +} - continue; - } +function dump_dfile(dfile) +{ + printf("\n") > dfile + printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile + for (i = 1; i <= nproducts; i++) { + printf("\t{\n") > dfile + printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n", + products[i, 1], products[i, 1], products[i, 2]) > dfile + printf("\t ") > dfile + printf("0") > dfile + printf(",\n") > dfile + + vendi = vendorindex[products[i, 1]]; + printf("\t \"") > dfile + j = 3; + needspace = 0; + while (vendors[vendi, j] != "") { + if (needspace) + printf(" ") > dfile + printf("%s", vendors[vendi, j]) > dfile + needspace = 1 + j++ + } + printf("\",\n") > dfile + + printf("\t \"") > dfile + j = 4; + needspace = 0; + while (products[i, j] != "") { + if (needspace) + printf(" ") > dfile + printf("%s", products[i, j]) > dfile + needspace = 1 + j++ + } + printf("\",\n") > dfile + printf("\t},\n") > dfile + } + for (i = 1; i <= nvendors; i++) { + printf("\t{\n") > dfile + printf("\t USB_VENDOR_%s, 0,\n", vendors[i, 1]) > dfile + printf("\t USB_KNOWNDEV_NOPROD,\n") > dfile + printf("\t \"") > dfile + j = 3; + needspace = 0; + while (vendors[i, j] != "") { + if (needspace) + printf(" ") > dfile + printf("%s", vendors[i, j]) > dfile + needspace = 1 + j++ + } + printf("\",\n") > dfile + printf("\t NULL,\n") > dfile + printf("\t},\n") > dfile + } + printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile + printf("};\n") > dfile +} + +BEGIN { + +nproducts = nvendors = 0 +# Process the command line +for (i = 1; i < ARGC; i++) { + arg = ARGV[i]; + if (arg !~ /^-[dh]+$/ && arg !~ /devs$/) + usage(); + if (arg ~ /^-.*d/) + dfile="usbdevs_data.h" + if (arg ~ /^-.*h/) + hfile="usbdevs.h" + if (arg ~ /devs$/) + srcfile = arg; +} +ARGC = 1; +line=0; + +while ((getline < srcfile) > 0) { + line++; + if (line == 1) { + VERSION = $0 + gsub("\\$", "", VERSION) + if (dfile) + header(dfile) + if (hfile) + header(hfile) + continue; + } + if ($1 == "vendor") { + vendor(hfile) + continue + } + if ($1 == "product") { + product(hfile) + continue + } if ($0 == "") blanklines++ if (hfile) @@ -206,68 +262,9 @@ if (blanklines < 2 && dfile) print $0 > dfile } - # print out the match tables - if (dfile) { - printf("\n") > dfile +# print out the match tables - printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile - for (i = 1; i <= nproducts; i++) { - printf("\t{\n") > dfile - printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n", - products[i, 1], products[i, 1], products[i, 2]) \ - > dfile - printf("\t ") > dfile - printf("0") > dfile - printf(",\n") > dfile - - vendi = vendorindex[products[i, 1]]; - printf("\t \"") > dfile - j = 3; - needspace = 0; - while (vendors[vendi, j] != "") { - if (needspace) - printf(" ") > dfile - printf("%s", vendors[vendi, j]) > dfile - needspace = 1 - j++ - } - printf("\",\n") > dfile - - printf("\t \"") > dfile - j = 4; - needspace = 0; - while (products[i, j] != "") { - if (needspace) - printf(" ") > dfile - printf("%s", products[i, j]) > dfile - needspace = 1 - j++ - } - printf("\",\n") > dfile - printf("\t},\n") > dfile - } - for (i = 1; i <= nvendors; i++) { - printf("\t{\n") > dfile - printf("\t USB_VENDOR_%s, 0,\n", vendors[i, 1]) \ - > dfile - printf("\t USB_KNOWNDEV_NOPROD,\n") \ - > dfile - printf("\t \"") > dfile - j = 3; - needspace = 0; - while (vendors[i, j] != "") { - if (needspace) - printf(" ") > dfile - printf("%s", vendors[i, j]) > dfile - needspace = 1 - j++ - } - printf("\",\n") > dfile - printf("\t NULL,\n") > dfile - printf("\t},\n") > dfile - } - printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile - printf("};\n") > dfile - } +if (dfile) + dump_dfile(dfile) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Dec 31 23:05:31 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 500E016A4D2; Fri, 31 Dec 2004 23:05:31 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24D0016A4CE for ; Fri, 31 Dec 2004 23:05:31 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14EA243D31 for ; Fri, 31 Dec 2004 23:05:31 +0000 (GMT) (envelope-from trhodes@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVN5UmI046433 for ; Fri, 31 Dec 2004 23:05:30 GMT (envelope-from trhodes@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVN5U9S046430 for perforce@freebsd.org; Fri, 31 Dec 2004 23:05:30 GMT (envelope-from trhodes@freebsd.org) Date: Fri, 31 Dec 2004 23:05:30 GMT Message-Id: <200412312305.iBVN5U9S046430@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trhodes@freebsd.org using -f From: Tom Rhodes To: Perforce Change Reviews Subject: PERFORCE change 68049 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 23:05:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=68049 Change 68049 by trhodes@trhodes_local on 2004/12/31 23:04:37 s/requited/required/ noticed by Ceri. Affected files ... .. //depot/projects/trustedbsd/audit3/etc/rc.d/auditd#3 edit Differences ... ==== //depot/projects/trustedbsd/audit3/etc/rc.d/auditd#3 (text+ko) ==== @@ -16,7 +16,7 @@ command="/usr/sbin/${name}" rcvar="auditd_enable" command_args="${auditd_flags}" -requited_files="/etc/audit_class /etc/audit_control /etc/audit_event +required_files="/etc/audit_class /etc/audit_control /etc/audit_event /etc/audit_user /etc/audit_warn /etc/auditd_control" auditd_stop() From owner-p4-projects@FreeBSD.ORG Fri Dec 31 23:33:06 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B8F216A4D0; Fri, 31 Dec 2004 23:33:05 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53D9516A4CE for ; Fri, 31 Dec 2004 23:33:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 398F043D45 for ; Fri, 31 Dec 2004 23:33:05 +0000 (GMT) (envelope-from trhodes@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVNX5Gk047242 for ; Fri, 31 Dec 2004 23:33:05 GMT (envelope-from trhodes@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVNX4r5047239 for perforce@freebsd.org; Fri, 31 Dec 2004 23:33:04 GMT (envelope-from trhodes@freebsd.org) Date: Fri, 31 Dec 2004 23:33:04 GMT Message-Id: <200412312333.iBVNX4r5047239@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trhodes@freebsd.org using -f From: Tom Rhodes To: Perforce Change Reviews Subject: PERFORCE change 68051 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 23:33:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=68051 Change 68051 by trhodes@trhodes_local on 2004/12/31 23:32:52 Add NO_AUDIT option Affected files ... .. //depot/projects/trustedbsd/audit3/lib/Makefile#4 edit .. //depot/projects/trustedbsd/audit3/share/examples/etc/make.conf#4 edit .. //depot/projects/trustedbsd/audit3/share/man/man5/make.conf.5#3 edit .. //depot/projects/trustedbsd/audit3/usr.sbin/Makefile#6 edit Differences ... ==== //depot/projects/trustedbsd/audit3/lib/Makefile#4 (text+ko) ==== @@ -47,7 +47,7 @@ _libngatm= libngatm .endif -.if !defined(NOAUDIT) +.if !defined(NO_AUDIT) _libbsm= libbsm .endif ==== //depot/projects/trustedbsd/audit3/share/examples/etc/make.conf#4 (text+ko) ==== @@ -110,6 +110,7 @@ # To avoid building various parts of the base system: #NO_ACPI= # do not build acpiconf(8) and related programs #NOATM= # do not build ATM related programs and libraries +#NO_AUDIT= # do not build audit libraries or utilities #NO_AUTHPF= # do not build and install authpf (setuid/gid) #NO_BLUETOOTH= # do not build Bluetooth related stuff #NO_BOOT= # do not build boot blocks and loader ==== //depot/projects/trustedbsd/audit3/share/man/man5/make.conf.5#3 (text+ko) ==== @@ -410,6 +410,9 @@ .It Va MODULES_WITH_WORLD .Pq Vt bool Set to build modules with the system instead of the kernel. +.It Va NO_AUDIT +.Pq Vt bool +Set to not build audit utilities and libraries. .It Va NO_BLUETOOTH .Pq Vt bool Set to not build Bluetooth related kernel modules, programs and libraries. ==== //depot/projects/trustedbsd/audit3/usr.sbin/Makefile#6 (text+ko) ==== @@ -12,9 +12,9 @@ ${_apmd} \ ${_arlcontrol} \ arp \ - audit \ - auditd \ - auditon \ + ${_audit} \ + ${_auditd} \ + ${_auditon} \ ${_asf} \ ${_atm} \ ${_authpf} \ @@ -195,6 +195,12 @@ _atm= atm .endif +.if !defined(NO_AUDIT) +_audit= audit +_auditd= auditd +_auditon= auditon +.endif + .if !defined(NO_BIND) .if !defined(NO_BIND_DNSSEC) && !defined(NOCRYPT) _dnssec-keygen= dnssec-keygen