4 * Copyright 1995 Alexandre Julliard
7 #ifndef __WINE_SELECTORS_H
8 #define __WINE_SELECTORS_H
13 extern WORD
SELECTOR_AllocBlock( const void *base
, DWORD size
, unsigned char flags
);
14 extern WORD
SELECTOR_ReallocBlock( WORD sel
, const void *base
, DWORD size
);
15 extern void SELECTOR_FreeBlock( WORD sel
);
19 # define __DEFINE_GET_SEG(seg) \
20 extern inline unsigned short __get_##seg(void) \
21 { unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; }
22 # define __DEFINE_SET_SEG(seg) \
23 extern inline void __set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); }
25 # define __DEFINE_GET_SEG(seg) extern unsigned short __get_##seg(void);
26 # define __DEFINE_SET_SEG(seg) extern void __set_##seg(unsigned int);
27 # endif /* __GNUC__ */
29 # define __DEFINE_GET_SEG(seg) static inline unsigned short __get_##seg(void) { return 0; }
30 # define __DEFINE_SET_SEG(seg) /* nothing */
42 #endif /* __WINE_SELECTORS_H */