uipc_mqueue.c (9c00bb9190391479885cfb14ed23fb7003d10109) uipc_mqueue.c (6aba400a7055ed2427c6aa297774fb91f5d8db79)
1/*-
2 * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

1557 struct mqueue_msg *msg;
1558
1559 while ((msg = TAILQ_FIRST(&mq->mq_msgq)) != NULL) {
1560 TAILQ_REMOVE(&mq->mq_msgq, msg, msg_link);
1561 free(msg, M_MQUEUEDATA);
1562 }
1563
1564 mtx_destroy(&mq->mq_mutex);
1/*-
2 * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

1557 struct mqueue_msg *msg;
1558
1559 while ((msg = TAILQ_FIRST(&mq->mq_msgq)) != NULL) {
1560 TAILQ_REMOVE(&mq->mq_msgq, msg, msg_link);
1561 free(msg, M_MQUEUEDATA);
1562 }
1563
1564 mtx_destroy(&mq->mq_mutex);
1565 seldrain(&mq->mq_rsel);
1566 seldrain(&mq->mq_wsel);
1565 knlist_destroy(&mq->mq_rsel.si_note);
1566 knlist_destroy(&mq->mq_wsel.si_note);
1567 uma_zfree(mqueue_zone, mq);
1568 atomic_add_int(&curmq, -1);
1569}
1570
1571/*
1572 * Load a message from user space

--- 1262 unchanged lines hidden ---
1567 knlist_destroy(&mq->mq_rsel.si_note);
1568 knlist_destroy(&mq->mq_wsel.si_note);
1569 uma_zfree(mqueue_zone, mq);
1570 atomic_add_int(&curmq, -1);
1571}
1572
1573/*
1574 * Load a message from user space

--- 1262 unchanged lines hidden ---