You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: work.go
    path of file: ./repos/gdlv/vendor/golang.org/x/mobile/gl
    
    the code of the file until where you have to start completion: // Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build darwin linux openbsd

package gl

/*
#cgo ios          LDFLAGS: -framework OpenGLES
#cgo darwin,!ios  LDFLAGS: -framework OpenGL
#cgo linux        LDFLAGS: -lGLESv2
#cgo openbsd      LDFLAGS: -L/usr/X11R6/lib/ -lGLESv2

#cgo android      CFLAGS: -Dos_android
#cgo ios          CFLAGS: -Dos_ios
#cgo darwin,!ios  CFLAGS: -Dos_macos
#cgo darwin       CFLAGS: -DGL_SILENCE_DEPRECATION
#cgo linux        CFLAGS: -Dos_linux
#cgo openbsd      CFLAGS: -Dos_openbsd

#cgo openbsd      CFLAGS: -I/usr/X11R6/include/

#include <std
    
func (ctx *context) DoWork() {
	queue := make([]call, 0, workbufLen)
	for {
		// Wait until at least one piece of work is ready.
		// Accumulate work until a piece is marked as blocking.
		select {
		case w := <-ctx.work:
			queue = append(queue, w)
		default:
			return
		}
		blocking := queue[len(queue)-1].blocking
	enqueue:
		for len(queue) < cap(queue) && !blocking {
			select {
			case w := <-ctx.work:
				queue = append(queue, w)
				blocking = queue[len(queue)-1].blocking
			default:
				break enqueue
			}
		}

		// Process the queued GL functions.
		for i, q := range queue {
			ctx.cargs[i] = *(*C.struct_fnargs)(unsafe.Pointer(&q.args))
			ctx.parg[i] = (*C.char)(q.parg)
		}
		ret := C.process(&ctx.cargs[0], ctx.parg[0], ctx.parg[1], ctx.parg[2], C.int(len(queue)))

		// Cleanup and signal.
		queue = queue[:0]
		if blocking {
			ctx.retvalue <- ret
		}
	}
}