diff options
Diffstat (limited to 'libpager/queue.h')
-rw-r--r-- | libpager/queue.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpager/queue.h b/libpager/queue.h index d3cf738e..abcd3b98 100644 --- a/libpager/queue.h +++ b/libpager/queue.h @@ -19,6 +19,8 @@ You should have received a copy of the GNU General Public License along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */ +#include <stdbool.h> + /* A FIFO queue with constant-time enqueue and dequeue operations. */ struct item { struct item *next; @@ -59,3 +61,9 @@ queue_dequeue (struct queue *q) r->next = NULL; return r; } + +static inline bool +queue_empty (struct queue *q) +{ + return q->head == NULL; +} |