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: shm_solaris.go
    path of file: ./repos/sliver/vendor/github.com/gen2brain/shm
    
    the code of the file until where you have to start completion: // +build solaris

package shm

// #include <sys/ipc.h>
// #include <sys/shm.h>
// #include <errno.h>
import "C"

import (
	"unsafe"
)

// Perm is used to pass permission information to IPC operations.
type Perm struct {
	// Owner's user ID.
	Uid uint32
	// Owner's group ID.
    
func At(shmId int, shmAddr uintptr, shmFlg int) (data []byte, err error) {
	addr, errno := C.shmat(C.int(shmId), unsafe.Pointer(shmAddr), C.int(shmFlg))
	if int(uintptr(addr)) == -1 {
		return nil, errno
	}

	length, err := Size(shmId)
	if err != nil {
		return nil, err
	}

	var b = struct {
		addr uintptr
		len  int
		cap  int
	}{uintptr(addr), int(length), int(length)}

	data = *(*[]byte)(unsafe.Pointer(&b))
	return data, nil
}