Changes in pjproject/main/pjlib/src/pj/os_core_win32.c [3:1]
- 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 * 3 17 */ 4 18 #include <pj/os.h> … … 178 192 { 179 193 char stack_ptr; 180 pj_status_t rc;181 194 pj_thread_t *thread = (pj_thread_t *)desc; 182 195 pj_str_t thread_name = pj_str((char*)cstr_thread_name); … … 195 208 196 209 /* 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)); 198 211 thread->hthread = GetCurrentThread(); 199 212 thread->idthread = GetCurrentThreadId(); … … 212 225 pj_sprintf(thread->obj_name, "thr%p", (void*)thread->idthread); 213 226 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); 217 228 218 229 *thread_ptr = thread; … … 246 257 PJ_LOG(6,(rec->obj_name, "Thread started")); 247 258 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); 252 260 result = (*rec->proc)(rec->arg); 253 261 … … 578 586 * pj_thread_local_set() 579 587 */ 580 PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value) 581 { 582 BOOL rc; 583 588 PJ_DEF(void) pj_thread_local_set(long index, void *value) 589 { 584 590 //Can't check stack because this function is called in the 585 591 //beginning before main thread is initialized. 586 592 //PJ_CHECK_STACK(); 587 rc = TlsSetValue(index, value); 588 return rc!=0 ? PJ_SUCCESS : PJ_RETURN_OS_ERROR(GetLastError()); 593 TlsSetValue(index, value); 589 594 } 590 595
Note: See TracChangeset
for help on using the changeset viewer.