PERFORCE change 60331 for review
John Baldwin
jhb at FreeBSD.org
Mon Aug 23 15:58:50 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=60331
Change 60331 by jhb at jhb_slimer on 2004/08/23 22:58:14
- Fix LINT compiles on Alpha and i386.
- Add a new minor todo.
Affected files ...
.. //depot/projects/smpng/sys/alpha/osf1/osf1_misc.c#29 edit
.. //depot/projects/smpng/sys/compat/svr4/svr4_fcntl.c#16 edit
.. //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#19 edit
.. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_fcntl.c#9 edit
.. //depot/projects/smpng/sys/kern/subr_smp.c#35 edit
.. //depot/projects/smpng/sys/notes#18 edit
Differences ...
==== //depot/projects/smpng/sys/alpha/osf1/osf1_misc.c#29 (text+ko) ====
@@ -60,6 +60,7 @@
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/stat.h>
+#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
@@ -826,7 +827,7 @@
}
break;
default:
- error = kern_fcntl(td, uap->fd, uap->cmd, uap->arg);
+ error = kern_fcntl(td, uap->fd, uap->cmd, (intptr_t)uap->arg);
if ((uap->cmd == OSF1_F_GETFL) && !error ) {
tmp = td->td_retval[0] & O_ACCMODE;
==== //depot/projects/smpng/sys/compat/svr4/svr4_fcntl.c#16 (text+ko) ====
@@ -46,6 +46,7 @@
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/stat.h>
+#include <sys/syscallsubr.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
@@ -590,10 +591,10 @@
case F_DUPFD:
case F_GETFD:
case F_SETFD:
- return (kern_fcntl(td, uap->fd, cmd, uap->arg));
+ return (kern_fcntl(td, uap->fd, cmd, (intptr_t)uap->arg));
case F_GETFL:
- error = kern_fcntl(td, uap->fd, cmd, uap->arg);
+ error = kern_fcntl(td, uap->fd, cmd, (intptr_t)uap->arg);
if (error)
return (error);
*retval = bsd_to_svr4_flags(*retval);
@@ -615,7 +616,7 @@
flags = *retval;
flags &= O_ASYNC;
flags |= svr4_to_bsd_flags((u_long) uap->arg);
- return (kern_fcntl(td, uap->fd, F_SETFL, flags);
+ return (kern_fcntl(td, uap->fd, F_SETFL, flags));
}
case F_GETLK:
@@ -625,9 +626,6 @@
struct svr4_flock ifl;
struct flock fl;
- flp = stackgap_alloc(&sg, sizeof(struct flock));
- fa.arg = (long) flp;
-
error = copyin(uap->arg, &ifl, sizeof (ifl));
if (error)
return (error);
==== //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#19 (text+ko) ====
@@ -60,6 +60,7 @@
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/stat.h>
+#include <sys/syscallsubr.h>
#include <sys/sysproto.h>
#include <sys/uio.h>
#include <sys/ktrace.h> /* Must come after sys/uio.h */
@@ -1518,7 +1519,7 @@
/* set up SIGIO receiver if needed */
if (dat != NULL)
- return (kern_fcntl(td, fd, F_SETOWN, td->td_proc->p_pid);
+ return (kern_fcntl(td, fd, F_SETOWN, td->td_proc->p_pid));
return 0;
}
==== //depot/projects/smpng/sys/i386/ibcs2/ibcs2_fcntl.c#9 (text+ko) ====
@@ -37,6 +37,7 @@
#include <sys/filedesc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/syscallsubr.h>
#include <sys/sysproto.h>
#include <sys/ttycom.h>
@@ -246,26 +247,28 @@
struct thread *td;
struct ibcs2_fcntl_args *uap;
{
+ intptr_t arg;
int error;
struct flock fl;
struct ibcs2_flock ifl;
-
+
+ arg = (intptr_t)uap->arg;
switch(uap->cmd) {
case IBCS2_F_DUPFD:
- return (kern_fcntl(td, uap->fd, F_DUPFD, uap->arg));
+ return (kern_fcntl(td, uap->fd, F_DUPFD, arg));
case IBCS2_F_GETFD:
- return (kern_fcntl(td, uap->fd, F_GETFD, uap->arg));
+ return (kern_fcntl(td, uap->fd, F_GETFD, arg));
case IBCS2_F_SETFD:
- return (kern_fcntl(td, uap->fd, F_SETFD, uap->arg));
+ return (kern_fcntl(td, uap->fd, F_SETFD, arg));
case IBCS2_F_GETFL:
- error = kern_fcntl(td, uap->fd, F_GETFL, uap->arg);
+ error = kern_fcntl(td, uap->fd, F_GETFL, arg);
if (error)
return error;
td->td_retval[0] = oflags2ioflags(td->td_retval[0]);
return error;
case IBCS2_F_SETFL:
return (kern_fcntl(td, uap->fd, F_SETFL,
- ioflags2oflags((int)uap->arg)));
+ ioflags2oflags(arg)));
case IBCS2_F_GETLK:
{
@@ -274,7 +277,7 @@
if (error)
return error;
cvt_iflock2flock(&ifl, &fl);
- error = kern_fcntl(td, uap->fd, F_GETLK, &fl);
+ error = kern_fcntl(td, uap->fd, F_GETLK, (intptr_t)&fl);
if (error)
return error;
cvt_flock2iflock(&fl, &ifl);
@@ -289,7 +292,7 @@
if (error)
return error;
cvt_iflock2flock(&ifl, &fl);
- return (kern_fcntl(td, uap->fd, F_SETLK, &fl));
+ return (kern_fcntl(td, uap->fd, F_SETLK, (intptr_t)&fl));
}
case IBCS2_F_SETLKW:
@@ -299,7 +302,7 @@
if (error)
return error;
cvt_iflock2flock(&ifl, &fl);
- return (kern_fcntl(td, uap->fd, F_SETLKW, &fl));
+ return (kern_fcntl(td, uap->fd, F_SETLKW, (intptr_t)&fl));
}
}
return ENOSYS;
==== //depot/projects/smpng/sys/kern/subr_smp.c#35 (text+ko) ====
@@ -47,6 +47,7 @@
#include <sys/smp.h>
#include <sys/sysctl.h>
+#include <machine/cpu.h>
#include <machine/smp.h>
#ifdef SMP
==== //depot/projects/smpng/sys/notes#18 (text+ko) ====
@@ -54,5 +54,6 @@
go figure)
- Optimize spin locks on UP such that they don't do atomic operations
- Untested
+- Move kern_setrlimit() and kern_wait() prototypes to <sys/syscallsubr.h>
Space reserved for child branches:
More information about the p4-projects
mailing list