summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_signal.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2001-09-08 19:07:04 +0000
committermarcel <marcel@FreeBSD.org>2001-09-08 19:07:04 +0000
commitdf61d9eb64550a7afc1b41ccc9e0261af45c98c1 (patch)
tree684b7cfa2a29ef6b8c2244d13f69d58e1e89c819 /sys/compat/linux/linux_signal.c
parentbc484946ce384f7bb29f0d6da97f0d3eb7084574 (diff)
downloadFreeBSD-src-df61d9eb64550a7afc1b41ccc9e0261af45c98c1.zip
FreeBSD-src-df61d9eb64550a7afc1b41ccc9e0261af45c98c1.tar.gz
Round of cleanups and enhancements. These include (in random order):
o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse.
Diffstat (limited to 'sys/compat/linux/linux_signal.c')
-rw-r--r--sys/compat/linux/linux_signal.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 8a2f8b3..24a540f 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -42,7 +42,7 @@
#include <compat/linux/linux_util.h>
void
-linux_to_bsd_sigset(linux_sigset_t *lss, sigset_t *bss)
+linux_to_bsd_sigset(l_sigset_t *lss, sigset_t *bss)
{
int b, l;
@@ -63,7 +63,7 @@ linux_to_bsd_sigset(linux_sigset_t *lss, sigset_t *bss)
}
void
-bsd_to_linux_sigset(sigset_t *bss, linux_sigset_t *lss)
+bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss)
{
int b, l;
@@ -84,7 +84,7 @@ bsd_to_linux_sigset(sigset_t *bss, linux_sigset_t *lss)
}
static void
-linux_to_bsd_sigaction(linux_sigaction_t *lsa, struct sigaction *bsa)
+linux_to_bsd_sigaction(l_sigaction_t *lsa, struct sigaction *bsa)
{
linux_to_bsd_sigset(&lsa->lsa_mask, &bsa->sa_mask);
@@ -107,7 +107,7 @@ linux_to_bsd_sigaction(linux_sigaction_t *lsa, struct sigaction *bsa)
}
static void
-bsd_to_linux_sigaction(struct sigaction *bsa, linux_sigaction_t *lsa)
+bsd_to_linux_sigaction(struct sigaction *bsa, l_sigaction_t *lsa)
{
bsd_to_linux_sigset(&bsa->sa_mask, &lsa->lsa_mask);
@@ -131,8 +131,8 @@ bsd_to_linux_sigaction(struct sigaction *bsa, linux_sigaction_t *lsa)
}
int
-linux_do_sigaction(struct proc *p, int linux_sig, linux_sigaction_t *linux_nsa,
- linux_sigaction_t *linux_osa)
+linux_do_sigaction(struct proc *p, int linux_sig, l_sigaction_t *linux_nsa,
+ l_sigaction_t *linux_osa)
{
struct sigaction *nsa, *osa;
struct sigaction_args sa_args;
@@ -178,7 +178,7 @@ linux_do_sigaction(struct proc *p, int linux_sig, linux_sigaction_t *linux_nsa,
int
linux_signal(struct proc *p, struct linux_signal_args *args)
{
- linux_sigaction_t nsa, osa;
+ l_sigaction_t nsa, osa;
int error;
#ifdef DEBUG
@@ -201,7 +201,7 @@ linux_signal(struct proc *p, struct linux_signal_args *args)
int
linux_rt_sigaction(struct proc *p, struct linux_rt_sigaction_args *args)
{
- linux_sigaction_t nsa, osa;
+ l_sigaction_t nsa, osa;
int error;
#ifdef DEBUG
@@ -211,11 +211,11 @@ linux_rt_sigaction(struct proc *p, struct linux_rt_sigaction_args *args)
(void *)args->oact, (long)args->sigsetsize);
#endif
- if (args->sigsetsize != sizeof(linux_sigset_t))
+ if (args->sigsetsize != sizeof(l_sigset_t))
return (EINVAL);
if (args->act != NULL) {
- error = copyin(args->act, &nsa, sizeof(linux_sigaction_t));
+ error = copyin(args->act, &nsa, sizeof(l_sigaction_t));
if (error)
return (error);
}
@@ -225,15 +225,15 @@ linux_rt_sigaction(struct proc *p, struct linux_rt_sigaction_args *args)
args->oact ? &osa : NULL);
if (args->oact != NULL && !error) {
- error = copyout(&osa, args->oact, sizeof(linux_sigaction_t));
+ error = copyout(&osa, args->oact, sizeof(l_sigaction_t));
}
return (error);
}
static int
-linux_do_sigprocmask(struct proc *p, int how, linux_sigset_t *new,
- linux_sigset_t *old)
+linux_do_sigprocmask(struct proc *p, int how, l_sigset_t *new,
+ l_sigset_t *old)
{
int error;
sigset_t mask;
@@ -274,8 +274,8 @@ linux_do_sigprocmask(struct proc *p, int how, linux_sigset_t *new,
int
linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args)
{
- linux_osigset_t mask;
- linux_sigset_t set, oset;
+ l_osigset_t mask;
+ l_sigset_t set, oset;
int error;
#ifdef DEBUG
@@ -284,7 +284,7 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args)
#endif
if (args->mask != NULL) {
- error = copyin(args->mask, &mask, sizeof(linux_osigset_t));
+ error = copyin(args->mask, &mask, sizeof(l_osigset_t));
if (error)
return (error);
LINUX_SIGEMPTYSET(set);
@@ -297,7 +297,7 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args)
if (args->omask != NULL && !error) {
mask = oset.__bits[0];
- error = copyout(&mask, args->omask, sizeof(linux_osigset_t));
+ error = copyout(&mask, args->omask, sizeof(l_osigset_t));
}
return (error);
@@ -307,7 +307,7 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args)
int
linux_rt_sigprocmask(struct proc *p, struct linux_rt_sigprocmask_args *args)
{
- linux_sigset_t set, oset;
+ l_sigset_t set, oset;
int error;
#ifdef DEBUG
@@ -317,11 +317,11 @@ linux_rt_sigprocmask(struct proc *p, struct linux_rt_sigprocmask_args *args)
(void *)args->omask, (long)args->sigsetsize);
#endif
- if (args->sigsetsize != sizeof(linux_sigset_t))
+ if (args->sigsetsize != sizeof(l_sigset_t))
return EINVAL;
if (args->mask != NULL) {
- error = copyin(args->mask, &set, sizeof(linux_sigset_t));
+ error = copyin(args->mask, &set, sizeof(l_sigset_t));
if (error)
return (error);
}
@@ -331,7 +331,7 @@ linux_rt_sigprocmask(struct proc *p, struct linux_rt_sigprocmask_args *args)
args->omask ? &oset : NULL);
if (args->omask != NULL && !error) {
- error = copyout(&oset, args->omask, sizeof(linux_sigset_t));
+ error = copyout(&oset, args->omask, sizeof(l_sigset_t));
}
return (error);
@@ -339,13 +339,13 @@ linux_rt_sigprocmask(struct proc *p, struct linux_rt_sigprocmask_args *args)
#ifndef __alpha__
int
-linux_siggetmask(struct proc *p, struct linux_siggetmask_args *args)
+linux_sgetmask(struct proc *p, struct linux_sgetmask_args *args)
{
- linux_sigset_t mask;
+ l_sigset_t mask;
#ifdef DEBUG
- if (ldebug(siggetmask))
- printf(ARGS(siggetmask, ""));
+ if (ldebug(sgetmask))
+ printf(ARGS(sgetmask, ""));
#endif
PROC_LOCK(p);
@@ -356,14 +356,14 @@ linux_siggetmask(struct proc *p, struct linux_siggetmask_args *args)
}
int
-linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args)
+linux_ssetmask(struct proc *p, struct linux_ssetmask_args *args)
{
- linux_sigset_t lset;
+ l_sigset_t lset;
sigset_t bset;
#ifdef DEBUG
- if (ldebug(sigsetmask))
- printf(ARGS(sigsetmask, "%08lx"), (unsigned long)args->mask);
+ if (ldebug(ssetmask))
+ printf(ARGS(ssetmask, "%08lx"), (unsigned long)args->mask);
#endif
PROC_LOCK(p);
@@ -382,8 +382,8 @@ int
linux_sigpending(struct proc *p, struct linux_sigpending_args *args)
{
sigset_t bset;
- linux_sigset_t lset;
- linux_osigset_t mask;
+ l_sigset_t lset;
+ l_osigset_t mask;
#ifdef DEBUG
if (ldebug(sigpending))
OpenPOWER on IntegriCloud