Black Lives Matter. Support the Equal Justice Initiative.

Text file src/runtime/cgo/gcc_context.c

Documentation: runtime/cgo

     1  // Copyright 2016 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  // +build cgo
     6  // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
     7  
     8  #include "libcgo.h"
     9  
    10  // Releases the cgo traceback context.
    11  void _cgo_release_context(uintptr_t ctxt) {
    12  	void (*pfn)(struct context_arg*);
    13  
    14  	pfn = _cgo_get_context_function();
    15  	if (ctxt != 0 && pfn != nil) {
    16  		struct context_arg arg;
    17  
    18  		arg.Context = ctxt;
    19  		(*pfn)(&arg);
    20  	}
    21  }
    22  

View as plain text