Commit Graph

56624 Commits

Author SHA1 Message Date
Daniel Eischen
f434cd45ed Remove (int) file descriptor locking. It should be up to the
application to provide locking for I/O operations.  This doesn't
break any of my tests, but the old behavior can be restored by
compiling with _FDLOCKS_ENABLED.  This will eventually be removed
when it is obvious it does not cause any problems.

Remove most of flockfile implementation, with the exception of
flockfile_debug.

Make error messages more informational (submitted by Mike Heffner
<spock@techfour.net>, who's now known as mikeh@FreeBSD.org).
2001-02-11 22:07:32 +00:00
Daniel Eischen
29ac6bd228 libc MT-safety, part 2.
Add a lock to FILE.  flockfile and friends are now implemented
(for the most part) in libc.  flockfile_debug is implemented in
libc_r; I suppose it's about time to kill it but will do it in
a future commit.

Fix a potential deadlock in _fwalk in a threaded environment.
A file flag (__SIGN) was added to stdio.h that, when set, tells
_fwalk to ignore it in its walk.  This seemed to be needed in
refill.c because each file needs to be locked when flushing.

Add a stub for pthread_self in libc.  This is needed by flockfile
which is allowed by POSIX to be recursive.

Make fgetpos() error return value (-1) match man page.

Remove recursive calls to locked functions (stdio); I think I've
got them all, but I may have missed a couple.

A few K&R -> ANSI conversions along with removal of a few instances
of "register".

$Id$ -> $FreeBSD$ in libc/stdio/rget.c

Not objected to:	-arch, a few months ago
2001-02-11 22:06:43 +00:00
Daniel Eischen
5b62961a49 libc MT-safety, part 2.
Add a lock to FILE and define an additional flag.
2001-02-11 22:04:18 +00:00
David Malone
d3d8587299 Uname is in section 3 of the manual pages.
PR:		25008
Submitted by:	fullermd@over-yonder.net
2001-02-11 21:19:31 +00:00
Nik Clayton
6bd7c68cf0 Mention PROT_NONE in the list of possible protections.
Pointed out by:	kris
2001-02-11 19:30:41 +00:00
Nik Clayton
59b58b1622 Include mmap(2) in the list of memory allocation functions.
Reviewed by:	hackers
2001-02-11 19:28:36 +00:00
Nik Clayton
38f2cd4aa4 .Xr to mmap. 2001-02-11 18:53:50 +00:00
Nik Clayton
3db072ec5e Note that mmap(2) can allocate memory, as well as mapping existing files,
in the .Nd.

Reviewed by:	hackers
2001-02-11 18:51:17 +00:00
Gerard Roudier
cf0feb71dd LSI/SYMBIOS/NCR 53C[8XX|10XX] supported hardware updated.
(One may check if the 8 words added are correct english :) )
2001-02-11 18:13:15 +00:00
Nik Clayton
480e9923d5 Add a man page for the dbm_* functions, and update the Makefile to link
it in.

Some review from -hackers (some time ago), and I think the best way to
get this improved (if it needs improving) or updating, is to bring it in.

PR:             docs/12557
Submitted by:   Tim Singletary <tsingle@triana.gsfc.nasa.gov>
2001-02-11 17:24:25 +00:00
Mark Murray
d70736850e Make a big improvement to entropy-harvesting speed by not having any
locks (only atomic assigns) in the harvest ringbuffer.
2001-02-11 16:21:35 +00:00
Akinori MUSHA
af989ec5ea Add ja_JP.EUC locale support for LC_MESSAGES, LC_MONETARY, and LC_NUMERIC. 2001-02-11 16:19:43 +00:00
Jeroen Ruigrok van der Werven
b37eee8d45 Add ko_KR.EUC locale support for LC_MESSAGES, LC_MONETARY, and LC_NUMERIC.
Submitted by:	CHOI Junho <cjh@kr.FreeBSD.org>
2001-02-11 15:40:01 +00:00
Gerard Roudier
b1bec479be Fix:
- Missing cpu_to_scr() added (endian-ness).

