File:  [XINU] / xinu / sys / TEST / test.c.preempt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:04 2018 UTC (8 years, 3 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19870308, HEAD
Xinu for VAX

/* test.c - main */

#include <conf.h>
#include <kernel.h>

/*------------------------------------------------------------------------
 *  main  --  current test routines
 *------------------------------------------------------------------------
 */
main()
{
	int prhello(), proc();
	int i;

	prhello();
		for (i=0; i<10; i++) {
			resume (
				create (proc, 12000, 19, "proc", 1, i)
				);
			}
	kprintf ("created 10 processes...\n");
}

prhello()
{
	kprintf("hello world\n");
}

proc(num)
int num;
{
	int i;

	for (i=0;i >= 0; i = (i+1)%3000)
		if (i == 0)
			kprintf ("process # %d: executing\n", num);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.