]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years ago - Don't overrun the ldt buffer.
Jeff Roberson [Wed, 2 Apr 2003 22:53:52 +0000 (22:53 +0000)]
 - Don't overrun the ldt buffer.

Submitted by: gordan@freebsd.org

21 years agoWhen kill(-1) returns ESRCH, it could be because the current process
Robert Watson [Wed, 2 Apr 2003 22:13:56 +0000 (22:13 +0000)]
When kill(-1) returns ESRCH, it could be because the current process
doesn't have a process group, which can occur if you're working with
a custom init that doesn't set up a full tty context.  Rather than
refusing to reboot, ignore ESRCH from the kill attempt in reboot(8).

21 years agoLock the process before sending it a SIGIO. Not doing so is a panic(2)
John Baldwin [Wed, 2 Apr 2003 21:54:51 +0000 (21:54 +0000)]
Lock the process before sending it a SIGIO.  Not doing so is a panic(2)
implementation with INVARIANTS.

21 years agoAdd handling for cancelled events in the g_call_me() methods.
Poul-Henning Kamp [Wed, 2 Apr 2003 21:10:04 +0000 (21:10 +0000)]
Add handling for cancelled events in the g_call_me() methods.

21 years agoChange events to have an array of "void *" references, and give the
Poul-Henning Kamp [Wed, 2 Apr 2003 20:41:18 +0000 (20:41 +0000)]
Change events to have an array of "void *" references, and give the
event posting functions varargs to fill these.

Attribute g_call_me() to appropriate g_geom's where necessary.

Add a flag argument to g_call_me() methods which will be used to signal
cancellation of events in the future.

This commit should be a no-op.

21 years agoIf stat() on the terminal specified in utmp fails due to ENOENT, don't
Robert Watson [Wed, 2 Apr 2003 20:22:29 +0000 (20:22 +0000)]
If stat() on the terminal specified in utmp fails due to ENOENT, don't
print a warning, and set the idletime variable for the entry to -1;
then pick up the -1 later in sprint() and lprint() and ignore those
idle times by printing just whitespace.  When third party applications,
such as kdm, insert utmp entries, they sometimes use strings like ":0",
which can't be stat()'d and currently result in warnings that are
not helpful to the user.

21 years agoDrop the silly notion that fd* entries have both `a' and `b'
Ruslan Ermilov [Wed, 2 Apr 2003 20:16:02 +0000 (20:16 +0000)]
Drop the silly notion that fd* entries have both `a' and `b'
partitions; this does nothing except upsetting disklabel(8).

21 years agoBack out support for RFC3514.
Matthew N. Dodd [Wed, 2 Apr 2003 20:14:44 +0000 (20:14 +0000)]
Back out support for RFC3514.

RFC3514 poses an unacceptale risk to compliant systems.

21 years agoMake disktab(5) MI (repo-copied from etc.i386/disktab).
Ruslan Ermilov [Wed, 2 Apr 2003 20:13:59 +0000 (20:13 +0000)]
Make disktab(5) MI (repo-copied from etc.i386/disktab).

21 years ago- Use the correct constant define.
Matthew N. Dodd [Wed, 2 Apr 2003 18:02:58 +0000 (18:02 +0000)]
- Use the correct constant define.
- Add a missing break.

21 years agoConvert the fxp(4) driver to the busdma API.
Maxime Henrion [Wed, 2 Apr 2003 16:47:16 +0000 (16:47 +0000)]
Convert the fxp(4) driver to the busdma API.

This patch is rather big because I had to significantly redesign
the driver to make the busdma conversion possible.  Most notably,
hardware and software structures were carefully splitted to get
rid of all the structs overlapping evilness.

Special thanks to phk and Richard Puga <puga@mauibuilt.com> for
providing me with fxp(4) hardware to do this work.

Thanks to marcel for testing this on ia64, and to Fred Clift
<fclift@verio.net> for testing this on alpha.

Tested on: i386, ia64, alpha

