summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Use [u]intptr_t instead of [u_]long for casts between pointers andbde1998-08-161-3/+3
| | | | integers. Don't forget to cast to (void *) as well.
* Converted the second last instance of hzto() to tvtohz().bde1998-08-051-20/+15
| | | | | | | | | | | | | | | | | Fixed nearby bugs (in linux_alarm()): - the itimer for the alarm was relative to the epoch instead of relative to the boot time. This was harmless because the itimer's interval is 0. - the seconds arg was not checked for validity before converting it to a possibly different value. - printf format errors. Improvements: Don't use splclock(). splsoftclock() suffices. Don't complicate things by micro-optimizing interrupt latency. Minor improvements: Various micro-optimizations to exploit the specialness of the alarm itimer and the value 0.
* Fixed print format errors.bde1998-07-291-26/+31
|
* Quick and dirty support for Linux's mremap. Not used by anythingjkh1998-07-101-1/+32
| | | | | | but quake2 AFAIK. Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* s/nanoruntime/nanouptime/gphk1998-05-171-2/+2
| | | | | | s/microruntime/microuptime/g Reviewed by: bde
* Make a kernel version of the timer* functions called timerval* to bephk1998-04-061-9/+9
| | | | | | more consistent. OK'ed by: bde
* Use microruntime() rather than doing it by hand.phk1998-04-041-3/+2
|
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* Removed redundant test against MAXDSIZ (the rlimit test is stronger).bde1998-02-251-3/+3
|
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-53/+52
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* Securelevel and formatting fixes, and trapframe simplification.kato1997-10-301-10/+9
| | | | | Reviewed by: sos Submitted by: bde
* Implement linux_iopl and linux_nice.kato1997-10-291-1/+31
|
* Update for changes in the callout interface.gibbs1997-09-211-3/+4
|
* Removed unused #includes.bde1997-07-201-8/+1
|
* Always include PROT_READ for Linux mmap operations.msmith1997-04-281-2/+2
| | | | Submitted by: Hannu Savolainen <hannu@voxware.pp.fi> via jkh
* Removed potentially harmful garbage <vm/lock.h> and fixed bogusbde1997-04-011-2/+1
| | | | | | use of it. It was actually harmless because the use was null due to fortuitous include orders and identical (wrong) idempotency macros.
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-2/+2
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make this compile again after the Lite2 merge.mpp1997-02-101-2/+2
| | | | | | VOP_UNLOCK was being called with the wrong mumber of arguments. Also silenced a -Wall warning.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-2/+2
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Clean up -Wunused warnings.gpalmer1996-06-121-3/+2
| | | | Reviewed by: bde
* First pass at cleaning up macros relating to pages, clusters and all that.phk1996-05-021-3/+3
|
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-071-4/+1
| | | | copied from bad examples.
* Fixed unsigned longs that should have been vm_offset_t.bde1996-03-191-3/+5
| | | | | | | | | | vm_offset_t is currently unsigned long but should probably be plain unsigned for i386's to match the choice of minimal types to represent for fixed-width types in Lite2. Anyway, it shouldn't be assumed to be unsigned long. I only fixed the type mismatches that were detected when I changed vm_offset_t to unsigned. Only pointer type mismatches were detected.
* Remove references to MAP_FILE.. That is now "default" and is onlypeter1996-03-121-2/+2
| | | | a "#define MAP_FILE 0" that is still there for net-2 source compatability.
* Fix the vm_map_remove and vm_map_protect calls.. Somewhere along thepeter1996-03-101-3/+3
| | | | | | line, these had got (start, length) arguments instead of (start, end) args. This could be the cause of Robert Sanders lockups with ZMAGIC binaries.
* update linux_times() and linux_utime() emulation,peter1996-03-041-14/+43
| | | | | fix sigsuspend() (actually back out my recent change there) and regen the syscall tables..
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-021-150/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
* This is an extract of changes from what I am currently running...peter1996-02-161-64/+151
| | | | | | | | | | | | | | | | | | | | | | | - Optimise the linux a.out loading and uselib system calls so they take advantage of some of John's recent interface improvements. Basically, this means they make far less map changes than before. - Attempt to plug some potentially nasty kernel_map memory leaks.. - Improve support for QMAGIC libs (I only use QMAGIC (ie: a.out libraries from the slackware 3.0 dist) but this depends on other changes to enhance the /compat/linux support) - uselib goes out through a single exit as part of the resource tracking that I did when closing the resource leaks on errors. This could be cleaner than what I did, but making a 30-deep nested if/else was not my idea of fun, neither did I want to repeat the same code 30 times over for each failure possibility. I guess this function needs to be split into smaller functions to solve this. I've been running the Linux Netscape-2.0 (with Java) to test this, and apart from the long-standing problem with the missing scrollbars, it appears to still work as before with ZMAGIC libs (and the leaks).. However, I've been using it with mods for the signal trampoline code for native linux stack frames on signals and exterminated the blasted sigreturn printf() problem, so I can't be certain that there is not a dependency on something else.
* Fixed vm_map_find for new vm updates.dyson1996-01-191-4/+7
|
* Add linux_mknod so that it will do mkfifo if needed...sos1996-01-141-1/+16
|
* Initial attempt at getting Linux QMAGIC shared lib support. I havepeter1995-12-151-4/+4
| | | | | | | | | | | | | successfully run linux netscape 2.0b3 with a QMAGIC ld.so and libc/libm that I found on some linux machine that I _think_ is running slackware 3.0. There are still problems.. ld.so claims the libraries are the wrong format, but it still runs anyway.. :-/ The QMAGIC ld.so also screams about needing ld.so.cache, and running a linux ldconfig is quite educational. You soon learn to run "chroot /compat/linux /bin/ldconfig" where ldconfig is living in /compat/linux/bin. :-] (Lets just say that it puts loads of symlinks in /usr/lib otherwise :-)
* Clean up some warnings by using the generated structures in <sys/sysproto.h>peter1995-12-151-24/+23
| | | | | for passing to the bsd system calls, rather than inveninting our own equivalent structures.
* Restored a vm #include.bde1995-12-141-1/+2
|
* Attempt to make the Linux LKM compile again after the recent VM includepeter1995-12-091-1/+6
| | | | | | de-nesting changes... (I figured this might be usefulif it actually built, since I've told everybody to rebuild it or die.. :-)
* Include <vm/vm.h> explicitly to avoid breaking when vnode_if.h doesn'tbde1995-12-061-1/+2
| | | | include vm stuff.
* Completed function declarations and added prototypes.bde1995-11-221-12/+8
| | | | | | Removed some unnecessary #includes. Fixed warnings about nested externs.
* All:dg1995-11-061-20/+20
| | | | | | | | | | | | Changed vnodep -> vp for consistency with the rest of the kernel, and changed iparams -> imgp for brevity. kern_exec.c: Explicitly initialized some additional parts of the image_params struct to avoid bzeroing it. Rewrote the set-id code to reduce the number of logical tests. The rewrite exposed a mostly benign bug in the algorithm: traced set-id images would get ktracing disabled even if the set-id didn't happen for other reasons.
* Submitted by: Juergen Lock <nox@jelal.hb.north.de>julian1995-10-041-11/+25
| | | | | | | | | | | Obtained from: other people on the net ? 1. stepping over syscalls (gdb ni) sends you to DDB, and returned to the wrong address afterwards, with or without DDB. patch in i386/i386/trap.c below. 2. the linux emulator (modload'ed) still causes panics with DIAGNOSTIC, re-applied a patch posted to one of the lists...
* First incarnation of our Linux emulator or rather compatibility code.sos1995-06-251-0/+660
This first shot only incorporaties so much functionality that DOOM can run (the X version), signal handling is VERY weak, so is many other things. But it meets my milestone number one (you guessed it - running DOOM). Uses /compat/linux as prefix for loading shared libs, so it won't conflict with our own libs. Kernel must be compiled with "options COMPAT_LINUX" for this to work.
OpenPOWER on IntegriCloud