search for: create_and_destroy

Displaying 1 result from an estimated 1 matches for "create_and_destroy".

2011 Dec 13
1
Thread-safety issues with vbox driver ?
...weird things with the vbox driver when using multiple threads. Following is the snippet of code I experience problems with /*****************************************************/ #include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <libvirt/libvirt.h> void *create_and_destroy(void *arg) { virDomainPtr dom = (virDomainPtr)arg; char buf[VIR_UUID_STRING_BUFLEN]; virDomainGetUUIDString(dom, buf); if (virDomainCreate(dom) != 0) { printf("failed to start %s\n", buf); goto end; } printf("%s started\n", buf);...