Skip to content
Snippets Groups Projects
  • Andy Green's avatar
    cfeb1964
    client: SMP: associate client with tsi of thread creating client connection · cfeb1964
    Andy Green authored
    1) This moves the service tid detection stuff from context to pt.
    
    2) If LWS_MAX_SMP > 1, a default pthread tid detection callback is provided
       on the dummy callback.  Callback handlers that call through to the dummy
       handler will inherit this.  It provides an int truncation of the pthread
       tid.
    
    3) If there has been any service calls on the service threads, the pts now
       know the low sizeof(int) bytes of their tid.  When you ask for a client
       connection to be created, it looks through the pts to see if the calling
       thread is a pt service thread.  If so, the new client is set to use the
       same pt as the caller.
    cfeb1964
    History
    client: SMP: associate client with tsi of thread creating client connection
    Andy Green authored
    1) This moves the service tid detection stuff from context to pt.
    
    2) If LWS_MAX_SMP > 1, a default pthread tid detection callback is provided
       on the dummy callback.  Callback handlers that call through to the dummy
       handler will inherit this.  It provides an int truncation of the pthread
       tid.
    
    3) If there has been any service calls on the service threads, the pts now
       know the low sizeof(int) bytes of their tid.  When you ask for a client
       connection to be created, it looks through the pts to see if the calling
       thread is a pt service thread.  If so, the new client is set to use the
       same pt as the caller.