ADC Home > Reference Library > Technical Q&As > Legacy Documents > Hardware & Drivers >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

DriverServicesLib Queue Routines

Q: I've noticed that when I use the DriverServicesLib queue routines (for example, PBEnqueue), the qTail field of the QHdr is always nil. Is this expected? Are there other differences between the DriverServicesLib queue routines and those provided in "OSUtils.h"?

A: Other than initializing it to zero, the DriverServicesLib queue routines never use the qTail field of the QHdr, so yes, that is expected. Furthermore, it means that you can't mix and match queue routines on the same queue. When you create a queue, you should choose which set of routines you intend to use, and use those routines on that queue exclusively.

The most obvious differences between the DriverServicesLib queue routines and the "OSUtils.h" queue routines is that DriverServicesLib provides a larger set of routines. For example, you can use PBEnqueue and PBEnqueueLast to place an element at either the beginning or the end of a queue.

In addition, the DriverServicesLib queue routines are implemented in PowerPC code and have been optimized to avoid Mixed Mode switches in some cases.


Mixed Mode Switches?




adding to a non-empty queue


dequeuing elements other than the first





The implementation of these queue routines (and their relative performance) is subject to change.

[Jan 18 2000]

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.