Changeset 2856 for trunk/kLdr/kLdrMod.c


Ignore:
Timestamp:
Nov 4, 2006, 11:19:33 PM (19 years ago)
Author:
bird
Message:

More code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kLdr/kLdrMod.c

    r2855 r2856  
    538538 * @returns 0 on success or no init function, non-zero on init function failure or invalid pMod.
    539539 * @param   pMod            The module.
    540  */
    541 int     kLdrModCallInit(PKLDRMOD pMod)
    542 {
    543     KLDRMOD_VALIDATE(pMod);
    544     return pMod->pOps->pfnCallInit(pMod);
     540 * @param   uHandle         The module handle to use if any of the init functions requires the module handle.
     541 */
     542int     kLdrModCallInit(PKLDRMOD pMod, uintptr_t uHandle)
     543{
     544    KLDRMOD_VALIDATE(pMod);
     545    return pMod->pOps->pfnCallInit(pMod, uHandle);
    545546}
    546547
     
    551552 * @returns 0 on success or no term function, non-zero on invalid pMod.
    552553 * @param   pMod            The module.
     554 * @param   uHandle         The module handle to use if any of the term functions requires the module handle.
    553555 *
    554556 * @remark  Termination function failure will be ignored by the module interpreter.
    555557 */
    556 int     kLdrModCallTerm(PKLDRMOD pMod)
    557 {
    558     KLDRMOD_VALIDATE(pMod);
    559     return pMod->pOps->pfnCallTerm(pMod);
     558int     kLdrModCallTerm(PKLDRMOD pMod, uintptr_t uHandle)
     559{
     560    KLDRMOD_VALIDATE(pMod);
     561    return pMod->pOps->pfnCallTerm(pMod, uHandle);
    560562}
    561563
     
    564566 * Call the thread attach or detach function of a mapped module (if any).
    565567 *
     568 * Any per-thread TLS initialization/termination will have to be done at this time too.
     569 *
    566570 * @returns 0 on success or no attach/detach function, non-zero on attach failure or invalid pMod.
    567571 * @param   pMod            The module.
     572 * @param   uHandle         The module handle to use if any of the thread attach/detach functions
     573 *                          requires the module handle.
    568574 *
    569575 * @remark  Detach function failure will be ignored by the module interpreter.
    570576 */
    571 int     kLdrModCallThread(PKLDRMOD pMod, unsigned fAttachingOrDetaching)
     577int     kLdrModCallThread(PKLDRMOD pMod, uintptr_t uHandle, unsigned fAttachingOrDetaching)
    572578{
    573579    KLDRMOD_VALIDATE(pMod);
    574580    KLDRHLP_VALIDATE_FLAGS(fAttachingOrDetaching, 1);
    575     return pMod->pOps->pfnCallThread(pMod, fAttachingOrDetaching);
     581    return pMod->pOps->pfnCallThread(pMod, uHandle, fAttachingOrDetaching);
    576582}
    577583
     
    583589 * @param   pMod            The module.
    584590 */
    585 size_t kLdrModSize(PKLDRMOD pMod)
     591KLDRADDR kLdrModSize(PKLDRMOD pMod)
    586592{
    587593    KLDRMOD_VALIDATE_EX(pMod, 0);
Note: See TracChangeset for help on using the changeset viewer.