kern_event.c (9c00bb9190391479885cfb14ed23fb7003d10109) kern_event.c (6aba400a7055ed2427c6aa297774fb91f5d8db79)
1/*-
2 * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
3 * Copyright 2004 John-Mark Gurney <jmg@FreeBSD.org>
4 * Copyright (c) 2009 Apple, Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 1690 unchanged lines hidden (view full) ---

1699 }
1700
1701 KQ_UNLOCK(kq);
1702
1703 FILEDESC_XLOCK(fdp);
1704 SLIST_REMOVE(&fdp->fd_kqlist, kq, kqueue, kq_list);
1705 FILEDESC_XUNLOCK(fdp);
1706
1/*-
2 * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
3 * Copyright 2004 John-Mark Gurney <jmg@FreeBSD.org>
4 * Copyright (c) 2009 Apple, Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 1690 unchanged lines hidden (view full) ---

1699 }
1700
1701 KQ_UNLOCK(kq);
1702
1703 FILEDESC_XLOCK(fdp);
1704 SLIST_REMOVE(&fdp->fd_kqlist, kq, kqueue, kq_list);
1705 FILEDESC_XUNLOCK(fdp);
1706
1707 seldrain(&kq->kq_sel);
1707 knlist_destroy(&kq->kq_sel.si_note);
1708 mtx_destroy(&kq->kq_lock);
1709 kq->kq_fdp = NULL;
1710
1711 if (kq->kq_knhash != NULL)
1712 free(kq->kq_knhash, M_KQUEUE);
1713 if (kq->kq_knlist != NULL)
1714 free(kq->kq_knlist, M_KQUEUE);

--- 486 unchanged lines hidden ---
1708 knlist_destroy(&kq->kq_sel.si_note);
1709 mtx_destroy(&kq->kq_lock);
1710 kq->kq_fdp = NULL;
1711
1712 if (kq->kq_knhash != NULL)
1713 free(kq->kq_knhash, M_KQUEUE);
1714 if (kq->kq_knlist != NULL)
1715 free(kq->kq_knlist, M_KQUEUE);

--- 486 unchanged lines hidden ---