21 years agoNeed to hold the same SMP lock for (knote) list traversal as for
Jeffrey Hsu [Wed, 2 Apr 2003 15:24:50 +0000 (15:24 +0000)]
Need to hold the same SMP lock for (knote) list traversal as for
list manipulation.  This lock also protects read-modify-write operations
on the pipe_state field.

21 years agoIP_EVIL -> IP_EF
Maxim Konovalov [Wed, 2 Apr 2003 14:52:21 +0000 (14:52 +0000)]
IP_EVIL -> IP_EF

21 years agoOnly orphan things if the open/close actually succeeded.
Poul-Henning Kamp [Wed, 2 Apr 2003 13:10:40 +0000 (13:10 +0000)]
Only orphan things if the open/close actually succeeded.

21 years agoProperly handle races between open/close and orphan.
Poul-Henning Kamp [Wed, 2 Apr 2003 13:09:50 +0000 (13:09 +0000)]
Properly handle races between open/close and orphan.

KASSERT the race between close and strategy, it is an error in the upper
echelons if this happens,

Add XXX: comment explaining why the ioctl/orphan race is not closed.

21 years agoInstead of not grapping a request binfinish(ENOMEM) it if malloc fails.
Søren Schmidt [Wed, 2 Apr 2003 11:36:43 +0000 (11:36 +0000)]
Instead of not grapping a request binfinish(ENOMEM) it if malloc fails.

21 years agofixed invalid pointer reference
SUZUKI Shinsuke [Wed, 2 Apr 2003 11:35:51 +0000 (11:35 +0000)]
fixed invalid pointer reference

Obtained from: KAME

21 years agoMFi386: revisions 1.556 and 1.557.
Yoshihiro Takahashi [Wed, 2 Apr 2003 10:51:06 +0000 (10:51 +0000)]
MFi386: revisions 1.556 and 1.557.
Backout revision 1.312.

21 years agoMerged from sys/dev/syscons/syscons.c revision 1.400.
Yoshihiro Takahashi [Wed, 2 Apr 2003 10:49:48 +0000 (10:49 +0000)]
Merged from sys/dev/syscons/syscons.c revision 1.400.

21 years agoSync constant define with NetBSD.
Matthew N. Dodd [Wed, 2 Apr 2003 10:28:47 +0000 (10:28 +0000)]
Sync constant define with NetBSD.

Requested by:  Tom Spindler <dogcow@babymeat.com>

21 years agoo Fix error messages formatting, style.
Maxim Konovalov [Wed, 2 Apr 2003 09:20:08 +0000 (09:20 +0000)]
o Fix error messages formatting, style.

Prodded by: bde
Reviewed by: bde

21 years ago - Make the interactivity calculator decay faster.
Jeff Roberson [Wed, 2 Apr 2003 08:22:33 +0000 (08:22 +0000)]
 - Make the interactivity calculator decay faster.
 - Make the pcpu estimator update faster.

21 years ago - I meant divide by two and not shift by two in SCHED_PRI_NHALF.
Jeff Roberson [Wed, 2 Apr 2003 08:21:24 +0000 (08:21 +0000)]
 - I meant divide by two and not shift by two in SCHED_PRI_NHALF.

21 years agoImplement _get_curthread and _set_curthread. This is especially easy.
Jake Burkholder [Wed, 2 Apr 2003 08:15:07 +0000 (08:15 +0000)]
Implement _get_curthread and _set_curthread.  This is especially easy.

21 years agoImplement cpu_thread_setup. Fix cpu_set_upcall.
Jake Burkholder [Wed, 2 Apr 2003 08:03:42 +0000 (08:03 +0000)]
Implement cpu_thread_setup.  Fix cpu_set_upcall.

21 years ago- Make casuptr return the old value of the location we're trying to update,
Jake Burkholder [Wed, 2 Apr 2003 08:02:27 +0000 (08:02 +0000)]
- Make casuptr return the old value of the location we're trying to update,
  and change the umtx code to expect this.

