Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: experimental/visual_studio_plugin/src/loop/loop_no_crash.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #include <stdio.h>
2 #include <time.h>
3 #include <sys/time.h>
4 #include <sys/nacl_syscalls.h>
5
6 //#define CRASH_IT
7
8 int g_GlobalData = 0;
9 void print_line(int count) {
10 printf("Running");
11 int i = 0;
12 for (i = 0; i < count % 5; ++i) {
13 printf(".");
14 }
15 for (; i < 5; ++i) {
16 printf(" ");
17 }
18 printf("\r");
19 fflush(stdout);
20 }
21
22 int print_loop() {
23 int count = 0;
24 timespec t = {1,0};
25
26 #ifdef CRASH_IT
27 char *ptr = NULL;
28
29 if (*ptr == 0)
30 return 1;
31 #endif
32
33 while (1) {
34 print_line(count);
35 ++count;
36 nanosleep(&t,0);
37 }
38
39 return 2;
40 }
41
42 int foo() {
43 if (print_loop())
44 return 0;
45
46 return 1;
47 }
48
49 class MyFooBarClass {
50 public:
51 int MyFooVar;
52 int MyBarVar;
53 };
54
55 int main(int argc, const char *argv[]){
56 MyFooBarClass fbclass;
57
58 fbclass.MyFooVar = 0;
59 printf("Hello World\n");
60 g_GlobalData++;
61 foo();
62 return 0;
63 }
OLDNEW
« no previous file with comments | « experimental/visual_studio_plugin/src/loop/loop.vcproj ('k') | experimental/visual_studio_plugin/src/loop/readme.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698