thread_tls_id, threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

When one uses PJSIP with another application, one has to register threads.

thread_tls_id is a static variable in os_core_win32.cpp. It holds  
thread id of last thread created or registered.

When a new thread is created, thread_tls_id holds its id.

Consider this sequence of events:

1. main thread, thread_tls_id =1
2. new thread  created, thread_tls_id=2,
3. second thread completes, thread_tls_id=2
4. main thread calls PJ_CHECK_STACK, there is no thread corresponding  
to id=2, so application crashes.

I feel thread_tls_id should not be static in first place.

What do the experts think ?

-Gaurav



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux