Plan 9 from User Space's /usr/local/plan9/lib/linux-isnptl.c

#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

int
main(void)
{
	ulong x;

	x = (ulong)pthread_self();
	printf("%lx\n", x);
	if(x < 1024*1024)
		exit(1);	/* NOT NPTL */
	exit(0);
}

Space Glenda

Copyright © 2005 Lucent Technologies, Russ Cox, MIT.
See license for details.