Ignore:
Timestamp:
Oct 18, 2011, 8:24:17 PM (14 years ago)
Author:
dmik
Message:

Add SetReturnFS() for GCC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/include/os2sel.h

    r21350 r21713  
    4949}
    5050
    51 static inline int RestoreOS2FS(void)
     51static inline short RestoreOS2FS(void)
    5252{
    5353 int __res, xx = 0x0150b;
     
    6060}
    6161
     62static inline short SetReturnFS(unsigned short sel)
     63{
     64 int __res;
     65
     66 __asm__ __volatile__(
     67   "mov   %%fs,%0      \n\t"
     68   "mov   %%eax,%%fs   \n\t"
     69   : "=&r" (__res) : "a" (sel));
     70 return(__res);
     71}
    6272
    6373#else
     
    6777void           _System SetFS       (unsigned short selector);
    6878unsigned short _System SetReturnFS (unsigned short selector);
    69 //SvL: Checks if thread FS & exception structure are valid
    70 int            _System CheckCurFS(void);
    7179#endif
    7280#endif
    7381
    74  
    75  
     82//SvL: Checks if thread FS & exception structure are valid
     83int            _System CheckCurFS(void);
     84
     85
    7686#ifdef __cplusplus
    7787}
Note: See TracChangeset for help on using the changeset viewer.