Reviewed by: jeff

21 years ago - Add in support for KSEs with 0 slice values on the run queue. If we try
Jeff Roberson [Wed, 2 Apr 2003 06:46:43 +0000 (06:46 +0000)]
 - Add in support for KSEs with 0 slice values on the run queue.  If we try
   to select a KSE with a slice of 0 we will update its slice and insert it
   onto the next queue.
 - Pass the KSE instead of the ksegrp into sched_slice().  This more
   accurately reflects the behavior of the code.  Slices are granted to kses.
 - Add a function kseq_nice_min() which finds the smallest nice value
   assigned to the kseg of any KSE on the queue.
 - Rewrite the logic in sched_slice().  Add a large comment describing the
   new slice selection scheme.  To summarize, slices are assigned based on
   the nice value.  Priorities are still calculated based on the nice and
   interactivity of a process.  Slice sizes of 0 may be granted for KSEs
   whos nice is 20 or futher away from the lowest nice on the run queue.
   Other nice values are scaled across the range [min, min+20].  This fixes
   ULEs bad behavior with positively niced processes.

21 years ago - Define curthread as _get_curthread() and remove all direct calls to
Jeff Roberson [Wed, 2 Apr 2003 03:05:39 +0000 (03:05 +0000)]
 - Define curthread as _get_curthread() and remove all direct calls to
   _get_curthread().  This is similar to the kernel's curthread.  Doing
   this saves stack overhead and is more convenient to the programmer.
 - Pass the pointer to the newly created thread to _thread_init().
 - Remove _get_curthread_slow().

21 years agoAdd MD makefile.
Jake Burkholder [Tue, 1 Apr 2003 23:52:24 +0000 (23:52 +0000)]
Add MD makefile.

21 years agoImplement makecontext.
Jake Burkholder [Tue, 1 Apr 2003 23:28:50 +0000 (23:28 +0000)]
Implement makecontext.

21 years ago- Fix UC_COPY_SIZE. Adding up the size of structure fields doesn't take
Jake Burkholder [Tue, 1 Apr 2003 23:25:18 +0000 (23:25 +0000)]
- Fix UC_COPY_SIZE.  Adding up the size of structure fields doesn't take
  alignment into account.
- Return EJUSTRETURN from set_context on success to avoid clobbering the
  first 2 out registers with td_retval on sparc64.

21 years ago- Set the version number in the mcontext in get_mcontext and check it in
Jake Burkholder [Tue, 1 Apr 2003 23:18:13 +0000 (23:18 +0000)]
- Set the version number in the mcontext in get_mcontext and check it in
  set_mcontext.
- Don't make assumptions about the alignment of the mcontext inside of the
  ucontext; we have to save the floating point registers to the pcb and then
  copy to the mcontext.

21 years ago - Don't drop and reacquire giant in thread_suspend(). Change callers to do
Jeff Roberson [Tue, 1 Apr 2003 22:41:41 +0000 (22:41 +0000)]
 - Don't drop and reacquire giant in thread_suspend().  Change callers to do
   this manually.  This will facilitate the unrolling of giant.
 - Don't allow giant to recurse anymore.  This should never happen.

21 years ago - Reenable setschedparam and the prioceiling code now that the mutex code
Jeff Roberson [Tue, 1 Apr 2003 22:40:29 +0000 (22:40 +0000)]
 - Reenable setschedparam and the prioceiling code now that the mutex code
   has been restored.

21 years ago - Restore old mutex code from libc_r. It is more standards compliant.
Jeff Roberson [Tue, 1 Apr 2003 22:39:31 +0000 (22:39 +0000)]
 - Restore old mutex code from libc_r.  It is more standards compliant.
   This was changed because originally we were blocking on the umtx and
   allowing the kernel to do the queueing.  It was decided that the
   lib should queue and start the threads in the order it decides and the
   umtx code would just be used like spinlocks.