Improvement (fix|workaroung??):
- Blindly firing a PPR can lead to some messy situations due to
  various causes or misfeatures, for example:
  * The 53C1010-[33|66] supports offset 62 in DT mode, but only
    offset 31 in ST mode. As a result, a PPR(DT, offset 62)
    responded with PPR(ST, any offset > 31) must be rejected.
  * A device that doesn't know about PPR should reject it, but
    may also be confused by this message.
  When a PPR encounters problems, the driver now patches the goal
  transfer settings for legacy negotiations to be performed later
  with the offending target. This give a chance for bad situations
  to be fixed automagically.
2001-02-11 15:38:06 +00:00
Alexey Zelkin
fc19bba6aa Don't use hardcoded struct size, use offsetof() instead (make size calculations
dynamic)
2001-02-11 15:09:31 +00:00
Alexey Zelkin
9040b756dd Don't try to convert grouping strings in case if C or POSIX locale
was explicitly specified.

Submitted by:	ache
2001-02-11 15:07:26 +00:00
Mark Murray
d888fc4e73 RIP <machine/lock.h>.
Some things needed bits of <i386/include/lock.h> - cy.c now has its
own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK()
has been moved to <i386/include/apic.h> (AKA <machine/apic.h>).
Reviewed by:	jhb
2001-02-11 10:44:09 +00:00
Bosko Milekic
a57815efd2 Clean up RST ratelimiting. Previously, ratelimiting occured before tests
were performed to determine if the received packet should be reset. This
created erroneous ratelimiting and false alarms in some cases. The code
has now been reorganized so that the checks for validity come before
the call to badport_bandlim. Additionally, a few changes in the symbolic
names of the bandlim types have been made, as well as a clarification of
exactly which type each RST case falls under.

