Allocates and returns a new *queuePair with its internal queues allocated.
(size uint32)
| 75 | |
| 76 | // Allocates and returns a new *queuePair with its internal queues allocated. |
| 77 | func newQueuePair(size uint32) *queuePair { |
| 78 | qp := &queuePair{} |
| 79 | qp.q0 = unsafe.Pointer(newQueue(size)) |
| 80 | qp.q1 = unsafe.Pointer(newQueue(size)) |
| 81 | qp.q = qp.q0 |
| 82 | return qp |
| 83 | } |
| 84 | |
| 85 | // Switches the current queue for future Pushes to proceed to the other queue |
| 86 | // so that there's no blocking in Push. Returns a pointer to the old queue that |
no test coverage detected