Changeset 21608 for trunk/testapp/threads/threads.c
- Timestamp:
- Mar 30, 2011, 2:19:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/testapp/threads/threads.c
r21518 r21608 100 100 } // End of main thread creation loop. 101 101 102 #ifndef _MSC_VER 103 printf("Started %d threads. Waiting for them to terminate...\n", MAX_THREADS); 104 #endif 105 102 106 // Wait until all threads have terminated. 103 107 104 108 WaitForMultipleObjects(MAX_THREADS, hThreadArray, TRUE, INFINITE); 105 109 110 #ifndef _MSC_VER 111 printf("All threads terminated.\n"); 112 #endif 113 106 114 // Close all thread handles and free memory allocations. 107 115 … … 143 151 // Print the parameter values using thread-safe functions. 144 152 153 Sleep(1000 * pDataArray->val1 / 2); 154 145 155 StringCchPrintf(msgBuf, BUF_SIZE, TEXT("Parameters = %d, %d\n"), 146 156 pDataArray->val1, pDataArray->val2); … … 153 163 #endif 154 164 165 #if 0 166 // crash the application 167 if (pDataArray->val1 == 6) 168 { 169 *((int*)0) = 0; 170 } 171 #endif 172 155 173 return 0; 156 174 }
Note:
See TracChangeset
for help on using the changeset viewer.