Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/c++/lib/task/vax/_main.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/*
 * special version for the task library
 * so we can get the proper stack base
 */

#include <stdlib.h>

extern "C" {
	extern void __dtors();
	extern void _main();
}

typedef void (*PFV)();
extern PFV _ctors[];

void __task__init();

void _main() {
	__task__init();

	for (PFV* pf=_ctors; *pf; pf++)
		(**pf)();

	atexit (__dtors);
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.