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/fhOS2File.c

    r3861 r3906  
    8484{
    8585    LIBCLOG_ENTER("pFH=%p:{.fh=%d} pvBuf=%p cbToRead=%zu pcbRead=%p\n", pFH, pFH->fh, pvBuf, cbToRead, pcbRead);
    86     FS_VAR_SAVE_LOAD();
    87     FSCW_VAR();
    88     FSCW_SAVE();
    8986
    9087    /*
     
    9289     * Allocate a buffer in the low heap.
    9390     */
     91    PRESERVE_REGS_SAVE_LOAD_SAFE();
    9492    int     rc;
    9593    ULONG   cbActuallyRead = 0;
     
    110108    else
    111109        rc = DosRead(pFH->hNative, pvBuf, cbToRead, &cbActuallyRead);
    112 
     110    PRESERVE_REGS_RESTORE();
    113111
    114112    /* deal with the return code. */
     
    136134{
    137135    LIBCLOG_ENTER("pFH=%p:{.fh=%d} pvBuf=%p cbToWrite=%zu pcbWritten=%p\n", pFH, pFH->fh, pvBuf, cbToWrite, (void *)pcbWritten);
    138     FS_VAR_SAVE_LOAD();
    139     FSCW_VAR();
    140     FSCW_SAVE();
    141136
    142137    /*
     
    144139     * Allocate a buffer in the low heap.
    145140     */
     141    PRESERVE_REGS_SAVE_LOAD_SAFE();
    146142    int     rc;
    147143    ULONG   cbActuallyWritten = 0;
     
    161157    else
    162158        rc = DosWrite(pFH->hNative, pvBuf, cbToWrite, &cbActuallyWritten);
     159    PRESERVE_REGS_RESTORE();
    163160
    164161    /* deal with the return code. */
Note: See TracChangeset for help on using the changeset viewer.