Changeset 121 in libcf
- Timestamp:
- 06/10/13 16:45:12 (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/cf_thread.h
r119 r121 26 26 27 27 CF_EXPORT int 28 CF_Thread_Create Ctx(CF_Thread_Ctx * threadID,28 CF_Thread_Create (CF_Thread_Ctx * threadID, 29 29 CF_Thread_Function callback, 30 30 void * arg); -
trunk/src/cf_thread.c
r119 r121 67 67 */ 68 68 int 69 CF_Thread_Create Ctx (CF_Thread_Ctx* threadID,70 71 void* arg)69 CF_Thread_Create (CF_Thread_Ctx * threadID, 70 CF_Thread_Function callback, 71 void * arg) 72 72 { 73 73 int result = 0; -
trunk/test/log.c
r109 r121 29 29 CF_DEBUG_PRINT (stderr, "created %dth thread\n", th); 30 30 31 for (i = 0 ; i < 10000 0; i++)31 for (i = 0 ; i < 10000 ; i++) 32 32 { 33 33 CF_Log_Write (LOG_MT, "LOG_MT", "[%d] multi-threadedlogging test %d\n", th, i); … … 85 85 for (i = 0 ; i < 10 ; i++) 86 86 { 87 if (CF_Thread_Create Ctx(&tid[i], test_log_mt, &i) < 0)87 if (CF_Thread_Create (&tid[i], test_log_mt, &i) < 0) 88 88 { 89 89 CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", i); -
trunk/test/socket.c
r109 r121 135 135 for (iter = 0 ; iter < THREAD_POOL ; iter++) 136 136 { 137 if (CF_Thread_Create Ctx(&stid[iter], socket_echo_server, &sock) < 0)137 if (CF_Thread_Create (&stid[iter], socket_echo_server, &sock) < 0) 138 138 { 139 139 CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter); … … 145 145 for (iter = 0 ; iter < THREAD_POOL ; iter++) 146 146 { 147 if (CF_Thread_Create Ctx(&ctid[iter], socket_echo_client, &sock) < 0)147 if (CF_Thread_Create (&ctid[iter], socket_echo_client, &sock) < 0) 148 148 { 149 149 CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter); -
trunk/test/thread.c
r109 r121 32 32 33 33 for (i = 0 ; i < 10 ; i++) { 34 if (CF_Thread_Create Ctx(&tid[i], worker, NULL) < 0) {34 if (CF_Thread_Create (&tid[i], worker, NULL) < 0) { 35 35 // error 36 36 }
Note:
See TracChangeset
for help on using the changeset viewer.