Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/main/pjlib/src/pj/os_core_win32.c

    • Property svn:keywords deleted
    r3 r1  
    1 /* $Id$ 
    2  * 
     1/* $Header: /pjproject-0.3/pjlib/src/pj/os_core_win32.c 12    10/29/05 11:51a Bennylp $ */ 
     2/* $Log: /pjproject-0.3/pjlib/src/pj/os_core_win32.c $ 
     3 *  
     4 * 12    10/29/05 11:51a Bennylp 
     5 * Version 0.3-pre2. 
     6 *  
     7 * 11    10/14/05 12:26a Bennylp 
     8 * Finished error code framework, some fixes in ioqueue, etc. Pretty 
     9 * major. 
     10 *  
     11 * 10    9/21/05 1:39p Bennylp 
     12 * Periodic checkin for backup. 
     13 *  
     14 * 9     9/17/05 10:37a Bennylp 
     15 * Major reorganization towards version 0.3. 
     16 *  
    317 */ 
    418#include <pj/os.h> 
     
    178192{ 
    179193    char stack_ptr; 
    180     pj_status_t rc; 
    181194    pj_thread_t *thread = (pj_thread_t *)desc; 
    182195    pj_str_t thread_name = pj_str((char*)cstr_thread_name); 
     
    195208 
    196209    /* Initialize and set the thread entry. */ 
    197     pj_memset(desc, 0, sizeof(struct pj_thread_t)); 
     210    pj_memset(desc, 0, sizeof(pj_thread_desc)); 
    198211    thread->hthread = GetCurrentThread(); 
    199212    thread->idthread = GetCurrentThreadId(); 
     
    212225        pj_sprintf(thread->obj_name, "thr%p", (void*)thread->idthread); 
    213226     
    214     rc = pj_thread_local_set(thread_tls_id, thread); 
    215     if (rc != PJ_SUCCESS) 
    216         return rc; 
     227    pj_thread_local_set(thread_tls_id, thread); 
    217228 
    218229    *thread_ptr = thread; 
     
    246257    PJ_LOG(6,(rec->obj_name, "Thread started")); 
    247258 
    248     if (pj_thread_local_set(thread_tls_id, rec) != PJ_SUCCESS) { 
    249         pj_assert(!"TLS is not set (pj_init() error?)"); 
    250     } 
    251  
     259    pj_thread_local_set(thread_tls_id, rec); 
    252260    result = (*rec->proc)(rec->arg); 
    253261 
     
    578586 * pj_thread_local_set() 
    579587 */ 
    580 PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value) 
    581 { 
    582     BOOL rc; 
    583  
     588PJ_DEF(void) pj_thread_local_set(long index, void *value) 
     589{ 
    584590    //Can't check stack because this function is called in the 
    585591    //beginning before main thread is initialized. 
    586592    //PJ_CHECK_STACK(); 
    587     rc = TlsSetValue(index, value); 
    588     return rc!=0 ? PJ_SUCCESS : PJ_RETURN_OS_ERROR(GetLastError()); 
     593    TlsSetValue(index, value); 
    589594} 
    590595 
Note: See TracChangeset for help on using the changeset viewer.