summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2/ibcs2_fcntl.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the ABI wrappers to use kern_fcntl() rather than calling fcntl()jhb2004-08-241-47/+18
| | | | | | | | directly. This removes a few more users of the stackgap and also marks the syscalls using these wrappers MP safe where appropriate. Tested on: i386 with linux acroread5 Compiled on: i386, alpha LINT
* Use __FBSDID().obrien2003-06-021-2/+3
|
* SCARGS removal take II.alfred2002-12-141-43/+43
|
* Backout removal SCARGS, the code freeze is only "selectively" over.alfred2002-12-131-43/+43
|
* Remove SCARGS.alfred2002-12-131-43/+43
| | | | Reviewed by: md5
* In continuation of early fileop credential changes, modify fo_ioctl() torwatson2002-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | accept an 'active_cred' argument reflecting the credential of the thread initiating the ioctl operation. - Change fo_ioctl() to accept active_cred; change consumers of the fo_ioctl() interface to generally pass active_cred from td->td_ucred. - In fifofs, initialize filetmp.f_cred to ap->a_cred so that the invocations of soo_ioctl() are provided access to the calling f_cred. Pass ap->a_td->td_ucred as the active_cred, but note that this is required because we don't yet distinguish file_cred and active_cred in invoking VOP's. - Update kqueue_ioctl() for its new argument. - Update pipe_ioctl() for its new argument, pass active_cred rather than td_ucred to MAC for authorization. - Update soo_ioctl() for its new argument. - Update vn_ioctl() for its new argument, use active_cred rather than td->td_ucred to authorize VOP_IOCTL() and the associated VOP_GETATTR(). Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Remove __P.alfred2002-03-201-5/+5
|
* Replace ffind_* with fget calls.alfred2002-01-141-2/+3
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* KSE Milestone 2julian2001-09-121-27/+28
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-1/+3
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Proc locking.jhb2001-01-231-1/+4
|
* This is what was "fdfix2.patch," a fix for fd sharing. It's prettygreen1999-09-191-1/+1
| | | | | | | | | | | | | | | | | far-reaching in fd-land, so you'll want to consult the code for changes. The biggest change is that now, you don't use fp->f_ops->fo_foo(fp, bar) but instead fo_foo(fp, bar), which increments and decrements the fp refcount upon entry and exit. Two new calls, fhold() and fdrop(), are provided. Each does what it seems like it should, and if fdrop() brings the refcount to zero, the fd is freed as well. Thanks to peter ("to hell with it, it looks ok to me.") for his review. Thanks to msmith for keeping me from putting locks everywhere :) Reviewed by: peter
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add sufficient braces to keep egcs happy about potentially ambiguouspeter1999-05-061-4/+4
| | | | if/else nesting.
* Make SPX_HACK a new-style option.eivind1998-02-041-1/+3
|
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-23/+19
| | | | | | | | | | | | 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.
* Removed unused #includes.bde1997-07-201-8/+1
|
* Don't include <sys/ioctl.h> in the kernel. Stage 4: includebde1997-03-241-2/+2
| | | | | | | | <sys/ttycom.h> and sometimes <sys/filio.h> instead of <sys/ioctl.h> in miscellaneous files. Most of these files have nothing to do with ttys but need to include <sys/ttycom.h> to get the definitions of TIOC[SG]PGRP which are (ab)used to convert F[SG]ETOWN fcntls into ioctls.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-1/+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 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.
* Added (null for the i386) conversions from ibcs2's bogus fcntl argsbde1995-11-121-9/+10
| | | | struct to the standard bogus fcntl args struct.
* Add a hack to emulator to emulat spx device for local X connections.swallace1995-10-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is truly a hack. The idea is taken from the Linux ibcs2 emulator. To use this feature, you must use the option, options SPX_HACK in your config. Also, in /compat/ibcs2/dev, you must do: lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null lrwxr-xr-x 1 root wheel 7 Oct 15 22:20 nfsd@ -> socksys lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 socksys@ -> /dev/null crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx Do NOT use old socksys driver as that has been removed. This hack needs /compat/ibcs2/dev/spx to be any device that does NOT exist/configured (so the now non-existant spx major/minor works fine). When an open() is called, the error ENXIO is checked and then the path is checked. If spx open detected, then a unix socket is opened to the hardcoded path "/tmp/.X11-unix/X0". As the Linux hacker author mentioned, the real way would be to detect the getmsg/putmsg through /dev/X0R and /dev/spx. Until this true solution is implemented (if ever), I think this hack is important enough to be put into the tree, even though I don't like it dirtying up my clean code (which is what #ifdef SPX_HACK is for).
* Remove old files no longer needed.swallace1995-10-101-13/+32
| | | | | | | | | | | | | | | | | | | | | Add new files created for emulator. Modify NetBSD import to work with FreeBSD and add new features and code. The complete emulator is essentially a combination of work/code implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself, Steven Wallace. Features of this new emulator system include: o "clean" code, including strict prototyping. o Auto-generation of ibcs2 system calls, xenix system calls, isc system calls. Generation includes system tables, structure definitions, and prototyping of function calls. o ibcs2 emulator does not rely on any COMPAT_43 system calls. o embedded socksys support o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel o alternate /emul/ibcs2 namespace searched first for files in ibcs2 system. Usefull to keep sysv libraries, binaries in /emul/ibcs2. o many other finer details and functions fixed or implemented.
* Import of original NetBSD's ibcs2 emulator sources by Scott Bartram,swallace1995-10-101-0/+305
which is used as a basis for a more complete and cleaner ibcs2 emulator. (snapshot about May 1995 with a few files from September 1995) Some files and code from old emulator still remains. New files, features, and changes have been implemented by myself, which will be shown in following commits.
OpenPOWER on IntegriCloud