Page MenuHomeFreeBSD

D5589.1794811982.diff
No OneTemporary

Authored By
Unknown
Size
49 KB
Referenced Files
None
Subscribers
None

D5589.1794811982.diff

Index: sys/compat/freebsd32/freebsd32_proto.h
===================================================================
--- sys/compat/freebsd32/freebsd32_proto.h
+++ sys/compat/freebsd32/freebsd32_proto.h
@@ -285,25 +285,9 @@
char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)];
};
-struct freebsd32_aio_cancel_args {
- char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
- char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)];
-};
struct freebsd32_aio_error_args {
char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)];
};
-struct freebsd32_oaio_read_args {
- char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
-};
-struct freebsd32_oaio_write_args {
- char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
-};
-struct freebsd32_olio_listio_args {
- char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
- char acb_list_l_[PADL_(struct oaiocb32 *const *)]; struct oaiocb32 *const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 *const *)];
- char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
- char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)];
-};
struct freebsd32_jail_args {
char jail_l_[PADL_(struct jail32 *)]; struct jail32 * jail; char jail_r_[PADR_(struct jail32 *)];
};
@@ -755,11 +739,7 @@
int freebsd32_kldstat(struct thread *, struct freebsd32_kldstat_args *);
int freebsd32_aio_return(struct thread *, struct freebsd32_aio_return_args *);
int freebsd32_aio_suspend(struct thread *, struct freebsd32_aio_suspend_args *);
-int freebsd32_aio_cancel(struct thread *, struct freebsd32_aio_cancel_args *);
int freebsd32_aio_error(struct thread *, struct freebsd32_aio_error_args *);
-int freebsd32_oaio_read(struct thread *, struct freebsd32_oaio_read_args *);
-int freebsd32_oaio_write(struct thread *, struct freebsd32_oaio_write_args *);
-int freebsd32_olio_listio(struct thread *, struct freebsd32_olio_listio_args *);
int freebsd32_jail(struct thread *, struct freebsd32_jail_args *);
int freebsd32_sigtimedwait(struct thread *, struct freebsd32_sigtimedwait_args *);
int freebsd32_sigwaitinfo(struct thread *, struct freebsd32_sigwaitinfo_args *);
@@ -1043,6 +1023,18 @@
char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)];
char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)];
};
+struct freebsd6_freebsd32_aio_read_args {
+ char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
+};
+struct freebsd6_freebsd32_aio_write_args {
+ char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
+};
+struct freebsd6_freebsd32_lio_listio_args {
+ char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
+ char acb_list_l_[PADL_(struct oaiocb32 *const *)]; struct oaiocb32 *const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 *const *)];
+ char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
+ char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)];
+};
#ifdef PAD64_REQUIRED
#else
#endif
@@ -1061,6 +1053,9 @@
int freebsd6_freebsd32_lseek(struct thread *, struct freebsd6_freebsd32_lseek_args *);
int freebsd6_freebsd32_truncate(struct thread *, struct freebsd6_freebsd32_truncate_args *);
int freebsd6_freebsd32_ftruncate(struct thread *, struct freebsd6_freebsd32_ftruncate_args *);
+int freebsd6_freebsd32_aio_read(struct thread *, struct freebsd6_freebsd32_aio_read_args *);
+int freebsd6_freebsd32_aio_write(struct thread *, struct freebsd6_freebsd32_aio_write_args *);
+int freebsd6_freebsd32_lio_listio(struct thread *, struct freebsd6_freebsd32_lio_listio_args *);
#endif /* COMPAT_FREEBSD6 */
@@ -1181,11 +1176,10 @@
#define FREEBSD32_SYS_AUE_freebsd32_kldstat AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_aio_return AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_aio_suspend AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_aio_cancel AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_aio_error AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_oaio_read AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_oaio_write AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_olio_listio AUE_NULL
+#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_aio_read AUE_NULL
+#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_aio_write AUE_NULL
+#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_lio_listio AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_sendfile AUE_SENDFILE
#define FREEBSD32_SYS_AUE_freebsd32_jail AUE_JAIL
#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_sigaction AUE_SIGACTION
Index: sys/compat/freebsd32/freebsd32_syscall.h
===================================================================
--- sys/compat/freebsd32/freebsd32_syscall.h
+++ sys/compat/freebsd32/freebsd32_syscall.h
@@ -253,11 +253,11 @@
/* 313 is obsolete signanosleep */
#define FREEBSD32_SYS_freebsd32_aio_return 314
#define FREEBSD32_SYS_freebsd32_aio_suspend 315
-#define FREEBSD32_SYS_freebsd32_aio_cancel 316
+#define FREEBSD32_SYS_aio_cancel 316
#define FREEBSD32_SYS_freebsd32_aio_error 317
-#define FREEBSD32_SYS_freebsd32_oaio_read 318
-#define FREEBSD32_SYS_freebsd32_oaio_write 319
-#define FREEBSD32_SYS_freebsd32_olio_listio 320
+#define FREEBSD32_SYS_freebsd6_freebsd32_aio_read 318
+#define FREEBSD32_SYS_freebsd6_freebsd32_aio_write 319
+#define FREEBSD32_SYS_freebsd6_freebsd32_lio_listio 320
#define FREEBSD32_SYS_yield 321
/* 322 is obsolete thr_sleep */
/* 323 is obsolete thr_wakeup */
Index: sys/compat/freebsd32/freebsd32_syscalls.c
===================================================================
--- sys/compat/freebsd32/freebsd32_syscalls.c
+++ sys/compat/freebsd32/freebsd32_syscalls.c
@@ -326,11 +326,11 @@
"obs_signanosleep", /* 313 = obsolete signanosleep */
"freebsd32_aio_return", /* 314 = freebsd32_aio_return */
"freebsd32_aio_suspend", /* 315 = freebsd32_aio_suspend */
- "freebsd32_aio_cancel", /* 316 = freebsd32_aio_cancel */
+ "aio_cancel", /* 316 = aio_cancel */
"freebsd32_aio_error", /* 317 = freebsd32_aio_error */
- "freebsd32_oaio_read", /* 318 = freebsd32_oaio_read */
- "freebsd32_oaio_write", /* 319 = freebsd32_oaio_write */
- "freebsd32_olio_listio", /* 320 = freebsd32_olio_listio */
+ "compat6.freebsd32_aio_read", /* 318 = freebsd6 freebsd32_aio_read */
+ "compat6.freebsd32_aio_write", /* 319 = freebsd6 freebsd32_aio_write */
+ "compat6.freebsd32_lio_listio", /* 320 = freebsd6 freebsd32_lio_listio */
"yield", /* 321 = yield */
"obs_thr_sleep", /* 322 = obsolete thr_sleep */
"obs_thr_wakeup", /* 323 = obsolete thr_wakeup */
Index: sys/compat/freebsd32/freebsd32_sysent.c
===================================================================
--- sys/compat/freebsd32/freebsd32_sysent.c
+++ sys/compat/freebsd32/freebsd32_sysent.c
@@ -302,9 +302,9 @@
{ AS(openbsd_poll_args), (sy_call_t *)sys_openbsd_poll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = openbsd_poll */
{ 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = issetugid */
{ AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = lchown */
- { AS(freebsd32_aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 255 = freebsd32_aio_read */
- { AS(freebsd32_aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 256 = freebsd32_aio_write */
- { AS(freebsd32_lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 257 = freebsd32_lio_listio */
+ { AS(freebsd32_aio_read_args), (sy_call_t *)freebsd32_aio_read, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = freebsd32_aio_read */
+ { AS(freebsd32_aio_write_args), (sy_call_t *)freebsd32_aio_write, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = freebsd32_aio_write */
+ { AS(freebsd32_lio_listio_args), (sy_call_t *)freebsd32_lio_listio, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = freebsd32_lio_listio */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 258 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 259 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 260 = nosys */
@@ -361,13 +361,13 @@
{ AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = setresuid */
{ AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = setresgid */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = obsolete signanosleep */
- { AS(freebsd32_aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 314 = freebsd32_aio_return */
- { AS(freebsd32_aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 315 = freebsd32_aio_suspend */
- { AS(freebsd32_aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 316 = freebsd32_aio_cancel */
- { AS(freebsd32_aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 317 = freebsd32_aio_error */
- { AS(freebsd32_oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 318 = freebsd32_oaio_read */
- { AS(freebsd32_oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 319 = freebsd32_oaio_write */
- { AS(freebsd32_olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 320 = freebsd32_olio_listio */
+ { AS(freebsd32_aio_return_args), (sy_call_t *)freebsd32_aio_return, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = freebsd32_aio_return */
+ { AS(freebsd32_aio_suspend_args), (sy_call_t *)freebsd32_aio_suspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = freebsd32_aio_suspend */
+ { AS(aio_cancel_args), (sy_call_t *)sys_aio_cancel, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = aio_cancel */
+ { AS(freebsd32_aio_error_args), (sy_call_t *)freebsd32_aio_error, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = freebsd32_aio_error */
+ { compat6(AS(freebsd6_freebsd32_aio_read_args),freebsd32_aio_read), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = freebsd6 freebsd32_aio_read */
+ { compat6(AS(freebsd6_freebsd32_aio_write_args),freebsd32_aio_write), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = freebsd6 freebsd32_aio_write */
+ { compat6(AS(freebsd6_freebsd32_lio_listio_args),freebsd32_lio_listio), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = freebsd6 freebsd32_lio_listio */
{ 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = yield */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 322 = obsolete thr_sleep */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 323 = obsolete thr_wakeup */
@@ -406,7 +406,7 @@
{ AS(extattr_set_file_args), (sy_call_t *)sys_extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 356 = extattr_set_file */
{ AS(extattr_get_file_args), (sy_call_t *)sys_extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 357 = extattr_get_file */
{ AS(extattr_delete_file_args), (sy_call_t *)sys_extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 358 = extattr_delete_file */
- { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 359 = freebsd32_aio_waitcomplete */
+ { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)freebsd32_aio_waitcomplete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 359 = freebsd32_aio_waitcomplete */
{ AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 360 = getresuid */
{ AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 361 = getresgid */
{ 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 362 = kqueue */
@@ -512,7 +512,7 @@
{ AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */
{ AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 463 = abort2 */
{ AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 464 = thr_set_name */
- { AS(freebsd32_aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 465 = freebsd32_aio_fsync */
+ { AS(freebsd32_aio_fsync_args), (sy_call_t *)freebsd32_aio_fsync, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 465 = freebsd32_aio_fsync */
{ AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 466 = rtprio_thread */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 467 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */
@@ -609,7 +609,7 @@
{ AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 540 = chflagsat */
{ AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = accept4 */
{ AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 542 = pipe2 */
- { AS(freebsd32_aio_mlock_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 543 = freebsd32_aio_mlock */
+ { AS(freebsd32_aio_mlock_args), (sy_call_t *)freebsd32_aio_mlock, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 543 = freebsd32_aio_mlock */
#ifdef PAD64_REQUIRED
{ AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */
#else
Index: sys/compat/freebsd32/freebsd32_systrace_args.c
===================================================================
--- sys/compat/freebsd32/freebsd32_systrace_args.c
+++ sys/compat/freebsd32/freebsd32_systrace_args.c
@@ -1556,11 +1556,11 @@
*n_args = 3;
break;
}
- /* freebsd32_aio_cancel */
+ /* aio_cancel */
case 316: {
- struct freebsd32_aio_cancel_args *p = params;
+ struct aio_cancel_args *p = params;
iarg[0] = p->fd; /* int */
- uarg[1] = (intptr_t) p->aiocbp; /* struct aiocb32 * */
+ uarg[1] = (intptr_t) p->aiocbp; /* struct aiocb * */
*n_args = 2;
break;
}
@@ -1571,30 +1571,6 @@
*n_args = 1;
break;
}
- /* freebsd32_oaio_read */
- case 318: {
- struct freebsd32_oaio_read_args *p = params;
- uarg[0] = (intptr_t) p->aiocbp; /* struct oaiocb32 * */
- *n_args = 1;
- break;
- }
- /* freebsd32_oaio_write */
- case 319: {
- struct freebsd32_oaio_write_args *p = params;
- uarg[0] = (intptr_t) p->aiocbp; /* struct oaiocb32 * */
- *n_args = 1;
- break;
- }
- /* freebsd32_olio_listio */
- case 320: {
- struct freebsd32_olio_listio_args *p = params;
- iarg[0] = p->mode; /* int */
- uarg[1] = (intptr_t) p->acb_list; /* struct oaiocb32 *const * */
- iarg[2] = p->nent; /* int */
- uarg[3] = (intptr_t) p->sig; /* struct osigevent32 * */
- *n_args = 4;
- break;
- }
/* yield */
case 321: {
*n_args = 0;
@@ -5813,14 +5789,14 @@
break;
};
break;
- /* freebsd32_aio_cancel */
+ /* aio_cancel */
case 316:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
- p = "struct aiocb32 *";
+ p = "struct aiocb *";
break;
default:
break;
@@ -5836,45 +5812,6 @@
break;
};
break;
- /* freebsd32_oaio_read */
- case 318:
- switch(ndx) {
- case 0:
- p = "struct oaiocb32 *";
- break;
- default:
- break;
- };
- break;
- /* freebsd32_oaio_write */
- case 319:
- switch(ndx) {
- case 0:
- p = "struct oaiocb32 *";
- break;
- default:
- break;
- };
- break;
- /* freebsd32_olio_listio */
- case 320:
- switch(ndx) {
- case 0:
- p = "int";
- break;
- case 1:
- p = "struct oaiocb32 *const *";
- break;
- case 2:
- p = "int";
- break;
- case 3:
- p = "struct osigevent32 *";
- break;
- default:
- break;
- };
- break;
/* yield */
case 321:
break;
@@ -9884,7 +9821,7 @@
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* freebsd32_aio_cancel */
+ /* aio_cancel */
case 316:
if (ndx == 0 || ndx == 1)
p = "int";
@@ -9894,21 +9831,6 @@
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* freebsd32_oaio_read */
- case 318:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
- /* freebsd32_oaio_write */
- case 319:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
- /* freebsd32_olio_listio */
- case 320:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
/* yield */
case 321:
/* mlockall */
Index: sys/compat/freebsd32/syscalls.master
===================================================================
--- sys/compat/freebsd32/syscalls.master
+++ sys/compat/freebsd32/syscalls.master
@@ -477,11 +477,11 @@
u_int nfds, int timeout); }
253 AUE_ISSETUGID NOPROTO { int issetugid(void); }
254 AUE_LCHOWN NOPROTO { int lchown(char *path, int uid, int gid); }
-255 AUE_NULL NOSTD { int freebsd32_aio_read( \
+255 AUE_NULL STD { int freebsd32_aio_read( \
struct aiocb32 *aiocbp); }
-256 AUE_NULL NOSTD { int freebsd32_aio_write( \
+256 AUE_NULL STD { int freebsd32_aio_write( \
struct aiocb32 *aiocbp); }
-257 AUE_NULL NOSTD { int freebsd32_lio_listio(int mode, \
+257 AUE_NULL STD { int freebsd32_lio_listio(int mode, \
struct aiocb32 * const *acb_list, \
int nent, struct sigevent32 *sig); }
258 AUE_NULL UNIMPL nosys
@@ -562,20 +562,20 @@
312 AUE_SETRESGID NOPROTO { int setresgid(gid_t rgid, gid_t egid, \
gid_t sgid); }
313 AUE_NULL OBSOL signanosleep
-314 AUE_NULL NOSTD { int freebsd32_aio_return( \
+314 AUE_NULL STD { int freebsd32_aio_return( \
struct aiocb32 *aiocbp); }
-315 AUE_NULL NOSTD { int freebsd32_aio_suspend( \
+315 AUE_NULL STD { int freebsd32_aio_suspend( \
struct aiocb32 * const * aiocbp, int nent, \
const struct timespec32 *timeout); }
-316 AUE_NULL NOSTD { int freebsd32_aio_cancel(int fd, \
+316 AUE_NULL NOPROTO { int aio_cancel(int fd, \
+ struct aiocb *aiocbp); }
+317 AUE_NULL STD { int freebsd32_aio_error( \
struct aiocb32 *aiocbp); }
-317 AUE_NULL NOSTD { int freebsd32_aio_error( \
- struct aiocb32 *aiocbp); }
-318 AUE_NULL NOSTD { int freebsd32_oaio_read( \
+318 AUE_NULL COMPAT6 { int freebsd32_aio_read( \
struct oaiocb32 *aiocbp); }
-319 AUE_NULL NOSTD { int freebsd32_oaio_write( \
+319 AUE_NULL COMPAT6 { int freebsd32_aio_write( \
struct oaiocb32 *aiocbp); }
-320 AUE_NULL NOSTD { int freebsd32_olio_listio(int mode, \
+320 AUE_NULL COMPAT6 { int freebsd32_lio_listio(int mode, \
struct oaiocb32 * const *acb_list, \
int nent, struct osigevent32 *sig); }
321 AUE_NULL NOPROTO { int yield(void); }
@@ -653,7 +653,7 @@
358 AUE_EXTATTR_DELETE_FILE NOPROTO { int extattr_delete_file( \
const char *path, int attrnamespace, \
const char *attrname); }
-359 AUE_NULL NOSTD { int freebsd32_aio_waitcomplete( \
+359 AUE_NULL STD { int freebsd32_aio_waitcomplete( \
struct aiocb32 **aiocbp, \
struct timespec32 *timeout); }
360 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \
@@ -837,7 +837,7 @@
462 AUE_NULL NOPROTO|NOSTD { int kmq_unlink(const char *path); }
463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); }
464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); }
-465 AUE_NULL NOSTD { int freebsd32_aio_fsync(int op, \
+465 AUE_NULL STD { int freebsd32_aio_fsync(int op, \
struct aiocb32 *aiocbp); }
466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \
lwpid_t lwpid, struct rtprio *rtp); }
@@ -1055,7 +1055,7 @@
__socklen_t * __restrict anamelen, \
int flags); }
542 AUE_PIPE NOPROTO { int pipe2(int *fildes, int flags); }
-543 AUE_NULL NOSTD { int freebsd32_aio_mlock( \
+543 AUE_NULL STD { int freebsd32_aio_mlock( \
struct aiocb32 *aiocbp); }
#ifdef PAD64_REQUIRED
544 AUE_NULL STD { int freebsd32_procctl(int idtype, int pad, \
Index: sys/kern/init_sysent.c
===================================================================
--- sys/kern/init_sysent.c
+++ sys/kern/init_sysent.c
@@ -295,9 +295,9 @@
{ AS(openbsd_poll_args), (sy_call_t *)sys_openbsd_poll, AUE_POLL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 252 = openbsd_poll */
{ 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 253 = issetugid */
{ AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = lchown */
- { AS(aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 255 = aio_read */
- { AS(aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 256 = aio_write */
- { AS(lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 257 = lio_listio */
+ { AS(aio_read_args), (sy_call_t *)sys_aio_read, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 255 = aio_read */
+ { AS(aio_write_args), (sy_call_t *)sys_aio_write, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 256 = aio_write */
+ { AS(lio_listio_args), (sy_call_t *)sys_lio_listio, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 257 = lio_listio */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 258 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 259 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 260 = nosys */
@@ -354,13 +354,13 @@
{ AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 311 = setresuid */
{ AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 312 = setresgid */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = obsolete signanosleep */
- { AS(aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 314 = aio_return */
- { AS(aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 315 = aio_suspend */
- { AS(aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 316 = aio_cancel */
- { AS(aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 317 = aio_error */
- { AS(oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 318 = oaio_read */
- { AS(oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 319 = oaio_write */
- { AS(olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 320 = olio_listio */
+ { AS(aio_return_args), (sy_call_t *)sys_aio_return, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 314 = aio_return */
+ { AS(aio_suspend_args), (sy_call_t *)sys_aio_suspend, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 315 = aio_suspend */
+ { AS(aio_cancel_args), (sy_call_t *)sys_aio_cancel, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 316 = aio_cancel */
+ { AS(aio_error_args), (sy_call_t *)sys_aio_error, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 317 = aio_error */
+ { compat6(AS(freebsd6_aio_read_args),aio_read), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 318 = freebsd6 aio_read */
+ { compat6(AS(freebsd6_aio_write_args),aio_write), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 319 = freebsd6 aio_write */
+ { compat6(AS(freebsd6_lio_listio_args),lio_listio), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 320 = freebsd6 lio_listio */
{ 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 321 = yield */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 322 = obsolete thr_sleep */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 323 = obsolete thr_wakeup */
@@ -399,7 +399,7 @@
{ AS(extattr_set_file_args), (sy_call_t *)sys_extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 356 = extattr_set_file */
{ AS(extattr_get_file_args), (sy_call_t *)sys_extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 357 = extattr_get_file */
{ AS(extattr_delete_file_args), (sy_call_t *)sys_extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 358 = extattr_delete_file */
- { AS(aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 359 = aio_waitcomplete */
+ { AS(aio_waitcomplete_args), (sy_call_t *)sys_aio_waitcomplete, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 359 = aio_waitcomplete */
{ AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 360 = getresuid */
{ AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 361 = getresgid */
{ 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 362 = kqueue */
@@ -505,7 +505,7 @@
{ AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */
{ AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 463 = abort2 */
{ AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 464 = thr_set_name */
- { AS(aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 465 = aio_fsync */
+ { AS(aio_fsync_args), (sy_call_t *)sys_aio_fsync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 465 = aio_fsync */
{ AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 466 = rtprio_thread */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 467 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */
@@ -583,7 +583,7 @@
{ AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 540 = chflagsat */
{ AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 541 = accept4 */
{ AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 542 = pipe2 */
- { AS(aio_mlock_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 543 = aio_mlock */
+ { AS(aio_mlock_args), (sy_call_t *)sys_aio_mlock, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 543 = aio_mlock */
{ AS(procctl_args), (sy_call_t *)sys_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = procctl */
{ AS(ppoll_args), (sy_call_t *)sys_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = ppoll */
{ AS(futimens_args), (sy_call_t *)sys_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 546 = futimens */
Index: sys/kern/kern_descrip.c
===================================================================
--- sys/kern/kern_descrip.c
+++ sys/kern/kern_descrip.c
@@ -1395,9 +1395,8 @@
if (error != 0)
return (error);
- /* If asynchronous I/O is available, it works for all descriptors. */
if (uap->name == _PC_ASYNC_IO) {
- td->td_retval[0] = async_io_version;
+ td->td_retval[0] = _POSIX_ASYNCHRONOUS_IO;
goto out;
}
vp = fp->f_vnode;
Index: sys/kern/posix4_mib.c
===================================================================
--- sys/kern/posix4_mib.c
+++ sys/kern/posix4_mib.c
@@ -77,8 +77,7 @@
#endif
-SYSCTL_INT(_p1003_1b, CTL_P1003_1B_ASYNCHRONOUS_IO, \
- asynchronous_io, CTLFLAG_RD, &async_io_version, 0, "");
+P1B_SYSCTL(CTL_P1003_1B_ASYNCHRONOUS_IO, asynchronous_io);
P1B_SYSCTL(CTL_P1003_1B_MAPPED_FILES, mapped_files);
P1B_SYSCTL(CTL_P1003_1B_MEMLOCK, memlock);
P1B_SYSCTL(CTL_P1003_1B_MEMLOCK_RANGE, memlock_range);
@@ -170,12 +169,6 @@
p31b_setcfg(CTL_P1003_1B_MAPPED_FILES, 200112L);
p31b_setcfg(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, 200112L);
p31b_setcfg(CTL_P1003_1B_PAGESIZE, PAGE_SIZE);
- if (!p31b_iscfg(CTL_P1003_1B_AIO_LISTIO_MAX))
- p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, -1);
- if (!p31b_iscfg(CTL_P1003_1B_AIO_MAX))
- p31b_setcfg(CTL_P1003_1B_AIO_MAX, -1);
- if (!p31b_iscfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX))
- p31b_setcfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, -1);
}
SYSINIT(p31b_set_standard, SI_SUB_P1003_1B, SI_ORDER_ANY, p31b_set_standard,
Index: sys/kern/syscalls.c
===================================================================
--- sys/kern/syscalls.c
+++ sys/kern/syscalls.c
@@ -325,9 +325,9 @@
"aio_suspend", /* 315 = aio_suspend */
"aio_cancel", /* 316 = aio_cancel */
"aio_error", /* 317 = aio_error */
- "oaio_read", /* 318 = oaio_read */
- "oaio_write", /* 319 = oaio_write */
- "olio_listio", /* 320 = olio_listio */
+ "compat6.aio_read", /* 318 = freebsd6 aio_read */
+ "compat6.aio_write", /* 319 = freebsd6 aio_write */
+ "compat6.lio_listio", /* 320 = freebsd6 lio_listio */
"yield", /* 321 = yield */
"obs_thr_sleep", /* 322 = obsolete thr_sleep */
"obs_thr_wakeup", /* 323 = obsolete thr_wakeup */
Index: sys/kern/syscalls.master
===================================================================
--- sys/kern/syscalls.master
+++ sys/kern/syscalls.master
@@ -475,9 +475,9 @@
u_int nfds, int timeout); }
253 AUE_ISSETUGID STD { int issetugid(void); }
254 AUE_LCHOWN STD { int lchown(char *path, int uid, int gid); }
-255 AUE_NULL NOSTD { int aio_read(struct aiocb *aiocbp); }
-256 AUE_NULL NOSTD { int aio_write(struct aiocb *aiocbp); }
-257 AUE_NULL NOSTD { int lio_listio(int mode, \
+255 AUE_NULL STD { int aio_read(struct aiocb *aiocbp); }
+256 AUE_NULL STD { int aio_write(struct aiocb *aiocbp); }
+257 AUE_NULL STD { int lio_listio(int mode, \
struct aiocb * const *acb_list, \
int nent, struct sigevent *sig); }
258 AUE_NULL UNIMPL nosys
@@ -554,16 +554,16 @@
312 AUE_SETRESGID STD { int setresgid(gid_t rgid, gid_t egid, \
gid_t sgid); }
313 AUE_NULL OBSOL signanosleep
-314 AUE_NULL NOSTD { int aio_return(struct aiocb *aiocbp); }
-315 AUE_NULL NOSTD { int aio_suspend( \
+314 AUE_NULL STD { int aio_return(struct aiocb *aiocbp); }
+315 AUE_NULL STD { int aio_suspend( \
struct aiocb * const * aiocbp, int nent, \
const struct timespec *timeout); }
-316 AUE_NULL NOSTD { int aio_cancel(int fd, \
+316 AUE_NULL STD { int aio_cancel(int fd, \
struct aiocb *aiocbp); }
-317 AUE_NULL NOSTD { int aio_error(struct aiocb *aiocbp); }
-318 AUE_NULL NOSTD { int oaio_read(struct oaiocb *aiocbp); }
-319 AUE_NULL NOSTD { int oaio_write(struct oaiocb *aiocbp); }
-320 AUE_NULL NOSTD { int olio_listio(int mode, \
+317 AUE_NULL STD { int aio_error(struct aiocb *aiocbp); }
+318 AUE_NULL COMPAT6 { int aio_read(struct oaiocb *aiocbp); }
+319 AUE_NULL COMPAT6 { int aio_write(struct oaiocb *aiocbp); }
+320 AUE_NULL COMPAT6 { int lio_listio(int mode, \
struct oaiocb * const *acb_list, \
int nent, struct osigevent *sig); }
321 AUE_NULL STD { int yield(void); }
@@ -643,7 +643,7 @@
358 AUE_EXTATTR_DELETE_FILE STD { int extattr_delete_file(const char *path, \
int attrnamespace, \
const char *attrname); }
-359 AUE_NULL NOSTD { int aio_waitcomplete( \
+359 AUE_NULL STD { int aio_waitcomplete( \
struct aiocb **aiocbp, \
struct timespec *timeout); }
360 AUE_GETRESUID STD { int getresuid(uid_t *ruid, uid_t *euid, \
@@ -830,7 +830,7 @@
462 AUE_NULL NOSTD { int kmq_unlink(const char *path); }
463 AUE_NULL STD { int abort2(const char *why, int nargs, void **args); }
464 AUE_NULL STD { int thr_set_name(long id, const char *name); }
-465 AUE_NULL NOSTD { int aio_fsync(int op, struct aiocb *aiocbp); }
+465 AUE_NULL STD { int aio_fsync(int op, struct aiocb *aiocbp); }
466 AUE_RTPRIO STD { int rtprio_thread(int function, \
lwpid_t lwpid, struct rtprio *rtp); }
467 AUE_NULL UNIMPL nosys
@@ -977,7 +977,7 @@
__socklen_t * __restrict anamelen, \
int flags); }
542 AUE_PIPE STD { int pipe2(int *fildes, int flags); }
-543 AUE_NULL NOSTD { int aio_mlock(struct aiocb *aiocbp); }
+543 AUE_NULL STD { int aio_mlock(struct aiocb *aiocbp); }
544 AUE_NULL STD { int procctl(idtype_t idtype, id_t id, \
int com, void *data); }
545 AUE_POLL STD { int ppoll(struct pollfd *fds, u_int nfds, \
Index: sys/kern/systrace_args.c
===================================================================
--- sys/kern/systrace_args.c
+++ sys/kern/systrace_args.c
@@ -1605,30 +1605,6 @@
*n_args = 1;
break;
}
- /* oaio_read */
- case 318: {
- struct oaio_read_args *p = params;
- uarg[0] = (intptr_t) p->aiocbp; /* struct oaiocb * */
- *n_args = 1;
- break;
- }
- /* oaio_write */
- case 319: {
- struct oaio_write_args *p = params;
- uarg[0] = (intptr_t) p->aiocbp; /* struct oaiocb * */
- *n_args = 1;
- break;
- }
- /* olio_listio */
- case 320: {
- struct olio_listio_args *p = params;
- iarg[0] = p->mode; /* int */
- uarg[1] = (intptr_t) p->acb_list; /* struct oaiocb *const * */
- iarg[2] = p->nent; /* int */
- uarg[3] = (intptr_t) p->sig; /* struct osigevent * */
- *n_args = 4;
- break;
- }
/* yield */
case 321: {
*n_args = 0;
@@ -5899,45 +5875,6 @@
break;
};
break;
- /* oaio_read */
- case 318:
- switch(ndx) {
- case 0:
- p = "struct oaiocb *";
- break;
- default:
- break;
- };
- break;
- /* oaio_write */
- case 319:
- switch(ndx) {
- case 0:
- p = "struct oaiocb *";
- break;
- default:
- break;
- };
- break;
- /* olio_listio */
- case 320:
- switch(ndx) {
- case 0:
- p = "int";
- break;
- case 1:
- p = "struct oaiocb *const *";
- break;
- case 2:
- p = "int";
- break;
- case 3:
- p = "struct osigevent *";
- break;
- default:
- break;
- };
- break;
/* yield */
case 321:
break;
@@ -9876,21 +9813,6 @@
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* oaio_read */
- case 318:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
- /* oaio_write */
- case 319:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
- /* olio_listio */
- case 320:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
/* yield */
case 321:
/* mlockall */
Index: sys/kern/vfs_aio.c
===================================================================
--- sys/kern/vfs_aio.c
+++ sys/kern/vfs_aio.c
@@ -161,6 +161,7 @@
SYSCTL_INT(_vfs_aio, OID_AUTO, max_buf_aio, CTLFLAG_RW, &max_buf_aio, 0,
"Maximum buf aio requests per process (stored in the process)");
+#ifdef COMPAT_FREEBSD6
typedef struct oaiocb {
int aio_fildes; /* File descriptor */
off_t aio_offset; /* File offset for I/O */
@@ -171,6 +172,7 @@
int aio_reqprio; /* Request priority -- ignored */
struct __aiocb_private _aiocb_private;
} oaiocb_t;
+#endif
/*
* Below is a key of locks used to protect each member of struct kaiocb
@@ -368,52 +370,7 @@
NULL
};
-static struct syscall_helper_data aio_syscalls[] = {
- SYSCALL_INIT_HELPER(aio_cancel),
- SYSCALL_INIT_HELPER(aio_error),
- SYSCALL_INIT_HELPER(aio_fsync),
- SYSCALL_INIT_HELPER(aio_mlock),
- SYSCALL_INIT_HELPER(aio_read),
- SYSCALL_INIT_HELPER(aio_return),
- SYSCALL_INIT_HELPER(aio_suspend),
- SYSCALL_INIT_HELPER(aio_waitcomplete),
- SYSCALL_INIT_HELPER(aio_write),
- SYSCALL_INIT_HELPER(lio_listio),
- SYSCALL_INIT_HELPER(oaio_read),
- SYSCALL_INIT_HELPER(oaio_write),
- SYSCALL_INIT_HELPER(olio_listio),
- SYSCALL_INIT_LAST
-};
-
-#ifdef COMPAT_FREEBSD32
-#include <sys/mount.h>
-#include <sys/socket.h>
-#include <compat/freebsd32/freebsd32.h>
-#include <compat/freebsd32/freebsd32_proto.h>
-#include <compat/freebsd32/freebsd32_signal.h>
-#include <compat/freebsd32/freebsd32_syscall.h>
-#include <compat/freebsd32/freebsd32_util.h>
-
-static struct syscall_helper_data aio32_syscalls[] = {
- SYSCALL32_INIT_HELPER(freebsd32_aio_return),
- SYSCALL32_INIT_HELPER(freebsd32_aio_suspend),
- SYSCALL32_INIT_HELPER(freebsd32_aio_cancel),
- SYSCALL32_INIT_HELPER(freebsd32_aio_error),
- SYSCALL32_INIT_HELPER(freebsd32_aio_fsync),
- SYSCALL32_INIT_HELPER(freebsd32_aio_mlock),
- SYSCALL32_INIT_HELPER(freebsd32_aio_read),
- SYSCALL32_INIT_HELPER(freebsd32_aio_write),
- SYSCALL32_INIT_HELPER(freebsd32_aio_waitcomplete),
- SYSCALL32_INIT_HELPER(freebsd32_lio_listio),
- SYSCALL32_INIT_HELPER(freebsd32_oaio_read),
- SYSCALL32_INIT_HELPER(freebsd32_oaio_write),
- SYSCALL32_INIT_HELPER(freebsd32_olio_listio),
- SYSCALL_INIT_LAST
-};
-#endif
-
-DECLARE_MODULE(aio, aio_mod,
- SI_SUB_VFS, SI_ORDER_ANY);
+DECLARE_MODULE(aio, aio_mod, SI_SUB_VFS, SI_ORDER_ANY);
MODULE_VERSION(aio, 1);
/*
@@ -422,7 +379,6 @@
static int
aio_onceonly(void)
{
- int error;
exit_tag = EVENTHANDLER_REGISTER(process_exit, aio_proc_rundown, NULL,
EVENTHANDLER_PRI_ANY);
@@ -447,19 +403,11 @@
NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
aiod_lifetime = AIOD_LIFETIME_DEFAULT;
jobrefid = 1;
- async_io_version = _POSIX_VERSION;
+ p31b_setcfg(CTL_P1003_1B_ASYNCHRONOUS_IO, _POSIX_ASYNCHRONOUS_IO);
p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, AIO_LISTIO_MAX);
p31b_setcfg(CTL_P1003_1B_AIO_MAX, MAX_AIO_QUEUE);
p31b_setcfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, 0);
- error = syscall_helper_register(aio_syscalls, SY_THR_STATIC_KLD);
- if (error)
- return (error);
-#ifdef COMPAT_FREEBSD32
- error = syscall32_helper_register(aio32_syscalls, SY_THR_STATIC_KLD);
- if (error)
- return (error);
-#endif
return (0);
}
@@ -1340,6 +1288,7 @@
return (error);
}
+#ifdef COMPAT_FREEBSD6
static int
convert_old_sigevent(struct osigevent *osig, struct sigevent *nsig)
{
@@ -1379,6 +1328,7 @@
ojob = (struct oaiocb *)kjob;
return (convert_old_sigevent(&ojob->aio_sigevent, &kjob->aio_sigevent));
}
+#endif
static int
aiocb_copyin(struct aiocb *ujob, struct aiocb *kjob)
@@ -1439,6 +1389,7 @@
.store_aiocb = aiocb_store_aiocb,
};
+#ifdef COMPAT_FREEBSD6
static struct aiocb_ops aiocb_ops_osigevent = {
.copyin = aiocb_copyin_old_sigevent,
.fetch_status = aiocb_fetch_status,
@@ -1448,6 +1399,7 @@
.store_kernelinfo = aiocb_store_kernelinfo,
.store_aiocb = aiocb_store_aiocb,
};
+#endif
/*
* Queue a new AIO request. Choosing either the threaded or direct physio VCHR
@@ -2094,13 +2046,15 @@
}
/* syscall - asynchronous read from a file (REALTIME) */
+#ifdef COMPAT_FREEBSD6
int
-sys_oaio_read(struct thread *td, struct oaio_read_args *uap)
+freebsd6_aio_read(struct thread *td, struct freebsd6_aio_read_args *uap)
{
return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ,
&aiocb_ops_osigevent));
}
+#endif
int
sys_aio_read(struct thread *td, struct aio_read_args *uap)
@@ -2110,13 +2064,15 @@
}
/* syscall - asynchronous write to a file (REALTIME) */
+#ifdef COMPAT_FREEBSD6
int
-sys_oaio_write(struct thread *td, struct oaio_write_args *uap)
+freebsd6_aio_write(struct thread *td, struct freebsd6_aio_write_args *uap)
{
return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE,
&aiocb_ops_osigevent));
}
+#endif
int
sys_aio_write(struct thread *td, struct aio_write_args *uap)
@@ -2268,8 +2224,9 @@
}
/* syscall - list directed I/O (REALTIME) */
+#ifdef COMPAT_FREEBSD6
int
-sys_olio_listio(struct thread *td, struct olio_listio_args *uap)
+freebsd6_lio_listio(struct thread *td, struct freebsd6_lio_listio_args *uap)
{
struct aiocb **acb_list;
struct sigevent *sigp, sig;
@@ -2303,6 +2260,7 @@
free(acb_list, M_LIO);
return (error);
}
+#endif
/* syscall - list directed I/O (REALTIME) */
int
@@ -2582,6 +2540,13 @@
}
#ifdef COMPAT_FREEBSD32
+#include <sys/mount.h>
+#include <sys/socket.h>
+#include <compat/freebsd32/freebsd32.h>
+#include <compat/freebsd32/freebsd32_proto.h>
+#include <compat/freebsd32/freebsd32_signal.h>
+#include <compat/freebsd32/freebsd32_syscall.h>
+#include <compat/freebsd32/freebsd32_util.h>
struct __aiocb_private32 {
int32_t status;
@@ -2589,6 +2554,7 @@
uint32_t kernelinfo;
};
+#ifdef COMPAT_FREEBSD6
typedef struct oaiocb32 {
int aio_fildes; /* File descriptor */
uint64_t aio_offset __packed; /* File offset for I/O */
@@ -2599,6 +2565,7 @@
int aio_reqprio; /* Request priority -- ignored */
struct __aiocb_private32 _aiocb_private;
} oaiocb32_t;
+#endif
typedef struct aiocb32 {
int32_t aio_fildes; /* File descriptor */
@@ -2613,6 +2580,7 @@
struct sigevent32 aio_sigevent; /* Signal to deliver */
} aiocb32_t;
+#ifdef COMPAT_FREEBSD6
static int
convert_old_sigevent32(struct osigevent32 *osig, struct sigevent *nsig)
{
@@ -2662,6 +2630,7 @@
return (convert_old_sigevent32(&job32.aio_sigevent,
&kjob->aio_sigevent));
}
+#endif
static int
aiocb32_copyin(struct aiocb *ujob, struct aiocb *kjob)
@@ -2746,6 +2715,7 @@
.store_aiocb = aiocb32_store_aiocb,
};
+#ifdef COMPAT_FREEBSD6
static struct aiocb_ops aiocb32_ops_osigevent = {
.copyin = aiocb32_copyin_old_sigevent,
.fetch_status = aiocb32_fetch_status,
@@ -2755,6 +2725,7 @@
.store_kernelinfo = aiocb32_store_kernelinfo,
.store_aiocb = aiocb32_store_aiocb,
};
+#endif
int
freebsd32_aio_return(struct thread *td, struct freebsd32_aio_return_args *uap)
@@ -2800,26 +2771,22 @@
}
int
-freebsd32_aio_cancel(struct thread *td, struct freebsd32_aio_cancel_args *uap)
-{
-
- return (sys_aio_cancel(td, (struct aio_cancel_args *)uap));
-}
-
-int
freebsd32_aio_error(struct thread *td, struct freebsd32_aio_error_args *uap)
{
return (kern_aio_error(td, (struct aiocb *)uap->aiocbp, &aiocb32_ops));
}
+#ifdef COMPAT_FREEBSD6
int
-freebsd32_oaio_read(struct thread *td, struct freebsd32_oaio_read_args *uap)
+freebsd6_freebsd32_aio_read(struct thread *td,
+ struct freebsd6_freebsd32_aio_read_args *uap)
{
return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ,
&aiocb32_ops_osigevent));
}
+#endif
int
freebsd32_aio_read(struct thread *td, struct freebsd32_aio_read_args *uap)
@@ -2829,13 +2796,16 @@
&aiocb32_ops));
}
+#ifdef COMPAT_FREEBSD6
int
-freebsd32_oaio_write(struct thread *td, struct freebsd32_oaio_write_args *uap)
+freebsd6_freebsd32_aio_write(struct thread *td,
+ struct freebsd6_freebsd32_aio_write_args *uap)
{
return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE,
&aiocb32_ops_osigevent));
}
+#endif
int
freebsd32_aio_write(struct thread *td, struct freebsd32_aio_write_args *uap)
@@ -2884,8 +2854,10 @@
&aiocb32_ops));
}
+#ifdef COMPAT_FREEBSD6
int
-freebsd32_olio_listio(struct thread *td, struct freebsd32_olio_listio_args *uap)
+freebsd6_freebsd32_lio_listio(struct thread *td,
+ struct freebsd6_freebsd32_lio_listio_args *uap)
{
struct aiocb **acb_list;
struct sigevent *sigp, sig;
@@ -2928,6 +2900,7 @@
free(acb_list, M_LIO);
return (error);
}
+#endif
int
freebsd32_lio_listio(struct thread *td, struct freebsd32_lio_listio_args *uap)
Index: sys/kern/vfs_default.c
===================================================================
--- sys/kern/vfs_default.c
+++ sys/kern/vfs_default.c
@@ -472,6 +472,9 @@
{
switch (ap->a_name) {
+ case _PC_ASYNC_IO:
+ *ap->a_retval = _POSIX_ASYNCHRONOUS_IO;
+ return (0);
case _PC_NAME_MAX:
*ap->a_retval = NAME_MAX;
return (0);
Index: sys/kern/vfs_syscalls.c
===================================================================
--- sys/kern/vfs_syscalls.c
+++ sys/kern/vfs_syscalls.c
@@ -106,14 +106,6 @@
struct thread *td);
/*
- * The module initialization routine for POSIX asynchronous I/O will
- * set this to the version of AIO that it implements. (Zero means
- * that it is not implemented.) This value is used here by pathconf()
- * and in kern_descrip.c by fpathconf().
- */
-int async_io_version;
-
-/*
* Sync each mounted filesystem.
*/
#ifndef _SYS_SYSPROTO_H_
@@ -2347,11 +2339,7 @@
return (error);
NDFREE(&nd, NDF_ONLY_PNBUF);
- /* If asynchronous I/O is available, it works for all files. */
- if (name == _PC_ASYNC_IO)
- td->td_retval[0] = async_io_version;
- else
- error = VOP_PATHCONF(nd.ni_vp, name, td->td_retval);
+ error = VOP_PATHCONF(nd.ni_vp, name, td->td_retval);
vput(nd.ni_vp);
return (error);
}
Index: sys/sys/signalvar.h
===================================================================
--- sys/sys/signalvar.h
+++ sys/sys/signalvar.h
@@ -199,6 +199,7 @@
return (1);
}
+#ifdef COMPAT_FREEBSD6
struct osigevent {
int sigev_notify; /* Notification type */
union {
@@ -207,6 +208,7 @@
} __sigev_u;
union sigval sigev_value; /* Signal value */
};
+#endif
typedef struct ksiginfo {
TAILQ_ENTRY(ksiginfo) ksi_link;
Index: sys/sys/syscall.h
===================================================================
--- sys/sys/syscall.h
+++ sys/sys/syscall.h
@@ -260,9 +260,9 @@
#define SYS_aio_suspend 315
#define SYS_aio_cancel 316
#define SYS_aio_error 317
-#define SYS_oaio_read 318
-#define SYS_oaio_write 319
-#define SYS_olio_listio 320
+#define SYS_freebsd6_aio_read 318
+#define SYS_freebsd6_aio_write 319
+#define SYS_freebsd6_lio_listio 320
#define SYS_yield 321
/* 322 is obsolete thr_sleep */
/* 323 is obsolete thr_wakeup */
Index: sys/sys/syscall.mk
===================================================================
--- sys/sys/syscall.mk
+++ sys/sys/syscall.mk
@@ -211,9 +211,9 @@
aio_suspend.o \
aio_cancel.o \
aio_error.o \
- oaio_read.o \
- oaio_write.o \
- olio_listio.o \
+ freebsd6_aio_read.o \
+ freebsd6_aio_write.o \
+ freebsd6_lio_listio.o \
yield.o \
mlockall.o \
munlockall.o \
Index: sys/sys/sysproto.h
===================================================================
--- sys/sys/sysproto.h
+++ sys/sys/sysproto.h
@@ -844,18 +844,6 @@
struct aio_error_args {
char aiocbp_l_[PADL_(struct aiocb *)]; struct aiocb * aiocbp; char aiocbp_r_[PADR_(struct aiocb *)];
};
-struct oaio_read_args {
- char aiocbp_l_[PADL_(struct oaiocb *)]; struct oaiocb * aiocbp; char aiocbp_r_[PADR_(struct oaiocb *)];
-};
-struct oaio_write_args {
- char aiocbp_l_[PADL_(struct oaiocb *)]; struct oaiocb * aiocbp; char aiocbp_r_[PADR_(struct oaiocb *)];
-};
-struct olio_listio_args {
- char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
- char acb_list_l_[PADL_(struct oaiocb *const *)]; struct oaiocb *const * acb_list; char acb_list_r_[PADR_(struct oaiocb *const *)];
- char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
- char sig_l_[PADL_(struct osigevent *)]; struct osigevent * sig; char sig_r_[PADR_(struct osigevent *)];
-};
struct yield_args {
register_t dummy;
};
@@ -1989,9 +1977,6 @@
int sys_aio_suspend(struct thread *, struct aio_suspend_args *);
int sys_aio_cancel(struct thread *, struct aio_cancel_args *);
int sys_aio_error(struct thread *, struct aio_error_args *);
-int sys_oaio_read(struct thread *, struct oaio_read_args *);
-int sys_oaio_write(struct thread *, struct oaio_write_args *);
-int sys_olio_listio(struct thread *, struct olio_listio_args *);
int sys_yield(struct thread *, struct yield_args *);
int sys_mlockall(struct thread *, struct mlockall_args *);
int sys_munlockall(struct thread *, struct munlockall_args *);
@@ -2465,12 +2450,27 @@
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
char length_l_[PADL_(off_t)]; off_t length; char length_r_[PADR_(off_t)];
};
+struct freebsd6_aio_read_args {
+ char aiocbp_l_[PADL_(struct oaiocb *)]; struct oaiocb * aiocbp; char aiocbp_r_[PADR_(struct oaiocb *)];
+};
+struct freebsd6_aio_write_args {
+ char aiocbp_l_[PADL_(struct oaiocb *)]; struct oaiocb * aiocbp; char aiocbp_r_[PADR_(struct oaiocb *)];
+};
+struct freebsd6_lio_listio_args {
+ char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
+ char acb_list_l_[PADL_(struct oaiocb *const *)]; struct oaiocb *const * acb_list; char acb_list_r_[PADR_(struct oaiocb *const *)];
+ char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
+ char sig_l_[PADL_(struct osigevent *)]; struct osigevent * sig; char sig_r_[PADR_(struct osigevent *)];
+};
int freebsd6_pread(struct thread *, struct freebsd6_pread_args *);
int freebsd6_pwrite(struct thread *, struct freebsd6_pwrite_args *);
int freebsd6_mmap(struct thread *, struct freebsd6_mmap_args *);
int freebsd6_lseek(struct thread *, struct freebsd6_lseek_args *);
int freebsd6_truncate(struct thread *, struct freebsd6_truncate_args *);
int freebsd6_ftruncate(struct thread *, struct freebsd6_ftruncate_args *);
+int freebsd6_aio_read(struct thread *, struct freebsd6_aio_read_args *);
+int freebsd6_aio_write(struct thread *, struct freebsd6_aio_write_args *);
+int freebsd6_lio_listio(struct thread *, struct freebsd6_lio_listio_args *);
#endif /* COMPAT_FREEBSD6 */
@@ -2741,9 +2741,9 @@
#define SYS_AUE_aio_suspend AUE_NULL
#define SYS_AUE_aio_cancel AUE_NULL
#define SYS_AUE_aio_error AUE_NULL
-#define SYS_AUE_oaio_read AUE_NULL
-#define SYS_AUE_oaio_write AUE_NULL
-#define SYS_AUE_olio_listio AUE_NULL
+#define SYS_AUE_freebsd6_aio_read AUE_NULL
+#define SYS_AUE_freebsd6_aio_write AUE_NULL
+#define SYS_AUE_freebsd6_lio_listio AUE_NULL
#define SYS_AUE_yield AUE_NULL
#define SYS_AUE_mlockall AUE_MLOCKALL
#define SYS_AUE_munlockall AUE_MUNLOCKALL
Index: sys/sys/unistd.h
===================================================================
--- sys/sys/unistd.h
+++ sys/sys/unistd.h
@@ -50,7 +50,7 @@
* returns -1, the functions may be stubbed out.
*/
#define _POSIX_ADVISORY_INFO 200112L
-#define _POSIX_ASYNCHRONOUS_IO 0
+#define _POSIX_ASYNCHRONOUS_IO 200112L
#define _POSIX_CHOWN_RESTRICTED 1
#define _POSIX_CLOCK_SELECTION (-1)
#define _POSIX_CPUTIME 200112L
Index: sys/sys/vnode.h
===================================================================
--- sys/sys/vnode.h
+++ sys/sys/vnode.h
@@ -422,7 +422,6 @@
*/
extern struct vnode *rootvnode; /* root (i.e. "/") vnode */
extern struct mount *rootdevmp; /* "/dev" mount */
-extern int async_io_version; /* 0 or POSIX version of AIO i'face */
extern int desiredvnodes; /* number of vnodes desired */
extern struct uma_zone *namei_zone;
extern struct vattr va_null; /* predefined null vattr structure */

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 16, 6:53 AM (23 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41765585
Default Alt Text
D5589.1794811982.diff (49 KB)

Event Timeline