func prepareFreeWorkbufs() {
	lock(&work.wbufSpans.lock)
	if work.full != 0 {
		throw("cannot free workbufs when work.full != 0")
	}
	// Since all workbufs are on the empty list, we don't care
	// which ones are in which spans. We can wipe the entire empty
	// list and move all workbuf spans to the free list.
	work.empty = 0
	work.wbufSpans.free.takeAll(&work.wbufSpans.busy)
	unlock(&work.wbufSpans.lock)
}
// prepareFreeWorkbufs moves busy workbuf spans to free list so they
// can be freed to the heap. This must only be called when all
// workbufs are on the empty list.
prepareFreeWorkbufs moves busy workbuf spans to free list so they
can be freed to the heap. This must only be called when all
workbufs are on the empty list.
// prepareFreeWorkbufs moves busy workbuf spans to free list so they // can be freed to the heap . This must only be called when all // workbufs are on the empty list .
func prepareFreeWorkbufs() {
	lock(&work.wbufSpans.lock)
	if work.full != 0 {
		throw("cannot free workbufs when work.full != 0")
	}
	work.empty = 0
	work.wbufSpans.free.takeAll(&work.wbufSpans.busy)
	unlock(&work.wbufSpans.lock)
}
func prepareFreeWorkbufs ( ) { lock ( & work . wbufSpans . lock ) if work . full != 0 { throw ( " " ) } work . empty = 0 work . wbufSpans . free . takeAll ( & work . wbufSpans . busy ) unlock ( & work . wbufSpans . lock ) }
prepareFreeWorkbufs moves busy workbuf spans to free list so they
can be freed to the heap.
prepareFreeWorkbufs moves busy workbuf spans to free list so they can be freed to the heap .
// Since all workbufs are on the empty list, we don't care // which ones are in which spans. We can wipe the entire empty // list and move all workbuf spans to the free list.