summaryrefslogtreecommitdiffstats
path: root/sys/kern/makesyscalls.sh
Commit message (Collapse)AuthorAgeFilesLines
* Add the rest of the kernel support for the sem_ API in kern/uipc_sem.c.alfred2002-09-191-2/+3
| | | | | | | | | | Option 'P1003_1B_SEMAPHORES' to compile them in, or load the "sem" module to activate them. Have kern/makesyscalls.sh emit an include for sys/_semaphore.h into sysproto.h to pull in the typedef for semid_t. Add the syscalls to the syscall table as module stubs.
* Introduce syscall.master option 'COMPAT4' which allows one to wrapalfred2002-07-121-18/+64
| | | | | syscalls for FreeBSD 4 compatibility. Add kernel option COMPAT_FREEBSD4 to enable these syscalls.
* Usage style sweep: spell "usage" with a small 'u'.des2002-04-221-1/+1
| | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/.
* don't generate files with __P.alfred2002-03-191-2/+2
|
* Oops, fix previous commit to not generate a C comment in syscall.mk.bde2002-01-301-1/+1
|
* Escape $FreeBSD$ in a different way to avoid using the bogus escapes \$bde2002-01-301-5/+5
| | | | and \F. Awk just started warning about these.
* Don't generate <sys/syscalls-hide.h> it has never had any users anywhere inphk2001-10-131-19/+0
| | | | the source tree.
* Fix breakage caused by previous commit. The lkmnosys and lkmressysmarcel2001-10-071-5/+8
| | | | | | | | | | syscalls are of type NODEF but not in a way that fits the given definition of that type. The exact difference of lkmressys and lkmnosys is unclear, which makes it all the more confusing. A reevaluation of what we have and what we really need is in order. Spotted by: Maxime Henrion <mux@qualys.com> Pointy hat: marcel
* Make the NODEF type usable. A syscall of type NODEF will onlymarcel2001-09-281-1/+2
| | | | | | | | have its entry in the syscall table added. Nothing else is done. This differs from type NOPROTO in that NOPROTO adds a definition to syscall.h besides adding a sysent. A syscall can now have multiple entries without conflict. Note that the argssize is fixed and depends on the syscall name.
* KSE Milestone 2julian2001-09-121-2/+3
| | | | | | | | | | | | | | 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
* Fix the definition generation code from rev 1.15 that generates non-style(9)obrien2001-09-051-4/+4
| | | | compliant structure definitions.
* Remove the MPSAFE keyword from the parser for syscalls.master.dillon2001-08-301-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead introduce the [M] prefix to existing keywords. e.g. MSTD is the MP SAFE version of STD. This is prepatory for a massive Giant lock pushdown. The old MPSAFE keyword made syscalls.master too messy. Begin comments MP-Safe procedures with the comment: /* * MPSAFE */ This comments means that the procedure may be called without Giant held (The procedure itself may still need to obtain Giant temporarily to do its thing). sv_prepsyscall() is now MP SAFE and assumed to be MP SAFE sv_transtrap() is now MP SAFE and assumed to be MP SAFE ktrsyscall() and ktrsysret() are now MP SAFE (Giant Pushdown) trapsignal() is now MP SAFE (Giant Pushdown) Places which used to do the if (mtx_owned(&Giant)) mtx_unlock(&Giant) test in syscall[2]() in */*/trap.c now do not. Instead they explicitly unlock Giant if they previously obtained it, and then assert that it is no longer held to catch broken system calls. Rebuild syscall tables.
* Add padding before each element of the syscall argument structures intmm2001-08-221-2/+15
| | | | | | | | sysproto.h in addition to the existing padding afterwards. This is needed to support big-endian architectures like sparc64. Reviewed by: bde Tested on alpha by: jhb
* Add reserved lkmressys keyword. I swear, this script will die thealfred2000-12-011-2/+2
| | | | next time I need to hack on it.
* implement NOSTD syscall type, this creates the syscall args, but sticksalfred2000-12-011-6/+9
| | | | a lkmnosys into the sysent table so that SYSCALL_MODULE() works
* Change the 'exit()' system call to 'sys_exit()'. This avoids overlappingpeter2000-07-291-2/+0
| | | | | | gcc's internal exit() prototypes and the (futile) hackery that we did to try and avoid warnings. main() was renamed for similar reasons. Remove an exit related hack from makesyscalls.sh.
* Fixed the calculation of sy_nargs in sysent tables. We attempted to dobde2000-05-091-25/+34
| | | | | | | | | | | | | | this in awk using the hack of counting args of type off_t twice and args of all other types once. This is too simple to work. It gave benignly wrong results on alphas (off_t shouldn't be counted twice) and for svr4_sys_mmap64() on i386's (off64_t should be counted twice). It gave fatally wrong results for i386's with 64-bit longs (longs should be counted twice). The correct value for sy_nargs is easier to determine from the size of the args struct anyway, except for complications to make the generated code almost readable. Improved formatting of sysent tables by lining up the comments where possible.
* Make makesyscalls.sh parse an optional field 'MPSAFE' that specifiesalfred2000-04-031-10/+23
| | | | | | | that a syscall does not want the BGL to be grabbed automatically. Add the new MPSAFE flag to the syscalls that dillon has determined to be MPSAFE.
* Second pass commit to introduce new ACL and Extended Attribute systemrwatson1999-12-191-0/+1
| | | | | | | calls, vnops, vfsops, both in /kern, and to individual file systems that require a vfsop_ array entry. Reviewed by: eivind
* Add $FreeBSD$ tags to generated files otherwise the checker won't let thempeter1999-09-101-0/+6
| | | | be committed.
* Id -> FreeBSDpeter1999-08-281-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add trailing newline to sys/syscall.mk so that diff doesn't choke on it.phk1998-06-281-1/+2
|
* Don't generate COMPAT_43 cruft if there are no COMPAT_43 syscalls.bde1998-06-091-12/+18
| | | | | | | | In particular, don't generate an include of "opt_compat.h" if it wouldn't affect anything we create. This will fix recent breakage of the ibcs2 LKM. The ibcs2 syscall files were not regenerated properly, so the LKM didn't break immediately when we started generating this extraneous include.
* Fixed some style bugs in output (missing tabs and unparenthesized macros).bde1998-06-081-31/+30
| | | | Fixed some style bugs in source (mostly, superfluous backslashes).
* This commit fixes various 64bit portability problems required fordfr1998-06-071-9/+15
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Add statements to generate a sys/syscall.mk file for inclusionjb1998-03-091-2/+11
| | | | | | | | | | | | | | during the libc/libc_r to automatically pick up syscall names on the assumption that default asm code needs to generated for them. In the up-coming changes to the libc makefiles, there is the option to provide a machine dependent asm source file which will turn off the automatic generation of the default. There is also an option to just stop code being generated for a syscall. In most cases, though, the default asm code is all that is required, so this change makes that the most convenient was to do business. Idea suggested by: bde
* Generate a forward declaration of `struct proc' in <sys/sysproto.h>.bde1998-02-031-8/+9
| | | | | | | Removed extra args to a printf. Fixed some style inconsistencies (unnecessary parentheses for printf). awk is not C.
* Move around opt_compat include to accomodate Linulator brokenness (foreivind1997-12-161-3/+4
| | | | the time being).
* Make COMPAT_43 and COMPAT_SUNOS new-style options.eivind1997-12-161-3/+3
|
* add process id to tmp files... this prevents two runs from stompingjmg1997-12-081-7/+7
| | | | over each other's tmp files... (usr.bin/truss uncovered this bug)
* Don't generate new prototype files with the extra int retval[] arg atpeter1997-11-181-3/+3
| | | | | | the end since pdk deleted them. Forgotten by: phk
* Add "NOIMPL" for syscalls we know what is, but don't implement as "STD".phk1997-10-261-7/+16
| | | | Use this for getfh & nfssvc.
* Don't generate unused nested #include of <sys/aio.h>.bde1997-06-291-2/+1
|
* Modifications to existing files to support the initial AIO/LIO anddyson1997-06-161-1/+2
| | | | kernel based threading support.
* Make sure we touch all the temporary files at startup, because we assumepeter1997-03-291-1/+3
| | | | | | they were created later on. This is not the case when processing syscalls.isc in the ibcs2 area. (It generates no declarations, it's all either hidden (already prototyped elsewhere) or unimplemented).
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-2/+2
| | | | ready for it yet.
* Reduced #include spam in <sys/sysproto.h> and fixed things that dependedbde1997-01-161-4/+2
| | | | | | | | | | | | | | on it. makesyscalls.sh: This parsed $Id$. Fixed(?) to parse $FreeBSD$. The output is wrong when the id is not expanded in the source file. syscalls.master: Fixed declaration of sigsuspend(). There are still some bogons and spam involving sigset_t. Use `struct foo *' instead of the equivalent `foo_t *' for some nfs and lfs syscalls so that <sys/sysproto.h> doesn't depend on <sys/mount.h>.
* 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.
* Don't use __dead in the kernel. It was an obfuscation for gcc >= 2.5bde1996-09-131-4/+5
| | | | and a no-op for gcc >= 2.6.
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-021-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix misc formatting errors in makesyscalls.sh.swallace1995-10-071-18/+20
| | | | | | | | Add CPT_NOA type which is COMPAT with NOARGS -- do not produce argument struct in sysproto. Change accept, recvfrom, getsockname to CPT_NOA type. Fix getrlimit, setrlimit argument #2 name to struct rlimit.
* Add new functionality to makesyscalls.sh:swallace1995-10-071-68/+217
| | | | | | | | | | | | | | | | | | | | | | | | o optional config-file to set vars: sysnames, sysproto, sysproto_h, syshdr, syssw, syshide, syscallprefix, switchname, namesname, sysvec. o change syntax of syscalls.master entry: remove argument count. add pseudo-prototype field defining function name and arguments. o generates correct structure definitions for all system calls in sys/sysproto.h o add type NOARGS: same as STD except do not create structure in sys/sysproto.h o add type NOPROTO: same as STD except do not create structure or function prototype in sys/sysproto.h New functionality provides complete prototype definitions. Usefull for generating files for emulated systems like my new ibcs2 code. Update syscalls.master to reflect new changes. For example, read() entry now looks like: 3 STD POSIX { int ibcs2_read(int fd, char *buf, u_int nbytes); } This is similar to how NetBSD generates these files.
* Oops. Avoid literal $Id in an awk string to stop cvs from substituting it.bde1995-09-191-3/+3
|
* Generate prototypes for syscall-implementing functions. Put them inbde1995-09-191-25/+55
| | | | | | | | | | | | | | <sys/sysproto.h> and use them (so far only) in kern/init_sysent.c. Don't put $Id in generated files. kern/syscalls.master: I had to add some new fields to describe some non-orthogonal names. E.g., the args struct for the syscall-implementing function foo() is usually named `foo_args', but for getpid() it is named `args'. sys/sysent.h: sy_call_t is still incomplete to hide a couple of warnings.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-2/+1
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* First attempt to run linux binaries. This is only the changes needed tosos1995-02-141-2/+2
| | | | | | the generic kernel. The actual emulator is a separate LKM. (not finished yet, sorry). Submitted by: sos@freebsd.org & sef@kithrup.com
* Put a small hack into a large hack named makeyscall.sh. Generate onlyats1994-11-061-2/+5
| | | | one lkmnosys() entry in init_sysent.c.
* Added errno conversion table (initialize to zero).sos1994-10-091-2/+2
|
* init_sysent.c was missing the final newline.phk1994-09-261-2/+2
|
OpenPOWER on IntegriCloud