added functions for traversing sem_queues