21 years agoObserve conservation of packets when entering Fast Recovery while
Jeffrey Hsu [Tue, 1 Apr 2003 21:16:46 +0000 (21:16 +0000)]
Observe conservation of packets when entering Fast Recovery while
doing Limited Transmit.  Only artificially inflate the congestion
window by 1 segment instead of the usual 3 to take into account
the 2 already sent by Limited Transmit.

Approved in principle by: Mark Allman <mallman@grc.nasa.gov>,
Hari Balakrishnan <hari@nms.lcs.mit.edu>, Sally Floyd <floyd@icir.org>

21 years agoRemove 220.backup-distfile since it has been deleted.
John Baldwin [Tue, 1 Apr 2003 20:32:01 +0000 (20:32 +0000)]
Remove 220.backup-distfile since it has been deleted.

Reported by: mdodd
Pointy hat to: jhb

21 years ago[1] - Document EHOSTUNREACH as a possible error
Ceri Davies [Tue, 1 Apr 2003 20:25:46 +0000 (20:25 +0000)]
[1] - Document EHOSTUNREACH as a possible error

[2] - Remove a contraction

PR: docs/50401
Submitted by: [1] Slaven Rezic <slaven@rezic.de>
MFC after: 1 week

21 years agoRemoved redundant lines.
Ruslan Ermilov [Tue, 1 Apr 2003 19:59:30 +0000 (19:59 +0000)]
Removed redundant lines.

Noticed by: obrien

21 years ago#include <geom/geom_disk.h>
Poul-Henning Kamp [Tue, 1 Apr 2003 19:00:38 +0000 (19:00 +0000)]
#include <geom/geom_disk.h>

21 years agoInclude <geom/geom_disk.h> not <sys/disk.h>
Poul-Henning Kamp [Tue, 1 Apr 2003 18:57:14 +0000 (18:57 +0000)]
Include <geom/geom_disk.h> not <sys/disk.h>

21 years agoRemove the #define for bioqdisksort(), it's no longer needed.
Poul-Henning Kamp [Tue, 1 Apr 2003 18:55:46 +0000 (18:55 +0000)]
Remove the #define for bioqdisksort(), it's no longer needed.

21 years agoI think the divorce successed, so stop #including <geom/geom_disk.h>
Poul-Henning Kamp [Tue, 1 Apr 2003 18:55:04 +0000 (18:55 +0000)]
I think the divorce successed, so stop #including <geom/geom_disk.h>

21 years agoComplete removal of 320.rdist by removing its entry from periodic.conf and
John Baldwin [Tue, 1 Apr 2003 17:45:27 +0000 (17:45 +0000)]
Complete removal of 320.rdist by removing its entry from periodic.conf and
removing the related 220.backup-distfile script and associatd periodic.conf
entry.

Discussed with: obrien

21 years agoAdd a crutch so that direct-mapped DMA works on alpha. This is a step
Andrew Gallatin [Tue, 1 Apr 2003 16:31:12 +0000 (16:31 +0000)]
Add a crutch so that direct-mapped DMA works on alpha.  This is a step
toward preventing this driver from crashing an alpha at boot.

Tested by: Oliver Lehmann <lehmann@ans-netz.de>

21 years agoGive clearer diagnostics on some cases of invalid
Yaroslav Tykhiy [Tue, 1 Apr 2003 15:23:55 +0000 (15:23 +0000)]
Give clearer diagnostics on some cases of invalid
combinations of mdconfig(8) command-line arguments.

Make mdconfig(8) accept "-a -f file -o options"
equally with "-a -f file" (assuming "-t vnode".)

21 years agoUse bioq_flush() to drain a bio queue with a specific error code.
Poul-Henning Kamp [Tue, 1 Apr 2003 15:06:26 +0000 (15:06 +0000)]
Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.

Spell bioq_disksort() consistently with the remaining bioq_*().

#include <geom/geom_disk.h> where this is more appropriate.

