shithub: riscv

ref: 8a4a2dea70aa77475a50968f4c5bd6cdab5d2fb1
dir: /sys/src/libc/9sys/callmain.c/

View raw version
#include <u.h>
#include <libc.h>

void **_privates;
int _nprivates;

enum{
	NPRIVATES=16,
};

#pragma profile off

void
_callmain(void (*main)(int, char**), int argc, char *arg0)
{
	void *privates[NPRIVATES];

	_privates = privates;
	_nprivates = NPRIVATES;
	main(argc, &arg0);
	exits("main");
}

#pragma profile on