Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
ntdllmn.c File Reference
#include <windows.h>
#include <primpl.h>

Go to the source code of this file.

Functions

BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)

Variables

BOOL _pr_use_static_tls

Function Documentation

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 56 of file ntdllmn.c.

{
PRThread *me;

    switch (fdwReason) {
        case DLL_PROCESS_ATTACH:
            /*
             * If lpvReserved is NULL, we are dynamically loaded
             * and therefore can't use static thread-local storage.
             */
            if (lpvReserved == NULL) {
                _pr_use_static_tls = FALSE;
            } else {
                _pr_use_static_tls = TRUE;
            }
            break;
        case DLL_THREAD_ATTACH:
            break;
        case DLL_THREAD_DETACH:
            if (_pr_initialized) {
                me = _MD_GET_ATTACHED_THREAD();
                if ((me != NULL) && (me->flags & _PR_ATTACHED))
                    _PRI_DetachThread();
            }
            break;
        case DLL_PROCESS_DETACH:
            break;
    }
    return TRUE;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 45 of file ntthread.c.