Add an ioctl to return channel number (AUDIO_GETCHAN). This can be used
on audio/sound/audioctl devices.
Return EIO in read/write/ioctl/poll/stat if fp has been closed or is
invalid.
Update audio.4, audioio.h and audioctl(1) to reflect these changes.
the DTLB misses on large pages for example.
While here, remove a few K7 flags that do not actually exist on K7 (there
must have been a confusion between K7 and K8); and make the 'pmc list'
command a little more user-friendly.
the PMCs are system-wide, fine-grained and more tunable by the user.
We don't do application tracking, since it would require to store the PMC
values in mdproc and starting/stopping the counters on each context switch.
While this doesn't seem to be particularly difficult to achieve, I don't
think it is really interesting; and if someone really wants to measure
the performance of an application, they can simply schedctl it to a cpu
and look at the PMC results for this cpu.
Note that several options are implemented but not yet used.
by the number of concurrent I/O requests. Also introduce a new disk_wait()
function to measure requests waiting in a bufq.
iostat -y now reports data about waiting and active requests.
So far only drivers using dksubr and dk, ccd, wd and xbd collect data about
waiting requests.
This means that "mixerctl" (no args) will generate a usage msg, even when
/dev/mixer cannot be opened (or any other device given via -d or $MIXERDEVICE)
While here, get rid of "goto usage" replacing the usage: with a
static inline void __dead function... The compiler ought to optimise
the calls into essentially the same code as existed with the goto version,
but this is much cleaner.
Also, mixerctl falls back on /dev/mixer0 if /dev/mixer cannot be opened.
(that is old code - probably from when /dev/mixer was first added)
It used to do that when called as mixerctl -d /dev/mixer or with
"MIXERDEVICE=/dev/mixer mixerctl...". No longer. Now the fallback (which
is probably obsolete now anyway) only happens when the user doesn't specify
any mixer device (by either method) and the default of /dev/mixer is used.
In other cases, only the device specified is tried.
For unknown reasons, IPv6 multicast addresses are linked to a first
IPv6 address assigned to an interface. Due to the design, when removing
a first address having multicast addresses, we need to save them to
somewhere and later restore them once a new IPv6 address is activated.
mkludge stuffs support the operations.
This change links multicast addresses to an interface directly and
throws the kludge away.
Note that as usual some obsolete member variables remain for kvm(3)
users. And also sysctl net.inet6.multicast_kludge remains to avoid
breaking old ifmcstat.
TODO: currently ifnet has a list of in6_multi but obviously the list
should be protocol independent. Provide a common structure (if_multi
or something) to handle in6_multi and in_multi together as well as
ifaddr does for in_ifaddr and in6_ifaddr.
its argv[0] to NULL.
XXX Needs pullups netbsd-7-0 and netbsd-7 (bug was introduced after
netbsd-6 and never pulled up, so no netbsd-6 pullups required.)
instance per process. Virtual channels are placed in a queue, so there is
no longer a compile time limit of VAUDIOCHANS.
A new sysctl has been added to control multiple user access.
Mixer labels on virtual channels are now prefixed by vchan.
audiobell.c and audioctl have been updated to reflect these changes.
Use of fdclone was posted to tech-kern@ and improvements made.
Multiuser access control changes and the use of a queue were suggessted by
pgoyette@
:range replaces var value with an integer sequence one per word
in the current var value.
:_ stores the current var value in $_ so that it can be referred to
later in the modifier series.
Reviewed by: christos
netstat appends '*' to the name of an interface without IFF_UP, so
if_nametoindex which is used in mc_print fails. mc_print needs just
an interface index so pass it instead of a tweaked interface name.
The .SS field of the datetime argument of -t option can have range from 0 to 60
as per the 1003.1 2008 standard. POSIX has removed all mentions of double leap
seconds, therefore the allowed range of seconds is now [0,60].
Also, add an ENVIRONMENT section, as the interpretation of the datetime
argument in -t option depends on the TZ environment variable.
Add an xref for parsedate(3) in SEE ALSO.
ok wiz@
default, build a handful of tools as n64 so they work properly.
unfortunately, they're also static as dynamic n64 has a problem.
of these tools pstat is probably the lowest hanging fruit to convert
to sysctl. systat would be close were it not for the netstat screen,
which includes netstat itself.
the rest are difficult to perhaps foolish.
the upside is that netstat, pmap and fstat all work properly now.
every platform. Thus setting OBJMACHINE, allowed one to keep
in-tree objdirs with multiple builds. With the advent of evb*, this
has become impossible until now. Introduce OBJMACHINE_ARCH that
adds ${MACHINE_ARCH} to the objdir so that we have unique objdirs
per build again. Until we restructure things to that this is not
necessary, it is the simplest fix.
posted to tech-kern:
* Simultaneous playback and mixing of multiple streams
* Playback streams can be of different encoding, frequency, precision
and number of channels
* Simultaneous recording to different formats
* One audio device per process
* Sysctls to set the common format frequency, precision and channels
* Independent mixer controls for recording/playback per stream
* Utilizes little cpu time for multiple streams / good performance
* Compatible with existing programs that use OSS/NetBSD audio
* Changes to audioctl(1) to allow specifying process id for corresponding
audio device
loop, to use signals properly. There are two copies of this code; one
uses kvm and the other uses sysctls. One copy had been updated to use
sigset_t and sigsuspend; the other was using vintage sigpause(). Sync
up the code so both use sigpause. Also, use sig_atomic_t, and block
SIGALRM when not waiting for it to avoid a small and unlikely but real
race.
Since the non-modernized copy of the code *had* for some been
modernized to use setitimer instead of just alarm(), propagate that
change to the other copy.
These copies could share more logic than they do.
The lengths of the lines being compared were not correct. Essentially, we
were comparing the length of the buffers instead of the length of the strings.
This patch also avoids calling skip() twice for the same line.
Thanks to Rin Okuyama for the patch.
if the lenghts are equal before calling strcmp(3). Most of the times, the call
to strcmp(3) can be saved if the lines are not of the same length.
Thanks to Christos for the reviews
Remove main() function prototype if present.
Mark usage() as __dead if not already.
Binaries generated with & without these patches were compared with diff -r.
well as *interrupted* targets to be deleted. The name and behavior of
the variable matches gmake.
Also fix a glitch in newline output on error in compat mode that I
discovered while doing it.
Closes PR 51376.
Generalise in stating that this version is not bug for bug compatible with other
implementations.
Bump date.
Via FreeBSD bug 181390 with feedback from Warren Block.
The filter is applied to paths Read or Excuted, and if it expands to
nothing, the entry is skipped.
For example; dirdeps.mk can set this to:
.MAKE.META.IGNORE_FILTER = M*/${.MAKE.DEPENDFILE_PREFIX}*
when checking if DIRDEPS_CACHE is up to date, where only Makefile.depend*
are of interest.
(-ia) and comment in the code where this is missing?
XXX: should that be an ioctl or sysctl? provide getifmultiaddrs() via the
routing socket? I guess since this is just for netstat a simple sysctl or
ioctl would suffice. I lean towards sysctl.
attributes against a user-specified timestamp (rather than the
attributes of a reference file).
Update the parse routines so they have access to the name of the
option being parsed. This enables accurate error reporting for
"aliases" of primaries.
Now that aliases work, introduce some aliases for consistency with
Gnu findutils.
Instead of using a statically allocated buffer, manage the buffer at run-time
and reallocate as needed.
It was dumping core for following two cases:
man evrpc | ul
man xdm | ul
While there, also remove __P macro from function prototypes.
Ok from Christos.
earlier statement concerning n being prefaced by a plus or minus.
(These exceptions to the +/- rule noted by kre@)
While here, fix markup error. .Em for emphasis (stress) rather
than .Ar :)
script from othersrc to usr.bin/sys_info
The sys_info script is a small script which will show the version
information for installed utilities. It also works on the kernel, and
on most libraries.
Its use is as follow:
[19:41:13] agc@netbsd-002 ...external/bsd/sys_info [4568] > ./sys_info -a
awk-20121220
bind-9.10.3pl3
bzip2-1.0.6
calendar-20160601
ftpd-20110904
g++-4.8.5
gcc-4.8.5
grep-2.5.1anb1
gzip-20150113
bozohttpd-20151231
NetBSD-7.99.26
netpgp-3.99.17
netpgpverify-20160214
ntp-4.2.8pl5
openssl-1.0.1r
sqlite3-3.12.2
openssh-7.1
opensshd-7.1
tcsh-6.19.00
xz-5.2.1
[19:41:20] agc@netbsd-002 ...external/bsd/sys_info [4569] > ./sys_info ntp ssh netpgp
ntp-4.2.8pl5
openssh-7.1
netpgp-3.99.17
[19:41:31] agc@netbsd-002 ...external/bsd/sys_info [4570] > ./sys_info ntp ssh netbsd
ntp-4.2.8pl5
openssh-7.1
NetBSD-7.99.26
[19:41:38] agc@netbsd-002 ...external/bsd/sys_info [4571] >
The -a option can be given to the script to print out the information
on all known components.
The sys_info script also works on libraries, returning their
"versions" as given by the shared object version numbers.
[19:45:06] agc@netbsd-002 ...external/bsd/sys_info [4572] > ./sys_info libevent libXfont libc netbsd
libevent-4.0
libXfont-3.0
libc-12.200
NetBSD-7.99.26
[19:45:27] agc@netbsd-002 ...external/bsd/sys_info [4573] >
Alistair Crooks
Wed Jun 1 19:44:01 PDT 2016
realpath(3) is expensive, and meta mode at least uses it extensively.
We use cached_realpath() to save the result of successful calls to
realpath(3) in a private variable context.
This improves the worst case performance (eg examining libc with
nothing to do) by a factor of 4.
Reviewed by: christos
Both meta_create() and meta_oodate() now share meta_needed()
to indicate if a .meta file is needed.
This allows for deciding that missing .meta file is cause of out-of-date.
The new knob 'missing-meta' controlls this, and is off by default
since the side effect files of generators like yacc will typically need
.NOMETA to avoid problems.
This however makes it much easier for folk to switch back and forth
with meta mode (eg. FreeBSD's normal build can leverage meta mode for
improved reliablility without need to clean).
Also if .MAKE.MODE does not contain 'nofilemon', the knob
'missing-filemon' allows control as to whether missing filemon data
should cause the target to be out-of-date.
Again off by default.
setting \n as the record delimited using a numeric value rather than literal
\n - and to not incorrectly turn \n into a field separator if -R is used to
make some other char the record separator (\n becomes a field separator in
that case as long as the field separator remains "white space" but should not
be in any other case - unless set explicitly of course.)
Plus more cosmetic changes - the man page and usage are updated to make it
more clear that the 2 (or 1) params to -k are not fields (field1 and field2)
but specifiers of the beginning and end of one key field. There was an
unused 'x' option in the GETOPTS string. The usage message is reformatted
to display properly on both 80 col and > 80 col displays (on < 80 it will
still probably look pretty ugly ... perhaps not quite so bad though), and
is also updated to show the different usage for the -c case (and -C) from the
others (only 1 file permitted) - the man page synopsis has a similar update.
Using more than one of -c -C or -m generates a usage message rather than
just ignoring the -m as it did before (there was no -C before of course).
Aside from the bug fix to the interaction between -R and -t, there are no
changes that affect the way anything is sorted (or read, or written).
Discussed on tech-userlevel earlier this week.
number of warnings during build.
XXX There are still some other warnings remaining to be resolved.
Fixes PR bin/48195 although we really should go back someday and fix
this correctly (by replacing all uses of mktemp(3)!)
If -B compatMake will be true and should be honored.
If -j forceJobs will be true and the command line supplied .MAKE.JOBS
should be respected - for consistency with other usage.