21 years agoDon't die of SIGSEGV on a missing fstype field
Yaroslav Tykhiy [Tue, 1 Apr 2003 14:44:53 +0000 (14:44 +0000)]
Don't die of SIGSEGV on a missing fstype field
in a saved disklabel file.

MFC after: 1 week

21 years agoDon't include <sys/disk.h>.
Poul-Henning Kamp [Tue, 1 Apr 2003 13:33:28 +0000 (13:33 +0000)]
Don't include <sys/disk.h>.

21 years agoStart to split the GEOM/diskdriver specific bits into geom/geom_disk.h
Poul-Henning Kamp [Tue, 1 Apr 2003 13:19:14 +0000 (13:19 +0000)]
Start to split the GEOM/diskdriver specific bits into geom/geom_disk.h

21 years agolibtelnet depends on OpenSSL.
Ruslan Ermilov [Tue, 1 Apr 2003 12:50:40 +0000 (12:50 +0000)]
libtelnet depends on OpenSSL.

PR: 50507

21 years agoIntroduce bioq_flush() function.
Poul-Henning Kamp [Tue, 1 Apr 2003 12:49:40 +0000 (12:49 +0000)]
Introduce bioq_flush() function.

21 years agoMark bits that do not require an object directory as such.
Ruslan Ermilov [Tue, 1 Apr 2003 12:37:54 +0000 (12:37 +0000)]
Mark bits that do not require an object directory as such.

21 years agoInclude <sys/conf.h> rather than trusting <sys/disk.h> to do so.
Poul-Henning Kamp [Tue, 1 Apr 2003 12:35:17 +0000 (12:35 +0000)]
Include <sys/conf.h> rather than trusting <sys/disk.h> to do so.

21 years agoAdd #include <sys/conf.h> so we don't rely on <sys/disk.h> doing it.
Poul-Henning Kamp [Tue, 1 Apr 2003 12:34:47 +0000 (12:34 +0000)]
Add #include <sys/conf.h> so we don't rely on <sys/disk.h> doing it.

21 years agoParallelize (on the top-level SUBDIR list) the "all" stage of
Ruslan Ermilov [Tue, 1 Apr 2003 11:39:04 +0000 (11:39 +0000)]
Parallelize (on the top-level SUBDIR list) the "all" stage of
buildworld.  This gives 5-11% percent gain in real buildworld
times on various UP and SMP systems here.  I used 4 * hw.ncpu
as an argument to "make -j" in my tests.

21 years agoPass NO_WARNS to the build-tool stage too; -Wsystem-headers
Ruslan Ermilov [Tue, 1 Apr 2003 11:29:29 +0000 (11:29 +0000)]
Pass NO_WARNS to the build-tool stage too; -Wsystem-headers
isn't known to the 4.x system compiler.

21 years agoThis can't obviously be cleaner than system headers.
Ruslan Ermilov [Tue, 1 Apr 2003 11:11:38 +0000 (11:11 +0000)]
This can't obviously be cleaner than system headers.

21 years ago - smb_td_intr takes a thread as an argument not a proc.
Jeff Roberson [Tue, 1 Apr 2003 09:24:12 +0000 (09:24 +0000)]
 - smb_td_intr takes a thread as an argument not a proc.

21 years ago - smb_proc_intr is now spelled smb_td_intr.
Jeff Roberson [Tue, 1 Apr 2003 09:23:24 +0000 (09:23 +0000)]
 - smb_proc_intr is now spelled smb_td_intr.

Noticed by: phk
Pointy hat to: jeffr

21 years ago - p will be unused in cursig() if INVARIANTS is not defined. Access it
Jeff Roberson [Tue, 1 Apr 2003 09:07:36 +0000 (09:07 +0000)]
 - p will be unused in cursig() if INVARIANTS is not defined.  Access it
   through td->td_proc to avoid the unused variable.

Spotted by: Maxim Konovalov <maxim@macomnet.ru>

