github.com/huandu/go@v0.0.0-20151114150818-04e615e41150/misc/cgo/test/issue1222.go (about)

     1  // Copyright 2010 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // This file contains test cases for cgo.
     6  
     7  package cgotest
     8  
     9  /*
    10  // issue 1222
    11  typedef union {
    12  	long align;
    13  } xxpthread_mutex_t;
    14  
    15  struct ibv_async_event {
    16  	union {
    17  		int x;
    18  	} element;
    19  };
    20  
    21  struct ibv_context {
    22  	xxpthread_mutex_t mutex;
    23  };
    24  */
    25  import "C"
    26  
    27  type AsyncEvent struct {
    28  	event C.struct_ibv_async_event
    29  }