Ignore:
Timestamp:
Oct 24, 2014, 1:50:44 AM (11 years ago)
Author:
bird
Message:

0.6,trunk: DosLoadModuleEx and DosFreeModuleEx should make an effort to preserve the FPU control word in addition to FS. Added a couple of common macros for doing both in one go. Fixed DosRead and DosWrite wrappers on trunk, they weren't restoring the registers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/src/kNIX/os2/DosFreeModuleEx.c

    r3862 r3906  
    44 * kNIX - DosFreeModuleEx.
    55 *
    6  * Copyright (c) 2004-2006 knut st. osmundsen <bird-src-spam@anduin.net>
     6 * Copyright (c) 2004-2014 knut st. osmundsen <bird-src-spam@anduin.net>
    77 *
    88 *
     
    3737    LIBCLOG_ENTER("hmod=%lx\n", hmod);
    3838    int         rc;
    39     FS_VAR();
    4039
    4140    /*
     
    4847     * Free module.
    4948     */
    50     FS_SAVE_LOAD();
    5149    rc = __libc_dosexFree(DOSEX_TYPE_LOAD_MODULE, (unsigned)hmod);
    5250    if (rc == -1)
     51    {
     52        PRESERVE_REGS_SAVE_LOAD_SAFE();
    5353        rc = DosFreeModule(hmod);
    54     FS_RESTORE();
     54        PRESERVE_REGS_RESTORE();
     55    }
    5556    if (!rc)
    5657        LIBCLOG_RETURN_INT(rc);
Note: See TracChangeset for help on using the changeset viewer.