21 years agoDon't include <sys/buf.h> needlessly.
Poul-Henning Kamp [Tue, 1 Apr 2003 09:02:58 +0000 (09:02 +0000)]
Don't include <sys/buf.h> needlessly.

21 years agoFix KASSERT syntax error.
Poul-Henning Kamp [Tue, 1 Apr 2003 08:57:28 +0000 (08:57 +0000)]
Fix KASSERT syntax error.

21 years agoImplement support for RFC 3514 (The Security Flag in the IPv4 Header).
Matthew N. Dodd [Tue, 1 Apr 2003 08:21:44 +0000 (08:21 +0000)]
Implement support for RFC 3514 (The Security Flag in the IPv4 Header).
(See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt)

This fulfills the host requirements for userland support by
way of the setsockopt() IP_EVIL_INTENT message.

There are three sysctl tunables provided to govern system behavior.

net.inet.ip.rfc3514:

Enables support for rfc3514.  As this is an
Informational RFC and support is not yet widespread
this option is disabled by default.

net.inet.ip.hear_no_evil

 If set the host will discard all received evil packets.

net.inet.ip.speak_no_evil

If set the host will discard all transmitted evil packets.

The IP statistics counter 'ips_evil' (available via 'netstat') provides
information on the number of 'evil' packets recieved.

For reference, the '-E' option to 'ping' has been provided to demonstrate
and test the implementation.

21 years agoFix KASSERT syntax errors.
Poul-Henning Kamp [Tue, 1 Apr 2003 08:10:21 +0000 (08:10 +0000)]
Fix KASSERT syntax errors.

Please compile LINT before commiting.

21 years agoRemove the old config interface, the new OAM is sufficiently functional
Poul-Henning Kamp [Tue, 1 Apr 2003 07:33:56 +0000 (07:33 +0000)]
Remove the old config interface, the new OAM is sufficiently functional
now.

21 years agoRemove the old config interface now that the new OAM is functional.
Poul-Henning Kamp [Tue, 1 Apr 2003 07:33:17 +0000 (07:33 +0000)]
Remove the old config interface now that the new OAM is functional.

21 years ago - Adjust the makefiles so we have a per architecture makefile.
Jeff Roberson [Tue, 1 Apr 2003 07:07:38 +0000 (07:07 +0000)]
 - Adjust the makefiles so we have a per architecture makefile.

21 years ago- Add a flags field to struct pcb. Use this to keep track of wether or
Jake Burkholder [Tue, 1 Apr 2003 04:58:50 +0000 (04:58 +0000)]
- Add a flags field to struct pcb.  Use this to keep track of wether or
  not the pcb has floating point registers saved in it.
- Implement get_mcontext and set_mcontext.

21 years ago - Spell SIGSETOR correctly.
Jeff Roberson [Tue, 1 Apr 2003 04:49:12 +0000 (04:49 +0000)]
 - Spell SIGSETOR correctly.

21 years ago- Don't allow tf_wstate to be set in set_regs.
Jake Burkholder [Tue, 1 Apr 2003 04:29:03 +0000 (04:29 +0000)]
- Don't allow tf_wstate to be set in set_regs.
- Clear FPRS_FEF in set_fpregs so the new registers will be reloaded.

21 years agoImplement cpu_set_upcall.
Jake Burkholder [Tue, 1 Apr 2003 04:19:29 +0000 (04:19 +0000)]
Implement cpu_set_upcall.

21 years ago- Rename pcb_fpstate to pcb_ufp (user floating point), and change it to
Jake Burkholder [Tue, 1 Apr 2003 04:02:45 +0000 (04:02 +0000)]
- Rename pcb_fpstate to pcb_ufp (user floating point), and change it to
  a simple array of 64 ints.
- Use a critical section when saving floating point state in cpu_fork
  instead of sched_lock.

21 years ago - Commit the forgotten libthr/sys bits.
Jeff Roberson [Tue, 1 Apr 2003 03:51:08 +0000 (03:51 +0000)]
 - Commit the forgotten libthr/sys bits.

