Changeset 45ae4a8 in rtems


Ignore:
Timestamp:
Jan 9, 2017, 1:53:26 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
2e6d9865
Parents:
a7cfb4b
Message:

sys/event.h: Update to FreeBSD head 2017-01-02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/sys/event.h

    ra7cfb4b r45ae4a8  
    2424 * SUCH DAMAGE.
    2525 *
    26  * $FreeBSD: head/sys/sys/event.h 302242 2016-06-27 23:34:53Z kib $
     26 * $FreeBSD: head/sys/sys/event.h 311055 2017-01-02 09:02:39Z kib $
    2727 */
    2828
     
    203203
    204204/*
    205  * Setting the KN_INFLUX flag enables you to unlock the kq that this knote
    206  * is on, and modify kn_status as if you had the KQ lock.
     205 * An in-flux knote cannot be dropped from its kq while the kq is
     206 * unlocked.  If the KN_SCAN flag is not set, a thread can only set
     207 * kn_influx when it is exclusive owner of the knote state, and can
     208 * modify kn_status as if it had the KQ lock.  KN_SCAN must not be set
     209 * on a knote which is already in flux.
    207210 *
    208211 * kn_sfflags, kn_sdata, and kn_kevent are protected by the knlist lock.
     
    215218        struct                  kqueue *kn_kq;  /* which queue we are on */
    216219        struct                  kevent kn_kevent;
     220        void                    *kn_hook;
     221        int                     kn_hookid;
    217222        int                     kn_status;      /* protected by kq lock */
    218223#define KN_ACTIVE       0x01                    /* event has been triggered */
     
    220225#define KN_DISABLED     0x04                    /* event is disabled */
    221226#define KN_DETACHED     0x08                    /* knote is detached */
    222 #define KN_INFLUX       0x10                    /* knote is in flux */
    223227#define KN_MARKER       0x20                    /* ignore this knote */
    224228#define KN_KQUEUE       0x40                    /* this knote belongs to a kq */
    225229#define KN_HASKQLOCK    0x80                    /* for _inevent */
    226230#define KN_SCAN         0x100                   /* flux set in kqueue_scan() */
     231        int                     kn_influx;
    227232        int                     kn_sfflags;     /* saved filter flags */
    228233        intptr_t                kn_sdata;       /* saved data field */
     
    232237                struct          kaiocb *p_aio;  /* AIO job pointer */
    233238                struct          aioliojob *p_lio;       /* LIO job pointer */
    234                 sbintime_t      *p_nexttime;    /* next timer event fires at */
    235239                void            *p_v;           /* generic other pointer */
    236240        } kn_ptr;
    237241        struct                  filterops *kn_fop;
    238         void                    *kn_hook;
    239         int                     kn_hookid;
    240242
    241243#define kn_id           kn_kevent.ident
     
    258260struct rwlock;
    259261
    260 extern void     knote(struct knlist *list, long hint, int lockflags);
    261 extern void     knote_fork(struct knlist *list, int pid);
    262 extern struct knlist *knlist_alloc(struct mtx *lock);
    263 extern void     knlist_detach(struct knlist *knl);
    264 extern void     knlist_add(struct knlist *knl, struct knote *kn, int islocked);
    265 extern void     knlist_remove(struct knlist *knl, struct knote *kn, int islocked);
    266 extern int      knlist_empty(struct knlist *knl);
    267 extern void     knlist_init(struct knlist *knl, void *lock,
    268     void (*kl_lock)(void *), void (*kl_unlock)(void *),
    269     void (*kl_assert_locked)(void *), void (*kl_assert_unlocked)(void *));
    270 extern void     knlist_init_mtx(struct knlist *knl, struct mtx *lock);
    271 extern void     knlist_init_rw_reader(struct knlist *knl, struct rwlock *lock);
    272 extern void     knlist_destroy(struct knlist *knl);
    273 extern void     knlist_cleardel(struct knlist *knl, struct thread *td,
    274         int islocked, int killkn);
     262void    knote(struct knlist *list, long hint, int lockflags);
     263void    knote_fork(struct knlist *list, int pid);
     264struct knlist *knlist_alloc(struct mtx *lock);
     265void    knlist_detach(struct knlist *knl);
     266void    knlist_add(struct knlist *knl, struct knote *kn, int islocked);
     267void    knlist_remove(struct knlist *knl, struct knote *kn, int islocked);
     268int     knlist_empty(struct knlist *knl);
     269void    knlist_init(struct knlist *knl, void *lock, void (*kl_lock)(void *),
     270            void (*kl_unlock)(void *), void (*kl_assert_locked)(void *),
     271            void (*kl_assert_unlocked)(void *));
     272void    knlist_init_mtx(struct knlist *knl, struct mtx *lock);
     273void    knlist_init_rw_reader(struct knlist *knl, struct rwlock *lock);
     274void    knlist_destroy(struct knlist *knl);
     275void    knlist_cleardel(struct knlist *knl, struct thread *td,
     276            int islocked, int killkn);
    275277#define knlist_clear(knl, islocked)                             \
    276                 knlist_cleardel((knl), NULL, (islocked), 0)
     278        knlist_cleardel((knl), NULL, (islocked), 0)
    277279#define knlist_delete(knl, td, islocked)                        \
    278                 knlist_cleardel((knl), (td), (islocked), 1)
    279 extern void     knote_fdclose(struct thread *p, int fd);
    280 extern int      kqfd_register(int fd, struct kevent *kev, struct thread *p,
    281                     int waitok);
    282 extern int      kqueue_add_filteropts(int filt, struct filterops *filtops);
    283 extern int      kqueue_del_filteropts(int filt);
     280        knlist_cleardel((knl), (td), (islocked), 1)
     281void    knote_fdclose(struct thread *p, int fd);
     282int     kqfd_register(int fd, struct kevent *kev, struct thread *p,
     283            int waitok);
     284int     kqueue_add_filteropts(int filt, struct filterops *filtops);
     285int     kqueue_del_filteropts(int filt);
    284286
    285287#else   /* !_KERNEL */
Note: See TracChangeset for help on using the changeset viewer.