35 int fd=open("/home/kashrinivaasan/linux-3.7.8/drivers/virgo/cpupooling/virgocloudexec/virgo_cloudexec_upcall_usermode_log.txt",O_RDWR | O_APPEND);
36 char buf[500];
37 sprintf(buf,"virgo_cloud_test: executing userspace thread for virgo_cloud_test on virgo cloud\n");
38 write(fd,buf,sizeof(buf));
39
40 fsync(fd);
41 close(fd);
42 */
43int pid;
44int x=100;
45int status;
46 x=x*x;
47 pid=fork();
48if(pid==0)
49 {
50/*
51 int fd=open("./virgo_cloud_test_print_to_stdout.out", O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
52 dup2(fd,1);
53 dup2(fd,2);
54 */
55 printf("Child process of fork: virgo_cloud_test_main.c: User space has written to a VFS file opened by Kernel, Kernel To User space communication works\n");
56 fflush(stdout);
57 x=x*x;
58 }
59else
60 {
61/*
62 int fd=open("./virgo_cloud_test_print_to_stdout.out", O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
63 dup2(fd,1);
64 dup2(fd,2);
65 */
66 printf("Parent process of fork: virgo_cloud_test_main.c: User space has written to a VFS file opened by Kernel, Kernel To User space communication works\n");
67 fflush(stdout);
68 x=x*x;
69 waitpid(pid,&status,WCONTINUED);
70 }
71return NULL;
72 }
Generated on Tue Jul 15 2014 13:51:27 for Krishna iResearch Intelligent Cloud Platform - VIRtual Generic Os - VIRGO - Linux kernel extensions for cloud by 1.8.6