21 years ago - Add libthr but don't hook it up to the regular build yet. This is an
Jeff Roberson [Tue, 1 Apr 2003 03:46:29 +0000 (03:46 +0000)]
 - Add libthr but don't hook it up to the regular build yet.  This is an
   adaptation of libc_r for the thr system call interface.  This is beta
   quality code.

21 years agoRename pcb_fp to pcb_sp, so as to not be confused with floating point
Jake Burkholder [Tue, 1 Apr 2003 03:05:46 +0000 (03:05 +0000)]
Rename pcb_fp to pcb_sp, so as to not be confused with floating point
state.

21 years agoSpecify the M_WAITOK flag explicitly in the MALLOC call to silence a
Tim J. Robbins [Tue, 1 Apr 2003 02:47:09 +0000 (02:47 +0000)]
Specify the M_WAITOK flag explicitly in the MALLOC call to silence a
runtime warning ("Bad malloc flags: 0").

21 years agoGive the M_WAITOK flag explicitly to the MALLOC call to silence a runtime
Tim J. Robbins [Tue, 1 Apr 2003 02:42:02 +0000 (02:42 +0000)]
Give the M_WAITOK flag explicitly to the MALLOC call to silence a runtime
warning ("Bad malloc flags: 0").

21 years agoImplement casuptr.
Jake Burkholder [Tue, 1 Apr 2003 02:37:04 +0000 (02:37 +0000)]
Implement casuptr.

21 years ago - Regen.
Jeff Roberson [Tue, 1 Apr 2003 02:34:21 +0000 (02:34 +0000)]
 - Regen.

21 years ago - thr_exit() should no longer be called with Giant held.
Jeff Roberson [Tue, 1 Apr 2003 02:32:53 +0000 (02:32 +0000)]
 - thr_exit() should no longer be called with Giant held.

21 years ago - Mark the various thr syscalls as MP safe. Previously there was a bug if
Jeff Roberson [Tue, 1 Apr 2003 02:32:07 +0000 (02:32 +0000)]
 - Mark the various thr syscalls as MP safe.  Previously there was a bug if
   this was not done since thr_exit() unwinds giant.

21 years ago - Borrow the KSE single threading code for exec and exit. We use the check
Jeff Roberson [Tue, 1 Apr 2003 01:26:20 +0000 (01:26 +0000)]
 - Borrow the KSE single threading code for exec and exit.  We use the check
   if (p->p_numthreads > 1) and not a flag because action is only necessary
   if there are other threads.  The rest of the system has no need to
   identify thr threaded processes.
 - In kern_thread.c use thr_exit1() instead of thread_exit() if P_THREADED
   is not set.

21 years ago - Regen for umtx.
Jeff Roberson [Tue, 1 Apr 2003 01:22:18 +0000 (01:22 +0000)]
 - Regen for umtx.

21 years ago - Add thr and umtx system calls.
Jeff Roberson [Tue, 1 Apr 2003 01:15:56 +0000 (01:15 +0000)]
 - Add thr and umtx system calls.

21 years ago - Add the kern_umtx.c file to the build.
Jeff Roberson [Tue, 1 Apr 2003 01:13:29 +0000 (01:13 +0000)]
 - Add the kern_umtx.c file to the build.

21 years ago - Include umtx.h in files generated by makesyscalls.sh
Jeff Roberson [Tue, 1 Apr 2003 01:12:24 +0000 (01:12 +0000)]
 - Include umtx.h in files generated by makesyscalls.sh
 - Add system calls for umtx.

21 years ago - Add an entry and a head for the queue of threads blocked on a umtx.
Jeff Roberson [Tue, 1 Apr 2003 01:11:22 +0000 (01:11 +0000)]
 - Add an entry and a head for the queue of threads blocked on a umtx.
 - Add a prototype for thr_exit1().

