Date: Thu, 27 Jul 2006 12:32:35 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102552 for review Message-ID: <200607271232.k6RCWZ4f069513@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102552 Change 102552 by cognet@cognet on 2006/07/27 12:32:04 IFC Affected files ... .. //depot/projects/arm/src/UPDATING#2 integrate .. //depot/projects/arm/src/bin/sh/sh.1#2 integrate .. //depot/projects/arm/src/etc/rc.d/ipfw#2 integrate .. //depot/projects/arm/src/etc/rc.d/mdconfig#2 integrate .. //depot/projects/arm/src/etc/rc.d/mdconfig2#2 integrate .. //depot/projects/arm/src/etc/rc.d/natd#2 integrate .. //depot/projects/arm/src/etc/rc.subr#2 integrate .. //depot/projects/arm/src/lib/libc/gen/tls.c#2 integrate .. //depot/projects/arm/src/lib/libc/net/Makefile.inc#2 integrate .. //depot/projects/arm/src/lib/libc/net/name6.c#2 integrate .. //depot/projects/arm/src/lib/libc/stdlib/malloc.c#2 integrate .. //depot/projects/arm/src/lib/libfetch/Makefile#2 integrate .. //depot/projects/arm/src/lib/libftpio/Makefile#2 integrate .. //depot/projects/arm/src/lib/libkvm/kvm_proc.c#2 integrate .. //depot/projects/arm/src/lib/libmemstat/memstat.h#2 integrate .. //depot/projects/arm/src/lib/libthr/pthread.map#2 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_init.c#2 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_sig.c#2 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_syscalls.c#2 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#2 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#2 integrate .. //depot/projects/arm/src/release/doc/share/misc/dev.archlist.txt#2 integrate .. //depot/projects/arm/src/sbin/ifconfig/ifconfig.8#2 integrate .. //depot/projects/arm/src/sbin/ifconfig/ifieee80211.c#2 integrate .. //depot/projects/arm/src/sbin/ipfw/ipfw.8#2 integrate .. //depot/projects/arm/src/share/man/man4/stge.4#2 integrate .. //depot/projects/arm/src/share/misc/bsd-family-tree#2 integrate .. //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c#33 integrate .. //depot/projects/arm/src/sys/arm/include/db_machdep.h#2 integrate .. //depot/projects/arm/src/sys/boot/forth/loader.conf#6 integrate .. //depot/projects/arm/src/sys/conf/files.powerpc#9 integrate .. //depot/projects/arm/src/sys/crypto/via/padlock.c#7 integrate .. //depot/projects/arm/src/sys/crypto/via/padlock.h#2 integrate .. //depot/projects/arm/src/sys/crypto/via/padlock_cipher.c#2 integrate .. //depot/projects/arm/src/sys/crypto/via/padlock_hash.c#2 integrate .. //depot/projects/arm/src/sys/dev/ath/ath_rate/sample/sample.h#4 integrate .. //depot/projects/arm/src/sys/dev/ath/if_ath.c#15 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.c#20 integrate .. //depot/projects/arm/src/sys/dev/iwi/if_iwi.c#8 integrate .. //depot/projects/arm/src/sys/dev/ral/rt2560.c#5 integrate .. //depot/projects/arm/src/sys/dev/scc/scc_core.c#3 integrate .. //depot/projects/arm/src/sys/dev/scc/scc_dev_z8530.c#2 integrate .. //depot/projects/arm/src/sys/dev/sk/if_sk.c#5 integrate .. //depot/projects/arm/src/sys/dev/sk/if_skreg.h#3 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_cpu_powerpc.c#2 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_dev_z8530.c#6 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_tty.c#7 integrate .. //depot/projects/arm/src/sys/dev/usb/if_ural.c#12 integrate .. //depot/projects/arm/src/sys/fs/udf/ecma167-udf.h#4 integrate .. //depot/projects/arm/src/sys/fs/udf/udf_vfsops.c#8 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli.c#11 integrate .. //depot/projects/arm/src/sys/kern/uipc_usrreq.c#15 integrate .. //depot/projects/arm/src/sys/modules/Makefile#25 integrate .. //depot/projects/arm/src/sys/modules/bridgestp/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/if_bridge/Makefile#4 integrate .. //depot/projects/arm/src/sys/net/bpf.c#12 integrate .. //depot/projects/arm/src/sys/net/bridgestp.c#5 integrate .. //depot/projects/arm/src/sys/net/bridgestp.h#1 branch .. //depot/projects/arm/src/sys/net/if_bridge.c#17 integrate .. //depot/projects/arm/src/sys/net/if_bridgevar.h#6 integrate .. //depot/projects/arm/src/sys/net/if_ethersubr.c#12 integrate .. //depot/projects/arm/src/sys/net/if_gif.c#8 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211.c#9 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211.h#3 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_freebsd.h#3 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_ioctl.c#10 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_ioctl.h#6 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_output.c#8 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_proto.c#8 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_proto.h#5 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_var.h#10 integrate .. //depot/projects/arm/src/sys/netgraph/ng_ether.c#4 integrate .. //depot/projects/arm/src/sys/powerpc/conf/GENERIC#9 integrate .. //depot/projects/arm/src/sys/powerpc/conf/NOTES#3 integrate .. //depot/projects/arm/src/sys/powerpc/include/md_var.h#2 integrate .. //depot/projects/arm/src/sys/powerpc/include/ofw_machdep.h#2 integrate .. //depot/projects/arm/src/sys/powerpc/include/pcb.h#2 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/clock.c#4 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/mem.c#2 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/ofw_machdep.c#3 integrate .. //depot/projects/arm/src/sys/powerpc/psim/sio_iobus.c#3 delete .. //depot/projects/arm/src/sys/powerpc/psim/uart_iobus.c#1 branch .. //depot/projects/arm/src/sys/sys/socket.h#4 integrate .. //depot/projects/arm/src/tools/tools/nanobsd/FlashDevice.sub#2 integrate .. //depot/projects/arm/src/usr.bin/enigma/enigma.c#2 integrate .. //depot/projects/arm/src/usr.bin/truss/i386-fbsd.c#2 integrate Differences ... ==== //depot/projects/arm/src/UPDATING#2 (text+ko) ==== @@ -21,6 +21,13 @@ developers choose to disable these features on build machines to maximize performance. +20060725: + enigma(1)/crypt(1) utility has been changed on 64 bit architectures. + Now it can decrypt files created from different architectures. + Unfortunately, it is no longer able to decrypt a cipher text + generated with an older version on 64 bit architectures. + If you have such a file, you need old utility to decrypt it. + 20060709: The interface version of the i4b kernel part has changed. So after updating the kernel sources and compiling a new kernel, @@ -591,4 +598,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.451 2006/07/09 21:16:06 twinterg Exp $ +$FreeBSD: src/UPDATING,v 1.452 2006/07/26 16:31:10 jkim Exp $ ==== //depot/projects/arm/src/bin/sh/sh.1#2 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 -.\" $FreeBSD: src/bin/sh/sh.1,v 1.120 2006/06/21 12:01:52 yar Exp $ +.\" $FreeBSD: src/bin/sh/sh.1,v 1.121 2006/07/26 06:48:18 yar Exp $ .\" -.Dd June 21, 2006 +.Dd July 26, 2006 .Dt SH 1 .Os .Sh NAME @@ -1361,9 +1361,8 @@ are built-in because they need to perform some operation that cannot be performed by a separate process. In addition to -these, a built-in version of the -.Xr test 1 -command is provided for efficiency. +these, built-in versions of essential utilities +are provided for efficiency. .Bl -tag -width indent .It Ic \&: A null command that returns a 0 (true) exit value. @@ -1385,6 +1384,9 @@ If it is not found in the .Ev PATH , it is sought in the current working directory. +.It Ic \&[ +A built-in equivalent of +.Xr test 1 . .It Ic alias Oo Ar name Ns Oo = Ns Ar string Oc ... Oc If .Ar name Ns = Ns Ar string @@ -1961,6 +1963,9 @@ the value of $2 to the value of $3, and so on, decreasing the value of $# by one. If there are zero positional parameters, shifting does not do anything. +.It Ic test +A built-in equivalent of +.Xr test 1 . .It Ic times Print the amount of time spent executing the shell and its children. The first output line shows the user and system times for the shell ==== //depot/projects/arm/src/etc/rc.d/ipfw#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ipfw,v 1.12 2006/02/26 16:45:29 wkoszek Exp $ +# $FreeBSD: src/etc/rc.d/ipfw,v 1.13 2006/07/25 17:28:18 yar Exp $ # # PROVIDE: ipfw @@ -35,23 +35,21 @@ [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall if [ -r "${firewall_script}" ]; then - echo -n 'Starting divert daemons:' if [ -f /etc/rc.d/natd ] ; then /etc/rc.d/natd start fi . "${firewall_script}" - echo -n 'Firewall rules loaded' + echo 'Firewall rules loaded.' elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then echo 'Warning: kernel has firewall functionality, but' \ ' firewall rules are not enabled.' echo ' All ip services are disabled.' fi - echo '.' # Firewall logging # if checkyesno firewall_logging; then - echo 'Firewall logging enabled' + echo 'Firewall logging enabled.' sysctl net.inet.ip.fw.verbose=1 >/dev/null fi ==== //depot/projects/arm/src/etc/rc.d/mdconfig#2 (text) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/mdconfig,v 1.2 2006/05/18 16:04:56 flz Exp $ +# $FreeBSD: src/etc/rc.d/mdconfig,v 1.3 2006/07/25 17:19:00 pjd Exp $ # # PROVIDE: mdconfig @@ -103,6 +103,11 @@ { local _md _mp _config _type _dev _file _fs _newfs _fsck_cmd + # If there are no devices return before loading geom_md.ko. + if [ -z "${_mdconfig_list}" ]; then + return + fi + kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load." for _md in ${_mdconfig_list}; do ==== //depot/projects/arm/src/etc/rc.d/mdconfig2#2 (text) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/mdconfig2,v 1.2 2006/05/18 16:04:56 flz Exp $ +# $FreeBSD: src/etc/rc.d/mdconfig2,v 1.3 2006/07/25 17:19:00 pjd Exp $ # # PROVIDE: mdconfig2 @@ -111,6 +111,11 @@ { local _md _fs _mp _mounted _dev _config _type _file _owner _perms _files _populate _fsck_cmd _i + # If there are no devices return before loading geom_md.ko. + if [ -z "${_mdconfig2_list}" ]; then + return + fi + kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load." for _md in ${_mdconfig2_list}; do ==== //depot/projects/arm/src/etc/rc.d/natd#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/natd,v 1.3 2004/10/22 19:36:03 andre Exp $ +# $FreeBSD: src/etc/rc.d/natd,v 1.4 2006/07/25 17:25:44 yar Exp $ # # PROVIDE: natd @@ -12,8 +12,8 @@ name="natd" rcvar=`set_rcvar` command="/sbin/${name}" +pidfile="/var/run/${name}.pid" start_precmd="natd_precmd" -start_cmd="natd_start" natd_precmd() { @@ -24,31 +24,25 @@ fi fi - return 0 -} + if [ -n "${natd_interface}" ]; then + dhcp_list="`list_net_interfaces dhcp`" + for ifn in ${dhcp_list}; do + case "${natd_interface}" in + ${ifn}) + rc_flags="$rc_flags -dynamic" + ;; + esac + done -natd_start() -{ - dhcp_list="`list_net_interfaces dhcp`" - for ifn in ${dhcp_list}; do - case ${natd_interface} in - ${ifn}) - natd_flags="$natd_flags -dynamic" - ;; - *) - ;; - esac - done - if [ -n "${natd_interface}" ]; then - if echo ${natd_interface} | \ - grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then - natd_flags="$natd_flags -a ${natd_interface}" + if echo "${natd_interface}" | \ + grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then + rc_flags="$rc_flags -a ${natd_interface}" else - natd_flags="$natd_flags -n ${natd_interface}" + rc_flags="$rc_flags -n ${natd_interface}" fi fi - echo -n ' natd' - ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + + return 0 } load_rc_config $name ==== //depot/projects/arm/src/etc/rc.subr#2 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: rc.subr,v 1.66 2006/04/01 10:05:50 he Exp $ -# $FreeBSD: src/etc/rc.subr,v 1.59 2006/06/21 09:42:55 yar Exp $ +# $FreeBSD: src/etc/rc.subr,v 1.64 2006/07/26 08:03:24 yar Exp $ # # Copyright (c) 1997-2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -613,7 +613,7 @@ fi if [ ! -x ${_chroot}${command} ]; then - info "run_rc_command: cannot run ($command)." + warn "run_rc_command: cannot run $command" return 1 fi @@ -656,7 +656,7 @@ return 1 fi - # setup the command to run, and run it + # setup the full command to run # echo "Starting ${name}." if [ -n "$_chroot" ]; then @@ -674,6 +674,7 @@ fi fi + # run the full command; # if the cmd failed and force # isn't set, exit # @@ -1141,7 +1142,7 @@ return 1 fi if [ ! -d "$linkdir" ]; then - warn "$_me: the directory $linkdir does not exist" + warn "$_me: the directory $linkdir does not exist." return 1 fi if ! ln -sf $src $link; then @@ -1358,12 +1359,12 @@ # Code common to scripts that need to load a kernel module # if it isn't in the kernel yet. Syntax: -# load_kld [-e regexp] [-m modname] filename +# load_kld [-e regex] [-m module] file # where -e or -m chooses the way to check if the module # is already loaded: -# regexp is egrep'd in the output from `kldstat -v', -# modname is passed to `kldstat -m'. -# The default way is as though `-m filename' were specified. +# regex is egrep'd in the output from `kldstat -v', +# module is passed to `kldstat -m'. +# The default way is as though `-m file' were specified. load_kld() { local _loaded _mod _opt _re @@ -1372,9 +1373,13 @@ case "$_opt" in e) _re="$OPTARG" ;; m) _mod="$OPTARG" ;; + *) err 3 'USAGE: load_kld [-e regex] [-m module] file' ;; esac done shift $(($OPTIND - 1)) + if [ $# -ne 1 ]; then + err 3 'USAGE: load_kld [-e regex] [-m module] file' + fi _mod=${_mod:-$1} _loaded=false if [ -n "$_re" ]; then @@ -1390,7 +1395,11 @@ if ! kldload "$1"; then warn "Unable to load kernel module $1" return 1 + else + info "$1 kernel module loaded." fi + else + debug "load_kld: $1 kernel module already loaded." fi return 0 } ==== //depot/projects/arm/src/lib/libc/gen/tls.c#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/lib/libc/gen/tls.c,v 1.9 2006/03/28 06:06:38 davidxu Exp $ + * $FreeBSD: src/lib/libc/gen/tls.c,v 1.10 2006/07/26 16:56:56 imp Exp $ */ /* @@ -40,8 +40,6 @@ #include "libc_private.h" -/* XXX not sure what variants to use for arm. */ - __weak_reference(__libc_allocate_tls, _rtld_allocate_tls); __weak_reference(__libc_free_tls, _rtld_free_tls); ==== //depot/projects/arm/src/lib/libc/net/Makefile.inc#2 (text+ko) ==== @@ -1,5 +1,5 @@ # from @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 -# $FreeBSD: src/lib/libc/net/Makefile.inc,v 1.60 2006/05/21 11:19:36 ume Exp $ +# $FreeBSD: src/lib/libc/net/Makefile.inc,v 1.61 2006/07/26 08:36:46 yar Exp $ # machine-independent net sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/net ${.CURDIR}/net @@ -21,7 +21,11 @@ SYM_MAPS+=${.CURDIR}/net/Symbol.map -CFLAGS+=-DINET6 -I${.OBJDIR} +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+=-DINET6 +.endif + +CFLAGS+=-I${.OBJDIR} # name6.c refers res_private.h CFLAGS+=-I${.CURDIR}/resolv ==== //depot/projects/arm/src/lib/libc/net/name6.c#2 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.60 2006/07/23 07:07:49 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.61 2006/07/26 08:35:46 yar Exp $"); #include "namespace.h" #include <sys/param.h> @@ -2025,7 +2025,9 @@ querybuf *buf; char qbuf[MAXDNAME+1]; char *hlist[2]; +#ifdef INET6 char *tld6[] = { "ip6.arpa", NULL }; +#endif char *tld4[] = { "in-addr.arpa", NULL }; char **tld; res_state statp; ==== //depot/projects/arm/src/lib/libc/stdlib/malloc.c#2 (text+ko) ==== @@ -185,7 +185,7 @@ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.129 2006/07/01 16:51:10 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.130 2006/07/27 04:00:12 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -835,15 +835,13 @@ static arena_chunk_t *arena_chunk_alloc(arena_t *arena); static void arena_chunk_dealloc(arena_chunk_t *chunk); static void arena_bin_run_promote(arena_t *arena, arena_bin_t *bin, - arena_run_t *run, size_t size); + arena_run_t *run); static void arena_bin_run_demote(arena_t *arena, arena_bin_t *bin, - arena_run_t *run, size_t size); + arena_run_t *run); static arena_run_t *arena_run_alloc(arena_t *arena, bool large, size_t size); static void arena_run_dalloc(arena_t *arena, arena_run_t *run, size_t size); -static arena_run_t *arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin, - size_t size); -static void *arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin, - size_t size); +static arena_run_t *arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin); +static void *arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin); static void *arena_malloc(arena_t *arena, size_t size); static size_t arena_salloc(const void *ptr); static void *arena_ralloc(void *ptr, size_t size, size_t oldsize); @@ -1778,8 +1776,7 @@ } static void -arena_bin_run_promote(arena_t *arena, arena_bin_t *bin, arena_run_t *run, - size_t size) +arena_bin_run_promote(arena_t *arena, arena_bin_t *bin, arena_run_t *run) { assert(bin == run->bin); @@ -1850,8 +1847,7 @@ } static void -arena_bin_run_demote(arena_t *arena, arena_bin_t *bin, arena_run_t *run, - size_t size) +arena_bin_run_demote(arena_t *arena, arena_bin_t *bin, arena_run_t *run) { assert(bin == run->bin); @@ -2057,7 +2053,7 @@ } static arena_run_t * -arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin, size_t size) +arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin) { arena_run_t *run; unsigned i, remainder; @@ -2118,8 +2114,7 @@ /* bin->runcur must have space available before this function is called. */ static inline void * -arena_bin_malloc_easy(arena_t *arena, arena_bin_t *bin, arena_run_t *run, - size_t size) +arena_bin_malloc_easy(arena_t *arena, arena_bin_t *bin, arena_run_t *run) { void *ret; @@ -2131,7 +2126,7 @@ run->nfree--; if (run->nfree < run->free_min) { /* Promote run to higher fullness quartile. */ - arena_bin_run_promote(arena, bin, run, size); + arena_bin_run_promote(arena, bin, run); } return (ret); @@ -2139,18 +2134,18 @@ /* Re-fill bin->runcur, then call arena_bin_malloc_easy(). */ static void * -arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin, size_t size) +arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin) { assert(bin->runcur == NULL || bin->runcur->quartile == RUN_Q100); - bin->runcur = arena_bin_nonfull_run_get(arena, bin, size); + bin->runcur = arena_bin_nonfull_run_get(arena, bin); if (bin->runcur == NULL) return (NULL); assert(bin->runcur->magic == ARENA_RUN_MAGIC); assert(bin->runcur->nfree > 0); - return (arena_bin_malloc_easy(arena, bin, bin->runcur, size)); + return (arena_bin_malloc_easy(arena, bin, bin->runcur)); } static void * @@ -2173,10 +2168,11 @@ /* Tiny. */ size = pow2_ceil(size); bin = &arena->bins[ffs(size >> (tiny_min_2pow + 1))]; -#ifdef MALLOC_STATS +#if (!defined(NDEBUG) || defined(MALLOC_STATS)) /* - * Bin calculation is always correct, but we may need to - * fix size for the purposes of stats accuracy. + * Bin calculation is always correct, but we may need + * to fix size for the purposes of assertions and/or + * stats accuracy. */ if (size < (1 << tiny_min_2pow)) size = (1 << tiny_min_2pow); @@ -2196,9 +2192,9 @@ malloc_mutex_lock(&arena->mtx); if ((run = bin->runcur) != NULL) - ret = arena_bin_malloc_easy(arena, bin, run, size); + ret = arena_bin_malloc_easy(arena, bin, run); else - ret = arena_bin_malloc_hard(arena, bin, size); + ret = arena_bin_malloc_hard(arena, bin); #ifdef MALLOC_STATS bin->stats.nrequests++; @@ -2343,7 +2339,7 @@ run->nfree++; if (run->nfree > run->free_max) { /* Demote run to lower fullness quartile. */ - arena_bin_run_demote(arena, bin, run, size); + arena_bin_run_demote(arena, bin, run); } } else { /* Medium allocation. */ ==== //depot/projects/arm/src/lib/libfetch/Makefile#2 (text+ko) ==== @@ -1,16 +1,19 @@ -# $FreeBSD: src/lib/libfetch/Makefile,v 1.46 2006/03/17 18:54:26 ru Exp $ +# $FreeBSD: src/lib/libfetch/Makefile,v 1.47 2006/07/27 04:54:03 yar Exp $ .include <bsd.own.mk> LIB= fetch CFLAGS+= -I. -CFLAGS+= -DINET6 SRCS= fetch.c common.c ftp.c http.c file.c \ ftperr.h httperr.h INCS= fetch.h MAN= fetch.3 CLEANFILES= ftperr.h httperr.h +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DINET6 +.endif + .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_SSL DPADD= ${LIBSSL} ${LIBCRYPTO} ==== //depot/projects/arm/src/lib/libftpio/Makefile#2 (text+ko) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: src/lib/libftpio/Makefile,v 1.14 2005/07/22 17:19:01 kensmith Exp $ +# $FreeBSD: src/lib/libftpio/Makefile,v 1.15 2006/07/27 04:54:03 yar Exp $ + +.include <bsd.own.mk> LIB= ftpio SHLIB_MAJOR= 6 @@ -6,10 +8,13 @@ SRCS= ftpio.c ftperr.c INCS= ftpio.h CFLAGS+= -I${.CURDIR} -Wall -CFLAGS+= -DINET6 MAN= ftpio.3 CLEANFILES= ftperr.c +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DINET6 +.endif + ftperr.c: ftp.errors @echo '#include <stdio.h>' > ${.TARGET} @echo '#include "ftpio.h"' >> ${.TARGET} ==== //depot/projects/arm/src/lib/libkvm/kvm_proc.c#2 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.87 2005/06/24 00:37:04 peter Exp $"); +__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.88 2006/07/25 22:39:57 yar Exp $"); /* * Proc traversal interface for kvm. ps and w are (probably) the exclusive @@ -374,6 +374,13 @@ kp->ki_lockname, LOCKNAMELEN); kp->ki_lockname[LOCKNAMELEN] = 0; } + /* + * XXX: This is plain wrong, rux_runtime has nothing + * to do with struct bintime, rux_runtime is just a 64-bit + * integer counter of cputicks. What we need here is a way + * to convert cputicks to usecs. The kernel does it in + * kern/kern_tc.c, but the function can't be just copied. + */ bintime2timeval(&proc.p_rux.rux_runtime, &tv); kp->ki_runtime = (u_int64_t)tv.tv_sec * 1000000 + tv.tv_usec; kp->ki_pid = proc.p_pid; ==== //depot/projects/arm/src/lib/libmemstat/memstat.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libmemstat/memstat.h,v 1.9 2005/08/06 13:54:03 rwatson Exp $ + * $FreeBSD: src/lib/libmemstat/memstat.h,v 1.10 2006/07/26 07:46:32 jb Exp $ */ #ifndef _MEMSTAT_H_ @@ -33,7 +33,7 @@ * Number of CPU slots in library-internal data structures. This should be * at least the value of MAXCPU from param.h. */ -#define MEMSTAT_MAXCPU 16 +#define MEMSTAT_MAXCPU 32 /* * Amount of caller data to maintain for each caller data slot. Applications ==== //depot/projects/arm/src/lib/libthr/pthread.map#2 (text+ko) ==== @@ -1,8 +1,17 @@ -# $FreeBSD: src/lib/libthr/pthread.map,v 1.15 2006/05/11 07:02:52 davidxu Exp $ +# $FreeBSD: src/lib/libthr/pthread.map,v 1.16 2006/07/25 12:50:04 davidxu Exp $ LIBTHREAD_1_0 { global: ___creat; + ___pause; + ___pselect; + ___sleep; + ___system; + ___tcdrain; + ___usleep; + ___wait; + ___waitpid; __accept; + __aio_suspend; __close; __connect; __error; @@ -29,15 +38,11 @@ __sigtimedwait; __sigwait; __sigwaitinfo; + __wait3; __wait4; __write; __writev; - _aio_suspend; - _execve; _fork; - _nanosleep; - _pause; - _pselect; _pthread_atfork; _pthread_barrier_destroy; _pthread_barrier_init; @@ -169,16 +174,10 @@ _sigtimedwait; _sigwait; _sigwaitinfo; - _sleep; _spinlock; _spinlock_debug; _spinunlock; - _system; - _tcdrain; - _usleep; _vfork; - _wait; - _waitpid; accept; aio_suspend; close; @@ -338,6 +337,7 @@ usleep; vfork; wait; + wait3; wait4; waitpid; write; @@ -538,6 +538,7 @@ usleep; vfork; wait; + wait3; wait4; waitpid; write; @@ -553,7 +554,16 @@ FBSDprivate { global: ___creat; + ___pause; + ___pselect; + ___sleep; + ___system; + ___tcdrain; + ___usleep; + ___wait; + ___waitpid; __accept; + __aio_suspend; __close; __connect; __fcntl; @@ -579,15 +589,11 @@ __sigtimedwait; __sigwait; __sigwaitinfo; + __wait3; __wait4; __write; __writev; - _aio_suspend; - _execve; _fork; - _nanosleep; - _pause; - _pselect; _pthread_atfork; _pthread_barrier_destroy; _pthread_barrier_init; @@ -719,16 +725,10 @@ _sigtimedwait; _sigwait; _sigwaitinfo; - _sleep; _spinlock; _spinlock_debug; _spinunlock; - _system; - _tcdrain; - _usleep; _vfork; - _wait; - _waitpid; # Debugger needs these. _libthr_debug; ==== //depot/projects/arm/src/lib/libthr/thread/thr_init.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.36 2006/07/13 22:45:19 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.37 2006/07/25 12:50:05 davidxu Exp $ */ #include "namespace.h" @@ -123,13 +123,8 @@ * All weak references used within libc should be in this table. * This is so that static libraries will work. */ -STATIC_LIB_REQUIRE(_accept); -STATIC_LIB_REQUIRE(_close); -STATIC_LIB_REQUIRE(_connect); -STATIC_LIB_REQUIRE(_fcntl); -STATIC_LIB_REQUIRE(_fsync); -STATIC_LIB_REQUIRE(_nanosleep); -STATIC_LIB_REQUIRE(_open); + +STATIC_LIB_REQUIRE(_fork); STATIC_LIB_REQUIRE(_pthread_getspecific); STATIC_LIB_REQUIRE(_pthread_key_create); STATIC_LIB_REQUIRE(_pthread_key_delete); @@ -143,20 +138,25 @@ STATIC_LIB_REQUIRE(_pthread_mutexattr_settype); STATIC_LIB_REQUIRE(_pthread_once); STATIC_LIB_REQUIRE(_pthread_setspecific); -STATIC_LIB_REQUIRE(_read); -STATIC_LIB_REQUIRE(_readv); -STATIC_LIB_REQUIRE(_recvfrom); -STATIC_LIB_REQUIRE(_recvmsg); -STATIC_LIB_REQUIRE(_select); -STATIC_LIB_REQUIRE(_sendmsg); -STATIC_LIB_REQUIRE(_sendto); +STATIC_LIB_REQUIRE(_raise); +STATIC_LIB_REQUIRE(_sem_destroy); +STATIC_LIB_REQUIRE(_sem_getvalue); +STATIC_LIB_REQUIRE(_sem_init); +STATIC_LIB_REQUIRE(_sem_post); +STATIC_LIB_REQUIRE(_sem_timedwait); +STATIC_LIB_REQUIRE(_sem_trywait); +STATIC_LIB_REQUIRE(_sem_wait); STATIC_LIB_REQUIRE(_sigaction); STATIC_LIB_REQUIRE(_sigprocmask); STATIC_LIB_REQUIRE(_sigsuspend); +STATIC_LIB_REQUIRE(_sigtimedwait); +STATIC_LIB_REQUIRE(_sigwait); +STATIC_LIB_REQUIRE(_sigwaitinfo); +STATIC_LIB_REQUIRE(_spinlock); +STATIC_LIB_REQUIRE(_spinlock_debug); +STATIC_LIB_REQUIRE(_spinunlock); STATIC_LIB_REQUIRE(_thread_init_hack); -STATIC_LIB_REQUIRE(_wait4); -STATIC_LIB_REQUIRE(_write); -STATIC_LIB_REQUIRE(_writev); +STATIC_LIB_REQUIRE(_vfork); /* * These are needed when linking statically. All references within ==== //depot/projects/arm/src/lib/libthr/thread/thr_sig.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_sig.c,v 1.18 2006/04/04 02:57:49 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_sig.c,v 1.19 2006/07/25 12:50:05 davidxu Exp $ */ #include "namespace.h" @@ -47,6 +47,9 @@ #define DBG_MSG(x...) #endif +extern int __pause(void); +int ___pause(void); +int _raise(int); int __sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec * timeout); int __sigwaitinfo(const sigset_t *set, siginfo_t *info); @@ -145,6 +148,36 @@ { } +__weak_reference(___pause, pause); + +int +___pause(void) +{ + struct pthread *curthread = _get_curthread(); + int oldcancel; + int ret; + + oldcancel = _thr_cancel_enter(curthread); + ret = __pause(); + _thr_cancel_leave(curthread, oldcancel); + + return ret; +} + +__weak_reference(_raise, raise); + +int +_raise(int sig) +{ + int ret; + + if (!_thr_isthreaded()) + ret = kill(getpid(), sig); + else + ret = _thr_send_sig(_get_curthread(), sig); + return (ret); +} + __weak_reference(_sigaction, sigaction); int @@ -188,11 +221,30 @@ return (0); } -__weak_reference(_sigsuspend, sigsuspend); +__weak_reference(__sigsuspend, sigsuspend); int _sigsuspend(const sigset_t * set) { + sigset_t newset; + const sigset_t *pset; + int ret; + + if (SIGISMEMBER(*set, SIGCANCEL)) { + newset = *set; + SIGDELSET(newset, SIGCANCEL); + pset = &newset; + } else + pset = set; + + ret = __sys_sigsuspend(pset); + + return (ret); +} + +int +__sigsuspend(const sigset_t * set) +{ struct pthread *curthread = _get_curthread(); sigset_t newset; const sigset_t *pset; @@ -218,6 +270,24 @@ __weak_reference(__sigwaitinfo, sigwaitinfo); int +_sigtimedwait(const sigset_t *set, siginfo_t *info, + const struct timespec * timeout) +{ + sigset_t newset; + const sigset_t *pset; + int ret; + + if (SIGISMEMBER(*set, SIGCANCEL)) { + newset = *set; + SIGDELSET(newset, SIGCANCEL); + pset = &newset; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607271232.k6RCWZ4f069513>