aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/runtime.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-01-03 22:58:48 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-01-03 22:58:48 +0000
commit0f2a6e84c6e4edd122228be318a014dd88d1c4f2 (patch)
tree3478fe1adc6005eb49dda8f1c31857b5324fb886 /libgo/runtime/runtime.h
parentc65f76af364733b576d738af315811a68d23886d (diff)
downloadgcc-0f2a6e84c6e4edd122228be318a014dd88d1c4f2.zip
gcc-0f2a6e84c6e4edd122228be318a014dd88d1c4f2.tar.gz
gcc-0f2a6e84c6e4edd122228be318a014dd88d1c4f2.tar.bz2
runtime: remove __go_alloc and __go_free
Move allocg and handling of allgs slice from C to Go. Reviewed-on: https://go-review.googlesource.com/34797 From-SVN: r244036
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r--libgo/runtime/runtime.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index 54bdcf8..c8f490f 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -7,6 +7,7 @@
#include "go-assert.h"
#include <complex.h>
#include <signal.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -22,8 +23,6 @@
#include <sys/mman.h>
#endif
-#include "go-alloc.h"
-
#define _STRINGIFY2_(x) #x
#define _STRINGIFY_(x) _STRINGIFY2_(x)
#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
@@ -233,8 +232,10 @@ enum
*/
extern uintptr* runtime_getZerobase(void)
__asm__(GOSYM_PREFIX "runtime.getZerobase");
-extern G** runtime_allg;
-extern uintptr runtime_allglen;
+extern G* runtime_getallg(intgo)
+ __asm__(GOSYM_PREFIX "runtime.getallg");
+extern uintptr runtime_getallglen(void)
+ __asm__(GOSYM_PREFIX "runtime.getallglen");
extern G* runtime_lastg;
extern M* runtime_allm;
extern P** runtime_allp;
@@ -309,13 +310,9 @@ MCache* runtime_allocmcache(void)
void runtime_freemcache(MCache*);
void runtime_mallocinit(void);
void runtime_mprofinit(void);
-#define runtime_malloc(s) __go_alloc(s)
-#define runtime_free(p) __go_free(p)
#define runtime_getcallersp(p) __builtin_frame_address(0)
int32 runtime_mcount(void)
__asm__ (GOSYM_PREFIX "runtime.mcount");
-int32 runtime_gcount(void)
- __asm__ (GOSYM_PREFIX "runtime.gcount");
void runtime_mcall(void(*)(G*));
uint32 runtime_fastrand1(void) __asm__ (GOSYM_PREFIX "runtime.fastrand1");
int32 runtime_timediv(int64, int32, int32*)