22 #include <sys/types.h>
31 int main(
int argc,
char **argv)
34 void* (*cloud_function)(
void*);
41 handle = dlopen(
"/home/kashrinivaasan/linux-3.7.8/drivers/virgo/cpupooling/virgocloudexec/libvirgo.so", RTLD_LAZY);
43 fprintf(stderr,
"%s\n", dlerror());
49 printf(
"dlsym lookup for cloud function: %s\n", argv[1]);
50 *(
void **) (&cloud_function) = dlsym(handle, argv[1]);
53 if ((error = dlerror()) != NULL) {
54 fprintf(stderr,
"%s\n", error);
57 printf(
"virgo_kernel_upcall_plugin: spawning userspace thread for virgo cloud clone function pointer: %x\n",cloud_function);
58 s=pthread_create(&tid, NULL, cloud_function, NULL);
59 pthread_join(tid, &x);