internal/runtime:runtime.cpp
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#include <unistd.h>
|
||||
|
||||
int llgo_maxprocs()
|
||||
{
|
||||
extern "C" {
|
||||
|
||||
int llgo_maxprocs() {
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
return (int)sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ type _runtime struct{}
|
||||
|
||||
const (
|
||||
LLGoPackage = "link"
|
||||
LLGoFiles = "_wrap/runtime.c"
|
||||
LLGoFiles = "_wrap/runtime.cpp"
|
||||
)
|
||||
|
||||
// GOROOT returns the root of the Go tree. It uses the
|
||||
|
||||
Reference in New Issue
Block a user