21 years ago - Add an api for doing smp safe locks in userland.
Jeff Roberson [Tue, 1 Apr 2003 01:10:42 +0000 (01:10 +0000)]
 - Add an api for doing smp safe locks in userland.
 - umtx_lock() is defined as an inline in umtx.h.  It tries to do an
   uncontested acquire of a lock which falls back to the _umtx_lock()
   system-call if that fails.
 - umtx_unlock() is also an inline which falls back to _umtx_unlock() if the
   uncontested unlock fails.
 - Locks are keyed off of the thr_id_t of the currently running thread which
   is currently just the pointer to the 'struct thread' in kernel.
 - _umtx_lock() uses the proc pointer to synchronize access to blocked thread
   queues which are stored in the first blocked thread.

21 years ago - We now have to include umtx.h and ucontext.h in the system call related
Jeff Roberson [Tue, 1 Apr 2003 00:35:12 +0000 (00:35 +0000)]
 - We now have to include umtx.h and ucontext.h in the system call related
   headers.

21 years ago - Regen for thr related system calls.
Jeff Roberson [Tue, 1 Apr 2003 00:34:29 +0000 (00:34 +0000)]
 - Regen for thr related system calls.

21 years ago - Add the four thr related system calls.
Jeff Roberson [Tue, 1 Apr 2003 00:31:37 +0000 (00:31 +0000)]
 - Add the four thr related system calls.

21 years ago - Add kern_thr.c
Jeff Roberson [Tue, 1 Apr 2003 00:30:54 +0000 (00:30 +0000)]
 - Add kern_thr.c

21 years ago - Add two files to support the thr threading interface.
Jeff Roberson [Tue, 1 Apr 2003 00:30:30 +0000 (00:30 +0000)]
 - Add two files to support the thr threading interface.
 - sys/thr.h contains the user space visible api that is intended only for
   use in threading library packages.
 - kern/kern_thr.c contains thr system calls and other thr specific code.

21 years ago - Define a new md function 'casuptr'. This atomically compares and sets
Jeff Roberson [Tue, 1 Apr 2003 00:18:55 +0000 (00:18 +0000)]
 - Define a new md function 'casuptr'.  This atomically compares and sets
   a pointer that is in user space.  It will be used as the basic primitive
   for a kernel supported user space lock implementation.
 - Implement this function in x86's support.s
 - Provide stubs that return -1 in all other architectures.  Implementations
   will follow along shortly.

Reviewed by: jake

21 years ago - In npxgetregs() use the td argument to save the fpu state from and not
Jeff Roberson [Tue, 1 Apr 2003 00:16:32 +0000 (00:16 +0000)]
 - In npxgetregs() use the td argument to save the fpu state from and not
   curthread.  Nothing currently depends on this behavior.
 - Clean up an extra newline.

Obtained from: bde

21 years ago - Add a placeholder for sigwait
Jeff Roberson [Mon, 31 Mar 2003 23:36:40 +0000 (23:36 +0000)]
 - Add a placeholder for sigwait

21 years ago - Regen for the sig*wait* system calls.
Jeff Roberson [Mon, 31 Mar 2003 23:33:45 +0000 (23:33 +0000)]
 - Regen for the sig*wait* system calls.

21 years ago - According to mike@FreeBSD.org SIGTHR should be hiden by
Jeff Roberson [Mon, 31 Mar 2003 23:31:50 +0000 (23:31 +0000)]
 - According to mike@FreeBSD.org SIGTHR should be hiden by
   #ifdef __BSD_VISIBLE

21 years ago - Define sigwait, sigtimedwait, and sigwaitinfo in terms of
Jeff Roberson [Mon, 31 Mar 2003 23:30:41 +0000 (23:30 +0000)]
 - Define sigwait, sigtimedwait, and sigwaitinfo in terms of
   kern_sigtimedwait() which is capable of supporting all of their semantics.
 - These should be POSIX compliant but more careful review is needed before
   we announce this.