DragonFly bugs List (threaded) for 2009-04
DragonFly BSD
DragonFly bugs List (threaded) for 2009-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1343] panic: vm_map_entry_link, dup addr map


From: "Alex Hornung \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Apr 2009 17:40:31 +0000

Alex Hornung <ahornung@gmail.com> added the comment:

new test case I'm using. Remember to compile with -lthread_xu, as it only seems
to affect this lib.

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1343>
_____________________________________________________
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include <unistd.h>



void* tester(void *arg)
{
	for(;;) sleep(1);	
}

void* checker(void *arg)
{
	printf("Passed barrier!\n");
}


int main(int argc, char *argv[])
{
	int i, ret, nthreads;
	pthread_t th;

	if (argc <= 1)
	{
		printf("Need one argument\n");
		exit(1);
	}

	nthreads = atoi(argv[1]);
	
	printf("Trying with %d threads\n", nthreads);	


	printf("Creating checker thread\n");
	pthread_create(&th, NULL, checker, NULL);

	printf("Creating tester threads\n");


	for (i = 0; i < nthreads; i++)
		pthread_create(&th, NULL, tester, NULL);

	sleep(1);
	getchar();
	return 0;
}


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]