Commit Graph

49 Commits

Author SHA1 Message Date
sommerfeld
40339b39f9 Reduce use of curproc in several places:
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()
2000-05-27 00:40:29 +00:00
simonb
2f1fef39b3 Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
2000-03-28 23:57:24 +00:00
frueauf
253924ee60 Fix typo: hxto -> hzto. 2000-03-25 20:23:05 +00:00
thorpej
7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
thorpej
0d32655143 Completely rewrite the HP-UX SVID IPC compat calls. 1999-08-25 04:50:08 +00:00
christos
f0c7751046 Regen 1998-12-10 17:13:06 +00:00
tron
e8603a0b66 Defopt SYSVMSG, SYSVSEM and SYSVSHM. 1998-10-19 22:31:50 +00:00
christos
c2339a1799 Make error array look like ibcs2, svr4, and linux 1998-10-18 17:00:32 +00:00
thorpej
370d14060a Adapt to signal changes. 1998-10-01 03:26:18 +00:00
perry
e1601dc2ca bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:36:58 +00:00
kleink
ed9f037214 Fix EDQUOT and EIDRM, add ENOMSG. 1998-02-10 17:45:06 +00:00
carrel
c2418895f6 Add some more sysconf() types. (Mostly stolen from other compat_* s) 1997-10-19 19:25:07 +00:00
scottr
961e600c5c Don't compile hpux_sys_ptrace(), as it uses a deprecated interface
(and didn't really work, anyway).  Suggested by Dave Carrel.
1997-10-17 18:43:48 +00:00
carrel
2d7d2e019a include vm/vm.h 1997-10-16 18:27:40 +00:00
mycroft
e3f99a9397 Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +00:00
mycroft
837a72363d VEXEC -> VLOOKUP, as appropriate. 1997-05-08 10:57:17 +00:00
mycroft
aaf3b59589 Remove outdated comment. 1997-05-05 06:56:20 +00:00
thorpej
70ce55d5d7 Update for changes in machine-dependent COMPAT_HPUX code. 1997-04-27 21:40:47 +00:00
scottr
703bcd151c Add prototypes, and make this compile with -Wall. Remove register
modifier from all declarations.
1997-04-01 19:58:58 +00:00
thorpej
abe496a1c9 Remove a new-obsolete comment. 1997-03-16 10:13:12 +00:00
mycroft
695fbc60e2 Use splclock() to block time updates, not splhigh(). 1997-02-28 05:01:21 +00:00
perry
b89a3425b7 Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
1997-01-15 01:28:28 +00:00
thorpej
04f65ff081 Need to include <sys/exec.h> 1996-10-14 06:53:23 +00:00
ws
2da166f660 Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.
1996-10-02 18:04:56 +00:00
mycroft
3bbb29fe03 Catch up with setre[ug]id() changes. 1996-06-23 11:10:01 +00:00
jtc
e19bfae4f9 Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:18:04 +00:00
thorpej
d9bce7422e Move the obviously machine-dependent HP-UX compat code to hpux_machdep.{c,h}.
A fair bit of this, the m68k core dump and exec goo, can probably be
made into a generic m68k hpux module, eventually.

More to be placed in hpux_machdep.c - keep your eyes peeled...
1996-01-06 12:44:06 +00:00
mycroft
018fa71167 Eliminate bogus casts. 1995-12-09 04:05:52 +00:00
thorpej
d7cef923ac Centralize the HP-UX file flags translation stuff. 1995-12-08 07:54:43 +00:00
thorpej
0ec193c9b2 Get COMPAT_HPUX partially working on the hp300. Notable improvements:
* It compiles (and links).
	* Make use of "/emul/hpux" where applicable.
	* Untangle a bit, pulling some funtions from the monolithic
	  hpux_compat.c into hpux_file.c, hpux_exec.c, etc.
	* Fix a couple of bugs.
Yet to do:
	* Move hp300-specific functions into hp300/hp300/hpux_machdep.c.
	* Make everything work properly (you laugh...)

These changes are sufficient to run some simple HP-UX 9.x executables,
including ls(1) (which will read password and group information from the
YP server correctly, albeit slowly), a simple "hello world", uname(1),
and a few other odds and ends.  Dynamically linked executables work, and
demand-paging _seems_ to work properly.  Major problems:
	* socket and/or signal handling appears to need some work yet.
	* 99% sure I didn't do exactly the right thing adjusting for the
	  fact that "kstack" is gone now.
	* ktrace(1)'ing some executables (HP-UX telnet(1) is what I tried)
	  causes the HP-UX executable to dump core with a SIGSEGV for an
	  as of yet unknown reason.

This is mostly meant as a checkpoint/snapshot, to make it easier for others
to track progress on this code, and hack on it themselves.  It's certainly
better off now than before.
1995-11-28 08:39:45 +00:00
mycroft
245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej
7d7396c414 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 22:53:47 +00:00
christos
8207f8e49e Use the new compat_util.h 1995-06-24 20:17:54 +00:00
christos
dd9ece9090 Made this compile on the i386 (gasp)... Someone will need to test it. 1995-05-10 16:45:25 +00:00
christos
44eef7c28b - added struct emul to all emulations.
- removed all setup functions.
- added copyargs() functions where needed.
1995-04-22 19:48:19 +00:00
cgd
6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd
6b7c260753 new RCS ID format. 1994-10-26 02:45:11 +00:00
cgd
74d7436a91 pay a small amount of lip service to the new syscall args mechanism.
In reality, none of these will compile.
1994-10-20 04:47:31 +00:00
mycroft
64561e1985 Something else needs COMPAT_OHPUX. 1994-05-25 11:55:06 +00:00
mycroft
48dd63215d Merge with 4.4-Lite. 1994-05-23 08:03:32 +00:00
mycroft
56c75f2846 Update to match other code. 1994-05-23 06:19:05 +00:00
cgd
da707cc4eb syscall and time stuff 1994-05-17 10:37:09 +00:00
mycroft
89a5de9e12 Most of the changes needed to make this continue to run. 1994-05-05 10:10:21 +00:00
mycroft
e5a2605525 Remove silly redundant #ifdefs. 1994-05-04 04:09:34 +00:00
mycroft
bec176e7da Update for new time struct. 1994-04-26 22:33:28 +00:00
mycroft
0bbaf2a5e8 Partial cleanup. Needs more work. 1994-01-07 00:43:39 +00:00
mycroft
4862b84c92 Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
1993-08-01 19:22:24 +00:00
cgd
30177b538f add rcsids to everything and clean up headers 1993-05-22 07:56:12 +00:00
cgd
6dedb5151c add hp300 kernel files. generic kernel files might need some help... 1993-05-13 13:56:20 +00:00