Beispiel #1
0
static int child_fn(void)
{

    /* save child pid */
    child_pid = syscall(__NR_gettid);

    if (test_VM() == 0 && test_FILES() == 0 && test_FS() == 0 &&
            test_SIG() == 0)
        exit(0);
    exit(1);
}
Beispiel #2
0
/*
 * child_fn() - child function
 */
int child_fn()
{

	/* save child pid */
	child_pid = syscall(__NR_gettid);

	/*child_pid = getpid(); changed to above to work on POSIX threads -- NPTL */

	if (test_VM() && test_FILES() && test_FS() && test_SIG()) {
		exit(1);
	}
	exit(0);
}
Beispiel #3
0
void idle_trace(void)
{

	_syscall0(int, getpid)
	_syscall1(int, getpgid, int, pid)

	if (!once) {
        	/* VM allocation/deallocation simple test */
		test_VM();
		pid = getpid();

        	printk("Got all through to Idle !!\n");
        	printk("I'm now going to loop forever ...\n");
        	printk("Any ! below is a timer tick.\n");
		printk("Any . below is a getpgid system call from pid = %d.\n", pid);


        	old_jiffies = jiffies;
		once++;
	}

	if (old_jiffies != jiffies) {
		old_jiffies = jiffies - old_jiffies;
		switch (old_jiffies) {
		case 1:
			printk("!");
			break;
		case 2:
			printk("!!");
			break;
		case 3:
			printk("!!!");
			break;
		case 4:
			printk("!!!!");
			break;
		default:
			printk("(%d!)", (int) old_jiffies);
		}
		old_jiffies = jiffies;
	}
	pgid = getpgid(pid);
	printk(".");
}