Changeset 121 in libcf


Ignore:
Timestamp:
06/10/13 16:45:12 (11 years ago)
Author:
cheese
Message:

#1 revert thread creation function

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/cf_thread.h

    r119 r121  
    2626
    2727CF_EXPORT int
    28 CF_Thread_CreateCtx     (CF_Thread_Ctx      * threadID,
     28CF_Thread_Create        (CF_Thread_Ctx      * threadID,
    2929                         CF_Thread_Function callback,
    3030                         void               * arg);
  • trunk/src/cf_thread.c

    r119 r121  
    6767 */
    6868int
    69 CF_Thread_CreateCtx (CF_Thread_Ctx      * threadID,
    70                     CF_Thread_Function callback,
    71                      void               * arg)
     69CF_Thread_Create (CF_Thread_Ctx         * threadID,
     70                  CF_Thread_Function    callback,
     71                  void                  * arg)
    7272{
    7373    int result = 0;
  • trunk/test/log.c

    r109 r121  
    2929    CF_DEBUG_PRINT (stderr, "created %dth thread\n", th);
    3030
    31     for (i = 0 ; i < 100000 ; i++)
     31    for (i = 0 ; i < 10000 ; i++)
    3232    {
    3333        CF_Log_Write (LOG_MT, "LOG_MT", "[%d] multi-threadedlogging test %d\n", th, i);
     
    8585    for (i = 0 ; i < 10 ; i++)
    8686    {
    87         if (CF_Thread_CreateCtx (&tid[i], test_log_mt, &i) < 0)
     87        if (CF_Thread_Create (&tid[i], test_log_mt, &i) < 0)
    8888        {
    8989            CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", i);
  • trunk/test/socket.c

    r109 r121  
    135135    for (iter = 0 ; iter < THREAD_POOL ; iter++)
    136136    {
    137         if (CF_Thread_CreateCtx (&stid[iter], socket_echo_server, &sock) < 0)
     137        if (CF_Thread_Create (&stid[iter], socket_echo_server, &sock) < 0)
    138138        {
    139139            CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter);
     
    145145    for (iter = 0 ; iter < THREAD_POOL ; iter++)
    146146    {
    147         if (CF_Thread_CreateCtx (&ctid[iter], socket_echo_client, &sock) < 0)
     147        if (CF_Thread_Create (&ctid[iter], socket_echo_client, &sock) < 0)
    148148        {
    149149            CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter);
  • trunk/test/thread.c

    r109 r121  
    3232
    3333    for (i = 0 ; i < 10 ; i++) {
    34         if (CF_Thread_CreateCtx (&tid[i], worker, NULL) < 0) {
     34        if (CF_Thread_Create (&tid[i], worker, NULL) < 0) {
    3535            // error
    3636        }
Note: See TracChangeset for help on using the changeset viewer.