Make async I/O on a socket work.

Although the current Sybase license does not permit running under
emulation, FreeBSD 3.0 is now "Sybase Ready" should the license change.
This commit is contained in:
John Fieber 1998-10-05 16:37:36 +00:00
parent 5dd99c3bce
commit 98fd9ce8c9
6 changed files with 28 additions and 24 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux.h,v 1.21 1998/08/31 06:55:02 jkh Exp $
* $Id: linux.h,v 1.22 1998/09/30 01:42:53 jfieber Exp $
*/
#ifndef _I386_LINUX_LINUX_H_
@ -124,7 +124,7 @@ struct trapframe;
#define LINUX_SIGTRAP 5
#define LINUX_SIGABRT 6
#define LINUX_SIGIOT 6
#define LINUX_SIGUNUSED 7
#define LINUX_SIGBUS 7
#define LINUX_SIGFPE 8
#define LINUX_SIGKILL 9
#define LINUX_SIGUSR1 10
@ -140,17 +140,16 @@ struct trapframe;
#define LINUX_SIGTSTP 20
#define LINUX_SIGTTIN 21
#define LINUX_SIGTTOU 22
#define LINUX_SIGIO 23
#define LINUX_SIGPOLL LINUX_SIGIO
#define LINUX_SIGURG LINUX_SIGIO
#define LINUX_SIGURG 23
#define LINUX_SIGXCPU 24
#define LINUX_SIGXFSZ 25
#define LINUX_SIGVTALRM 26
#define LINUX_SIGPROF 27
#define LINUX_SIGWINCH 28
#define LINUX_SIGLOST 29
#define LINUX_SIGIO 29
#define LINUX_SIGPOLL LINUX_SIGIO
#define LINUX_SIGPWR 30
#define LINUX_SIGBUS LINUX_SIGUNUSED
#define LINUX_SIGUNUSED 31
#define LINUX_NSIG 32
/* sigaction flags */

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_sysvec.c,v 1.33 1998/09/14 05:36:48 jdp Exp $
* $Id: linux_sysvec.c,v 1.34 1998/09/17 22:08:29 msmith Exp $
*/
/* XXX we use functions that might not exist. */
@ -93,10 +93,10 @@ int bsd_to_linux_signal[NSIG] = {
};
int linux_to_bsd_signal[LINUX_NSIG] = {
0, SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGEMT,
0, SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGBUS,
SIGFPE, SIGKILL, SIGUSR1, SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM, SIGTERM,
SIGBUS, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGIO,
SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, SIGURG, SIGURG, 0
SIGBUS, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG,
SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, SIGIO, SIGURG, 0
};
/*

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_file.c,v 1.20 1998/03/29 07:59:09 peter Exp $
* $Id: linux_file.c,v 1.21 1998/07/29 16:43:00 bde Exp $
*/
#include "opt_compat.h"
@ -240,12 +240,14 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
if (result & O_NDELAY) p->p_retval[0] |= LINUX_O_NONBLOCK;
if (result & O_APPEND) p->p_retval[0] |= LINUX_O_APPEND;
if (result & O_FSYNC) p->p_retval[0] |= LINUX_O_SYNC;
if (result & O_ASYNC) p->p_retval[0] |= LINUX_FASYNC;
return error;
case LINUX_F_SETFL:
if (args->arg & LINUX_O_NDELAY) fcntl_args.arg |= O_NONBLOCK;
if (args->arg & LINUX_O_APPEND) fcntl_args.arg |= O_APPEND;
if (args->arg & LINUX_O_SYNC) fcntl_args.arg |= O_FSYNC;
if (args->arg & LINUX_FASYNC) fcntl_args.arg |= O_ASYNC;
fcntl_args.cmd = F_SETFL;
return fcntl(p, &fcntl_args);
@ -294,6 +296,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
return EBADF;
if (fp->f_type == DTYPE_SOCKET) {
fcntl_args.cmd = args->cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN;
fcntl_args.arg = args->arg;
return fcntl(p, &fcntl_args);
}
vp = (struct vnode *)fp->f_data;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux.h,v 1.21 1998/08/31 06:55:02 jkh Exp $
* $Id: linux.h,v 1.22 1998/09/30 01:42:53 jfieber Exp $
*/
#ifndef _I386_LINUX_LINUX_H_
@ -124,7 +124,7 @@ struct trapframe;
#define LINUX_SIGTRAP 5
#define LINUX_SIGABRT 6
#define LINUX_SIGIOT 6
#define LINUX_SIGUNUSED 7
#define LINUX_SIGBUS 7
#define LINUX_SIGFPE 8
#define LINUX_SIGKILL 9
#define LINUX_SIGUSR1 10
@ -140,17 +140,16 @@ struct trapframe;
#define LINUX_SIGTSTP 20
#define LINUX_SIGTTIN 21
#define LINUX_SIGTTOU 22
#define LINUX_SIGIO 23
#define LINUX_SIGPOLL LINUX_SIGIO
#define LINUX_SIGURG LINUX_SIGIO
#define LINUX_SIGURG 23
#define LINUX_SIGXCPU 24
#define LINUX_SIGXFSZ 25
#define LINUX_SIGVTALRM 26
#define LINUX_SIGPROF 27
#define LINUX_SIGWINCH 28
#define LINUX_SIGLOST 29
#define LINUX_SIGIO 29
#define LINUX_SIGPOLL LINUX_SIGIO
#define LINUX_SIGPWR 30
#define LINUX_SIGBUS LINUX_SIGUNUSED
#define LINUX_SIGUNUSED 31
#define LINUX_NSIG 32
/* sigaction flags */

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_file.c,v 1.20 1998/03/29 07:59:09 peter Exp $
* $Id: linux_file.c,v 1.21 1998/07/29 16:43:00 bde Exp $
*/
#include "opt_compat.h"
@ -240,12 +240,14 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
if (result & O_NDELAY) p->p_retval[0] |= LINUX_O_NONBLOCK;
if (result & O_APPEND) p->p_retval[0] |= LINUX_O_APPEND;
if (result & O_FSYNC) p->p_retval[0] |= LINUX_O_SYNC;
if (result & O_ASYNC) p->p_retval[0] |= LINUX_FASYNC;
return error;
case LINUX_F_SETFL:
if (args->arg & LINUX_O_NDELAY) fcntl_args.arg |= O_NONBLOCK;
if (args->arg & LINUX_O_APPEND) fcntl_args.arg |= O_APPEND;
if (args->arg & LINUX_O_SYNC) fcntl_args.arg |= O_FSYNC;
if (args->arg & LINUX_FASYNC) fcntl_args.arg |= O_ASYNC;
fcntl_args.cmd = F_SETFL;
return fcntl(p, &fcntl_args);
@ -294,6 +296,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
return EBADF;
if (fp->f_type == DTYPE_SOCKET) {
fcntl_args.cmd = args->cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN;
fcntl_args.arg = args->arg;
return fcntl(p, &fcntl_args);
}
vp = (struct vnode *)fp->f_data;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_sysvec.c,v 1.33 1998/09/14 05:36:48 jdp Exp $
* $Id: linux_sysvec.c,v 1.34 1998/09/17 22:08:29 msmith Exp $
*/
/* XXX we use functions that might not exist. */
@ -93,10 +93,10 @@ int bsd_to_linux_signal[NSIG] = {
};
int linux_to_bsd_signal[LINUX_NSIG] = {
0, SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGEMT,
0, SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGBUS,
SIGFPE, SIGKILL, SIGUSR1, SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM, SIGTERM,
SIGBUS, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGIO,
SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, SIGURG, SIGURG, 0
SIGBUS, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG,
SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, SIGIO, SIGURG, 0
};
/*