Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Aug 1998 12:35:59 -0700 (PDT)
From:      "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To:        freebsd-hardware@FreeBSD.ORG
Subject:   new gpib driver and select/poll issues
Message-ID:  <199808281935.MAA13843@troutmask.apl.washington.edu>

next in thread | raw e-mail | index | archive | help
Ladies and Gents,

John Galbraith has been writing a new GPIB driver.  His effort
appears to be targeted at a 2.2.x system.

I'm trying to make his stuff work under -current, and I have
run into a problem with the use of poll versus select in -current.
In particular, the changes in revision 1.34 of sys/sys/conf.h
have eliminated d_select_t and noselect which John uses.  The
d_select_t can be replaced by d_poll_t, but does one do about
the noselect.

This snippet is the part of the code in question.

/* device switch entry table */
struct cdevsw gp_cdevsw = {
    (d_open_t *)      gp_open, /* open */
    (d_close_t *)     gp_close, /* close */
    (d_read_t *)      gp_read, /* read */
    (d_write_t *)     gp_write, /* write */
    (d_ioctl_t *)     gp_ioctl, /* ioctl */
    (d_stop_t *)      nullstop,  /* stop */
    (d_reset_t *)     nullreset, /* reset (not used) */
    (d_devtotty_t *)  nodevtotty,/* ttys */
    (d_select_t *)    noselect,  /* select */
    (d_mmap_t *)      nommap,    /* mmap */
    (d_strategy_t *)  nostrategy,/* strategy */
    (char*)           "gp",     /* name */
    NULL,                        /* struct bdevsw* */
    -1 /*     GP_CDEV_MAJOR   */             /* major number of driver */
};


Is this the proper way to support both -current and 2.2.x?


#ifdef __FreeBSD__ >= 3
(d_poll_t *) nopoll,
#else
(d_select_t *) noselect;
#endif


-- 
Steve

finger kargl@troutmask.apl.washington.edu
http://troutmask.apl.washington.edu/~clesceri/kargl.html

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hardware" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808281935.MAA13843>