Submitted by: Mike Silbersack <silby@silby.com>
2001-02-11 07:39:51 +00:00
Bosko Milekic
122a814af5 Long awaited style fixup in mbuf code. Get rid of K&R style prototyping
and function argument declarations. Make sure that functions that are
supposed to return a pointer return NULL in case of failure. Don't cast
NULL. Finally, get rid of annoying `register' uses.
2001-02-11 05:02:06 +00:00
Matt Jacob
410b556714 Eliminate ISP2100_FABRIC- we always allow for fabric now. Add an
isp_iid_set/isp_iid for fibre channel- this is because we now
fake a port database entry for ourselves. Add the additional loop
states between LOOP_PDB_RCVD and LOOP_READY.

Change and comment on a wad of Fibre Channel isp_control functions.
Change and comment on some of the ISPASYNC Fibre Channel events.
2001-02-11 03:56:48 +00:00
Matt Jacob
b21d3f4ef8 Add structure defining FC-AL position maps. The only tool that I know of
that really uses this is luxadm(8) under Solaris.
2001-02-11 03:53:58 +00:00
Matt Jacob
b9b599fe4c Shuffle around how we do isp_disable management- make sure we return 0 so
the unit number doesn't get reused.

Make sure that if we've compiled for ISP_TARGET_MODE we set the
default role to be ISP_ROLE_INITIATOR|ISP_ROLE_TARGET.

Do some misc other cleanups.
2001-02-11 03:53:23 +00:00
Matt Jacob
6b528b1a1e Add isp_fc_runstate function- this function's purpose is to, in stages,
and depending on role, make sure link is up, scan the fabric (if we're
connected to a fabric), scan the local loop (if appropriate), merge
the results into the local port database then, check once again
to make sure we have f/w at FW_READY state and the the loopstate
is LOOP_READY.
2001-02-11 03:52:04 +00:00
David E. O'Brien
d87a6e73bd Default the plist dir as we know where it is relative to us. 2001-02-11 03:50:32 +00:00
David E. O'Brien
9804bd18b2 Minor comment & doc tweak. 2001-02-11 03:49:34 +00:00
Matt Jacob
250bc0aa8b Roll minor version. Remove ISP2100_FABRIC define (unneeded now).
Comment out usage of ISP_SMPLOCK- I have my doubts that this works sanely
as yet because CAM itself still needs Giant. I *was* dropping my lock
and grabbing Giant when doing the upcall for completion, but this is all
seems ridiculous until CAM is fixed.
2001-02-11 03:48:54 +00:00
Matt Jacob
d6e5500f27 Do some cleanup based upon adapter role- mainly not enabling interrupts
if we're ISP_ROLE_NONE. Change ISPASYNC_LOGGED_INOUT to ISPASYNC_PROMENADE.
Make sure we note if something is a fabric device.

Target mode:
Finally fix (to a first approximation) SCSI Target Mode again- we needed
to correctly check against CAM_TARGET_WILDCARD and CAM_LUN_WILDCARD
so that targbh won't confuse us. Comment out the drainqueue stuff for
now. Use isp_fc_runstate instead if isp_control/ISPCTL_FCLINK_TEST.
2001-02-11 03:47:39 +00:00
Matt Jacob
b2b4adaa33 Minor stuff:
Remove ISP2100_FABRIC defines- we always handle fabric now. Insert
isp_getmap helper function (for getting Loop Position map). Make
sure we (for our own benefit) mark req_state_flags with RQSF_GOT_SENSE
for Fibre Channel if we got sense data- the !*$)!*$)~*$)*$ Qlogic
f/w doesn't do so. Add ISPCTL_SCAN_FABRIC, ISPCTL_SCAN_LOOP, ISPCTL_SEND_LIP,
and ISPCTL_GET_POSMAP isp_control functions. Correctly send async notifications
upstream for changes in the name server, changes in the port database, and
f/w crashes. Correctly set topology when we get a ASYNC_PTPMODE event.

Major stuff:
Quite massively redo how we handle Loop events- we've now added several
intermediate states between LOOP_PDB_RCVD and LOOP_READY. This allows us
a lot finer control about how we scan fabric, whether we go further
than scanning fabric, how we look at the local loop, and whether we
merge entries at the level or not. This is the next to last step for
moving managing loop state out of the core module entirely (whereupon
loop && fabric events will simply freeze the command queue and a thread
will run to figure out what's changed and *it* will re-enable the queu).
This fine amount of control also gets us closer to having an external
policy engine decide which fabric devices we really want to log into.
2001-02-11 03:44:43 +00:00
Matt Jacob
bfc656f6d4 update to latest and greatest f/w 2001-02-11 03:35:45 +00:00
Bosko Milekic
5746a1d866 - Place back STR string declarations for lock/unlock strings used for KTR_LOCK
tracing in order to avoid duplication.
- Insert some tracepoints back into the mutex acq/rel code, thus ensuring
  that we can trace all lock acq/rel's again.
- All CURPROC != NULL checks are MPASS()es (under MUTEX_DEBUG) because they
  signify a serious mutex corruption.
- Change up some KASSERT()s to MPASS()es, and vice-versa, depending on the
  type of problem we're debugging (INVARIANTS is used here to check that
  the API is being used properly whereas MUTEX_DEBUG is used to ensure that
  something general isn't happening that will have bad impact on mutex
  locks).

Reminded by: jhb, jake, asmodai
2001-02-11 02:54:16 +00:00
Andrey A. Chernov
8073a93c76 Use decimal point from locale 2001-02-11 02:25:56 +00:00
Andrey A. Chernov
124d32d6a9 Change localizing to LC_ALL 2001-02-10 23:25:09 +00:00
Matt Jacob
c83633a4ff Temporary workaround to get things to compile. I could have updated
genassym here, but what I've also noticed is that we're dorking
with a mutex directly at assembler level- I'm not sure that this
is wise at this stage in the SMP port- I think it's going to be much
safer for a while to do things in C until SMP wunderkind figure out
what works and slow down this 3 order differential...
2001-02-10 23:22:49 +00:00
Andrey A. Chernov
e566292a45 Add missing 4-th space at the end of int_curr_symbol 2001-02-10 23:07:05 +00:00
Andrzej Bialecki
6d8476df78 Resurrect Minix sh(1), after its license has been changed to BSD one. 2001-02-10 22:57:33 +00:00
Andrey A. Chernov
e1fc0c16f0 Localize it (LC_NUMERIC) 2001-02-10 22:46:47 +00:00
Andrzej Bialecki
7142386acc Add Polish locale. 2001-02-10 22:44:31 +00:00
Andrzej Bialecki
04d949605c Unbreak by syncing with changes in <sys/sysctl.h> macros. 2001-02-10 22:36:05 +00:00
Jake Burkholder
3cbe75a414 Clear the reschedule flag after finding it set in userret(). This
used to be in cpu_switch(), but I don't see any difference between
doing it here.
2001-02-10 20:33:35 +00:00
Alexey Zelkin
cb03ae3061 make it possible to specify grouping number from range 0..CHAR_MAX,
not only one-digit number
2001-02-10 20:22:45 +00:00
Wilko Bulte
208058ad79 -Document DS20 serial/graphics console (as it bit me yesterday.. again.. grr)
-CS20 can have 2 CPUs but we don't have SMP currently on alpha
2001-02-10 20:22:06 +00:00
Alexey Zelkin
7d2cc62ba3 Use "namespace.h" and "un-namespace.h"
Requested by:	deischen
2001-02-10 19:57:26 +00:00
Jake Burkholder
c11f93b3e7 Acquire sched_lock around need_resched() in roundrobin() to satisfy
assertions that it is held.  Since roundrobin() is a timeout there's
no possible way that it could be called with sched_lock held.
2001-02-10 19:07:32 +00:00
Andrey A. Chernov
f580cdd647 Back out my "3;3" -> something change. While technikally the same, it only
leads to confusion.

el_GR: change "0;0" to "-1".
"0" is repeater for previous number, not no grouping
2001-02-10 19:06:32 +00:00
Andrey A. Chernov
f816f51e9c Back out my "3;3" -> something changes. While technikally the same, it only
leads to confusion.
2001-02-10 18:51:51 +00:00
Justin T. Gibbs
bfadd24d57 aic7xxx.c:
Style nits.

	Make sure that our selection hardware is disabled
	as soon as possible after detecting a busfree and
	even go so far as to disable the selection hardware
	in advance of an event that will cause a busfree
	(ABORT or BUS DEVICE RESET message).  The concern
	is that the selection hardware will select a target
	for which, after processing the bus free, there
	will be no commands pending.  The sequencer idle
	loop will re-enable the selection should it still be
	necessary.

	In ahc_handle_scsiint(), clear SSTAT0 events several
	PCI transactions (most notably reads) prior to clearing
	SCSIINT.  The newer chips seem to take a bit of time to
	see the change which can make the clearing of SCSIINT
	ineffective.

	Don't bother panicing at the end of ahc_handle_scsiint().
	Getting to the final else just means we lost the race
	with clearing SCSIINT.

	In ahc_free(), handle init-level 0.  This can happen when we
	fail the attach for RAID devices.  While I'm here, also kill
	the parent dma tag.

	In ahc_match_scb(), consider initiator ccbs to be any
	that are not from the target mode group.  This fixes
	a bug where an external target reset CCB was not getting
	cleaned up by the reset code.

	Don't bother freezing a ccb in any of our "abort" routines
	when the status is set to CAM_REQ_CMP.  This can happen
	for a target reset ccb.

aic7xxx.reg:
	Reserve space for a completion queue.  This will be used
	to enhance performance in the near future.

aic7xxx.seq:
	Remove an optimization for the 7890 autoflush bug that
	turned out to allow, in rare cases, some data to get
	lost.

	Implement a simpler, faster, fix for the PCI_2_1 retry
	bug that hangs the sequencer on an SCB dma for certain chips.

	Test against SAVED_SCSIID rather than SELID during target
	reselections.  This is how we always did it in the past,
	but the code was modified while trying to work around an
	issue with the 7895.  SAVED_SCSIID takes into account
	twin channel adapters such as the 2742T, whereas SELID
	does not have the channel bit.  This caused invalid
	selection warnings and other strangeness on these cards.

aic7xxx_pci.c
	Use the correct mask for checking the generic aic7892
	entry.
2001-02-10 18:04:27 +00:00
Brian Somers
49ed07a3c0 A better fix for the PacketAliasProxyRule() call.
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
2001-02-10 17:26:14 +00:00
Alexey Zelkin
1bd7723d09 . Fix semantics of grouping (LC_MONETARY::mon_grouping,
LC_NUMERIC::grouping) values.
. Always set __XXX_changed flags then loading numeric & monetary locale
  categories to allow localeconv() to use C locale also.
2001-02-10 15:36:46 +00:00
Jeroen Ruigrok van der Werven
531f27501e Add en_NZ.ISO_8859-1. 2001-02-10 13:46:59 +00:00
Alexey Zelkin
5d2b53e674 activate cs_CZ.ISO_8859-2 and el_GR.ISO_8859-7 2001-02-10 13:35:30 +00:00